createNamespace() public method

Create a namespace handler.
public createNamespace ( string $type, string $user, array $params = [] ) : Horde_Kolab_Storage_Folder_Namespace
$type string The namespace type.
$user string The current user.
$params array The parameters for the namespace.
return Horde_Kolab_Storage_Folder_Namespace The namespace handler.
Exemplo n.º 1
0
Arquivo: Base.php Projeto: horde/horde
 /**
  * Retrieve the namespace information for this connection.
  *
  * @return Horde_Kolab_Storage_Folder_Namespace The initialized namespace handler.
  */
 public function getNamespace()
 {
     if ($this->_namespace === null) {
         if (isset($this->_params['namespaces'])) {
             $this->_namespace = $this->_factory->createNamespace('config', $this->getAuth(), $this->_params['namespaces']);
         } else {
             $this->_namespace = $this->_factory->createNamespace('fixed', $this->getAuth());
         }
     }
     return $this->_namespace;
 }
Exemplo n.º 2
0
 public function testFixedNamespace()
 {
     $factory = new Horde_Kolab_Storage_Factory();
     $this->assertInstanceOf('Horde_Kolab_Storage_Folder_Namespace_Fixed', $factory->createNamespace('fixed', 'test'));
 }