Jackalope\Node::getPropertiesValues PHP Method

getPropertiesValues() public method

{@inheritDoc}
public getPropertiesValues ( $nameFilter = null, $dereference = true )
    public function getPropertiesValues($nameFilter = null, $dereference = true)
    {
        $this->checkState();
        // OPTIMIZE: do not create properties in constructor, go over array here
        $names = self::filterNames($nameFilter, array_keys($this->properties));
        $result = array();
        foreach ($names as $name) {
            //we know for sure the properties exist, as they come from the
            // array keys of the array we are accessing
            $type = $this->properties[$name]->getType();
            if (!$dereference && (PropertyType::REFERENCE === $type || PropertyType::WEAKREFERENCE === $type || PropertyType::PATH === $type)) {
                $result[$name] = $this->properties[$name]->getString();
            } else {
                // OPTIMIZE: collect the paths and call objectmanager->getNodesByPath once
                $result[$name] = $this->properties[$name]->getValue();
            }
        }
        return $result;
    }