Jarves\Storage\FileStorage::getParents PHP Метод

getParents() публичный Метод

public getParents ( $pk, $options = null )
    public function getParents($pk, $options = null)
    {
        $path = $this->getPathFromPK($pk);
        if ('/' === $path) {
            return array();
        }
        $result = array();
        $part = $path;
        while ($part = substr($part, 0, strrpos($part, '/'))) {
            $item = $this->getItem($part);
            $result[] = $item;
        }
        $root = $this->getItem('/');
        $root['_object'] = $this->objectKey;
        $result[] = $root;
        return array_reverse($result);
    }