public function propFind($path, PropFind $propFind)
    {
        if (!$propFind->isAllProps() && 0 === count($propFind->get404Properties())) {
            return;
        }

        $query = 'SELECT name, value, valuetype FROM '.$this->tableName.' WHERE path = ?';
        $stmt = $this->pdo->prepare($query);
        $stmt->execute([$path]);

        while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
            if ('resource' === gettype($row['value'])) {
                $row['value'] = stream_get_contents($row['value']);
            }
            switch ($row['valuetype']) {
                case null:
                case self::VT_STRING:
                    $propFind->set($row['name'], $row['value']);
                    break;
                case self::VT_XML:
                    $propFind->set($row['name'], new Complex($row['value']));
                    break;
                case self::VT_OBJECT:
                    $propFind->set($row['name'], unserialize($row['value']));
                    break;
            }
        }
    }
public function propFind($path, PropFind $propFind)
    {
        if (!$propFind->isAllProps() && 0 === count($propFind->get404Properties())) {
            return;
        }

        $query = 'SELECT name, value, valuetype FROM '.$this->tableName.' WHERE path = ?';
        $stmt = $this->pdo->prepare($query);
        $stmt->execute([$path]);

        while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
            if ('resource' === gettype($row['value'])) {
                $row['value'] = stream_get_contents($row['value']);
            }
            switch ($row['valuetype']) {
                case null:
                case self::VT_STRING:
                    $propFind->set($row['name'], $row['value']);
                    break;
                case self::VT_XML:
                    $propFind->set($row['name'], new Complex($row['value']));
                    break;
                case self::VT_OBJECT:
                    $propFind->set($row['name'], unserialize($row['value']));
                    break;
            }
        }
    }
public function propFind ( $ path , PropFind $ propFind ) { if ( ! $ propFind -> isAllProps ( ) && 0 === count ( $ propFind -> get404Properties ( ) ) ) { return ; } $ query = 'SELECT name, value, valuetype FROM ' . $ this -> tableName . ' WHERE path = ?' ; $ stmt = $ this -> pdo -> prepare ( $ query ) ; $ stmt -> execute ( [ $ path ] ) ; while ( $ row = $ stmt -> fetch ( \ PDO :: FETCH_ASSOC ) ) { if ( 'resource' === gettype ( $ row [ 'value' ] ) ) { $ row [ 'value' ] = stream_get_contents ( $ row [ 'value' ] ) ; } switch ( $ row [ 'valuetype' ] ) { case null : case self :: VT_STRING : $ propFind -> set ( $ row [ 'name' ] , $ row [ 'value' ] ) ; break ; case self :: VT_XML : $ propFind -> set ( $ row [ 'name' ] , new Complex ( $ row [ 'value' ] ) ) ; break ; case self :: VT_OBJECT : $ propFind -> set ( $ row [ 'name' ] , unserialize ( $ row [ 'value' ] ) ) ; break ; } } }
Fetches properties for a path.

This method received a PropFind object, which contains all the
information about the properties that need to be fetched.

Usually you would just want to call 'get404Properties' on this object,
as this will give you the _exact_ list of properties that need to be
fetched, and haven't yet.

However, you can also support the 'allprops' property here. In that
case, you should check for $propFind->isAllProps().

@param string   $path
@param PropFind $propFind
Fetches properties for a path .