public function getPrincipalByUri($uri)
    {
        $result = null;
        $collections = $this->principalCollectionSet;
        foreach ($collections as $collection) {
            try {
                $principalCollection = $this->server->tree->getNodeForPath($collection);
            } catch (NotFound $e) {
                // Ignore and move on
                continue;
            }

            if (!$principalCollection instanceof IPrincipalCollection) {
                // Not a principal collection, we're simply going to ignore
                // this.
                continue;
            }

            $result = $principalCollection->findByUri($uri);
            if ($result) {
                return $result;
            }
        }
    }
public function getPrincipalByUri($uri)
    {
        $result = null;
        $collections = $this->principalCollectionSet;
        foreach ($collections as $collection) {
            try {
                $principalCollection = $this->server->tree->getNodeForPath($collection);
            } catch (NotFound $e) {
                // Ignore and move on
                continue;
            }

            if (!$principalCollection instanceof IPrincipalCollection) {
                // Not a principal collection, we're simply going to ignore
                // this.
                continue;
            }

            $result = $principalCollection->findByUri($uri);
            if ($result) {
                return $result;
            }
        }
    }
public function getPrincipalByUri ( $ uri ) { $ result = null ; $ collections = $ this -> principalCollectionSet ; foreach ( $ collections as $ collection ) { try { $ principalCollection = $ this -> server -> tree -> getNodeForPath ( $ collection ) ; } catch ( NotFound $ e ) { // Ignore and move on continue ; } if ( ! $ principalCollection instanceof IPrincipalCollection ) { // Not a principal collection, we're simply going to ignore // this. continue ; } $ result = $ principalCollection -> findByUri ( $ uri ) ; if ( $ result ) { return $ result ; } } }
Returns a principal based on its uri.

Returns null if the principal could not be found.

@param string $uri

@return string|null
Returns a principal based on its uri .