/**
     * Returns a child object, by its name.
     *
     * @param string $name
     * @throws DAV\Exception\NotFound
     * @return IPrincipal
     */
    function getChild($name) {

        $principalInfo = $this->principalBackend->getPrincipalByPath($this->principalPrefix . '/' . $name);
        if (!$principalInfo) throw new DAV\Exception\NotFound('Principal with name ' . $name . ' not found');
        return $this->getChildForPrincipal($principalInfo);

    }
예제 #2
0
 /**
  * Constructor
  *
  * @param Sabre\DAVACL\PrincipalBackend\BackendInterface $principalBackend
  * @param SabreAccounts\DAV\Accounts\Backend\PDO $accountsBackend
  * @param mixed $userUri
  */
 public function __construct(BackendInterface $principalBackend, PDO $accountsBackend, $userUri)
 {
     $this->principalBackend = $principalBackend;
     $this->accountsBackend = $accountsBackend;
     $this->principalInfo = $principalBackend->getPrincipalByPath($userUri);
 }