@param object $object
@param string $graph
@param bool   $asObject

@return array<string>
165983
public function getTransitions($object, $graph = 'default', $asObject = false)
    {
        if (!$asObject) {
            return $this->getStateMachine($object, $graph)->getCurrentState()->getTransitions();
        }

        $stateMachine = $this->getStateMachine($object, $graph);

        return array_map(
            function ($transition) use ($stateMachine) {
                return $stateMachine->getTransition($transition);
            },
            $stateMachine->getCurrentState()->getTransitions()
        );
    }
705573
public function getDate(bool $asObject = false)
    {
        if (true === $asObject) {
            return \DateTimeImmutable::createFromFormat('!Ymd', $this->date, new \DateTimeZone('UTC'));
        }

        return $this->date;
    }
951747
private static function toArray($object)
    {
        $json = array();
        $props = self::getProperties($object);
        foreach ($props as $key => $value) {
            $check_references = explode("_", $key);
            $getter = "";
            if (count($check_references) > 0) {
                foreach ($check_references as $reference) {
                    $getter .= ucfirst($reference);
                }
            } else {
                $getter = ucfirst($key);
            }
            $getter = "get" . $getter;

            if (!method_exists($object, $getter)) {
                continue;
            }
            $key = self::toSnakeCase($key);
            $value = $object->$getter();
            if (self::isNull($value)) {
                continue;
            }
            if ($value instanceof \Iterator) {
                $value = iterator_to_array($value);
            }
            if (is_object($value)) {
                $json[$key] = self::toArray($value);
            } else {
                if (is_array($value)) {
                    $json[$key] = array();
                    if (ArrayHelper::isAssoc($value)) {
                        foreach ($value as $k => $anObject) {
                            if (is_object($anObject)) {
                                $json[$key][$k] = self::toArray($anObject);
                            } else {
                                $json[$key][$k] = $anObject;
                            }
                        }
                    } else {
                        foreach ($value as $anObject) {
                            if (is_object($anObject)) {
                                $json[$key][] = self::toArray($anObject);
                            } else {
                                $json[$key][] = $anObject;
                            }
                        }
                    }
                } else {
                    $json[$key] = $value;
                }
            }
        }

        return $json;
    }
460909
static function fetchList( $asObject = true )
    {
        $sortArray = array( 'from_number' => 'asc' );
        return eZPersistentObject::fetchObjectList( eZISBNGroupRange::definition(),
                                                    null, null, $sortArray, null,
                                                    $asObject );
    }
73461
static private function objToArray(&$object)
    {
        if (is_object($object) && method_exists($object, '__trace')){
            $arr = $object->__trace();
            if (!is_array($arr)) return $arr;
        }else{
            $arr = (array)$object;
        }
        $result = [];
        while (list ($key, $value) = each($arr)){
            $keys = explode("\0", $key);
            $clear_key = $keys[sizeof($keys) - 1];
            $result[$clear_key] = &$arr[$key];
        }
        return $result;
    }
707543
public function on(string $object): Graph
    {
        $key = "... on {$object}";
        return ($this->modules[$key] = (new Graph())->setKeyName($key));
    }
1107036
static function findMainNode( $objectID, $asObject = false )
    {
        $objectID = (int)$objectID;
        $query = "SELECT node_id
                  FROM ezcontentobject_tree
                  WHERE contentobject_id=$objectID AND
                  main_node_id = node_id";
        $db = eZDB::instance();
        $nodeListArray = $db->arrayQuery( $query );
        if ( count( $nodeListArray ) == 1 )
        {
            if ( $asObject )
            {
                 return eZContentObjectTreeNode::fetch( $nodeListArray[0]['node_id'] );
            }
            else
            {
                return $nodeListArray[0]['node_id'];
            }

        }
        else if ( count( $nodeListArray ) > 1 )
        {
            eZDebug::writeError( $nodeListArray , "There are more then one main_node for objectID: $objectID" );
        }

        return null;
    }
