/**
  * Creates and returns a new Exception instance.
  *
  * @param string $message The message itself
  * @param string $key The key for I18N
  * @return Faett_Channel_Exceptions_InvalidNamespaceException
  */
 public static function create($message, $key = '')
 {
     // create a new message
     $e = new Faett_Channel_Exceptions_InvalidNamespaceException($message);
     // set the message key
     $e->_setKey($key);
     // return the message
     return $e;
 }
 /**
  * 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;
 }