Пример #1
0
 /**
  * Sets the namespace to use for rendering the ressource and
  * checks if the passed namespace is valid for the requested
  * ressource.
  *
  * @param string $namespace The namespace to set
  * @return void
  * @throws Faett_Channel_Exceptions_InvalidNamespaceException
  * 		Is thrown if an invalid namespace was passed
  */
 public function setNamespace($namespace)
 {
     // check if the namespace is valid
     if (!in_array($namespace, $this->_getNamespaces())) {
         throw Faett_Channel_Exceptions_InvalidNamespaceException::create('Invalid namespace ' . $namespace);
     }
     // initialize the namespace
     $this->_namespace = 'http://pear.php.net/dtd/' . $namespace;
 }