707494
static function validNodes( $blockID, $asObject = true )
    {
        if ( isset( $GLOBALS['eZFlowPool'] ) === false )
            $GLOBALS['eZFlowPool'] = array();

        if ( isset( $GLOBALS['eZFlowPool'][$blockID] ) )
            return $GLOBALS['eZFlowPool'][$blockID];

        $visibilitySQL = "";

        if ( eZINI::instance( 'site.ini' )->variable( 'SiteAccessSettings', 'ShowHiddenNodes' ) !== 'true' )
        {
            $visibilitySQL = "AND ezcontentobject_tree.is_invisible = 0 ";
        }

        $db = eZDB::instance();
        $validNodes = $db->arrayQuery( "SELECT ezm_pool.node_id
                                        FROM ezm_pool, ezcontentobject_tree, ezcontentobject
                                        WHERE ezm_pool.block_id='$blockID'
                                          AND ezm_pool.ts_visible>0
                                          AND ezm_pool.ts_hidden=0
                                          AND ezcontentobject_tree.node_id = ezm_pool.node_id
                                          AND ezcontentobject.id = ezm_pool.object_id
                                          AND " . eZContentLanguage::languagesSQLFilter( 'ezcontentobject' ) . "
                                          $visibilitySQL
                                        ORDER BY ezm_pool.priority DESC" );

        if ( $asObject && !empty( $validNodes ) )
        {
            $validNodesObjects = array();

            foreach( $validNodes as $node )
            {
                $validNodeObject = eZContentObjectTreeNode::fetch( $node['node_id'] );
                if ( $validNodeObject instanceof eZContentObjectTreeNode && $validNodeObject->canRead() )
                    $validNodesObjects[] = $validNodeObject;
            }

            $GLOBALS['eZFlowPool'][$blockID] = $validNodesObjects;

            return $validNodesObjects;
        }
        else
        {
            return $validNodes;
        }
    }
508787
function objToGraph(obj, containerName) {
    if (!containerName) containerName = 'definitions';
    let graph = [];

    for (let p in obj[containerName]) {
        let entry = {};
        entry._id = '#/'+containerName+'/'+p;
        entry.links = [];
        graph.push(entry);
    }

    recurse(obj,{identityDetection:true},function(obj,key,state){
        if (isRef(obj,key)) {
            let ptr = obj[key].replace('/$ref','');
            let spath = state.path.replace('/$ref','');
            let target = graph.find(function(e){
                return e._id === ptr;
            });
            if (target) {
                target.links.push(ptr);
            }
            else {
                target = {};
                target._id = ptr;
                target.links = [];
                target.links.push(ptr);
                graph.push(target);
            }
            let source = graph.find(function(e){
                return e._id === spath;
            });
            if (source) {
                //source.links.push(spath);
            }
            else {
                source = {};
                source._id = spath
                source.links = [];
                graph.push(source);
            }
        }
    });

    return graph;
}
658727
public function getRelationList(DataObject $object, $field)
    {
        if ($this->isHasManyRelation($object, $field)) {
            return $object->getComponents($field);
        } elseif ($this->isManyManyRelation($object, $field)) {
            return $object->getManyManyComponents($field);
        }
    }
555363
final public function objectPropertiesToCamel($snakeObject)
    {
        // hold the object of new values
        $camelObject = new \stdClass();
        foreach ($snakeObject as $key => $value) {
            // tricky recursive for objects or arrays
            if (is_object($value)) {
                $value = $this->objectPropertiesToCamel($value);
            } elseif (is_array($value)) {
                $value = $this->arrayKeysToCamel($value);
            }
            $camelObject->{$this->camelize($key)} = $value;
            unset($snakeObject[$key]);
        }
        return $camelObject;
    }
895810
private function objectDereference(Node $object) {
    while ($this->currentType === T_OBJECT_OPERATOR) {
      $operator_node = new PartialNode();
      $this->mustMatch(T_OBJECT_OPERATOR, $operator_node, 'operator');

      $object_property = $this->objectProperty();
      if ($this->currentType === '(') {
        $node = new ObjectMethodCallNode();
        $node->addChild($object, 'object');
        $node->mergeNode($operator_node);
        $node->addChild($object_property, 'methodName');
        $this->functionCallParameterList($node);
        $node = $this->arrayDeference($node);
      }
      else {
        $node = new ObjectPropertyNode();
        $node->addChild($object, 'object');
        $node->mergeNode($operator_node);
        $node->addChild($object_property, 'property');
        $node = $this->offsetVariable($node);
        if ($this->currentType === '(') {
          $call = new CallbackCallNode();
          $call->addChild($node, 'callback');
          $this->functionCallParameterList($call);
          $node = $this->arrayDeference($call);
        }
      }
      $object = $node;
    }

    return $object;
  }
272008
public function optional( $subject, $predicate = null, $object = null ) {
		$graphBuilder = $this->getGraphBuilder( $subject, $predicate, $object );
		$this->optionals[] = $graphBuilder->getSPARQL();
		return $this;
	}
144291
public function isObject(DataObject $object, $name)
    {
        $identifier = ltrim($name, '->');
        
        return ($this->isObjectIdentifier($name) && is_object($object->$identifier));
    }
1026854
public static function object2array($object)
    {
        $result = null;
        if (is_object($object)) {
            $objectData = get_object_vars($object);
            if (is_array($objectData) && count($objectData)) {
                $result = array_map('self::object2array', $objectData);
            }
        } else {
            if (is_array($object)) {
                foreach ($object as $item => $value) {
                    $result[$item] = self::object2array($value);
                }
            } else {
                $result = $object;
            }
        }

        return $result;
    }
422868
private function getObjectPropertiesValues($object)
    {
        $properties = Core::get()->getGettablePropertiesOfObject($object);
        $finalProperties = [];

        foreach ($properties as $property) {
            $finalProperties[$property] = Core::get()->getObjectService()->getObjectProperty($object, $property);
        }

        return $finalProperties;
    }
493108
static function fetchList( $asObject = true )
    {
        return eZPersistentObject::fetchObjectList( eZRSSExport::definition(),
                                                    null, array( 'status' => self::STATUS_VALID ), null, null,
                                                    $asObject );
    }