lib/Doctrine/ORM/Internal/CommitOrderCalculator.php
public function sort()
    {
        foreach ($this->nodeList as $vertex) {
            if ($vertex->state !== self::NOT_VISITED) {
                continue;
            }

            $this->visit($vertex);
        }

        $sortedList = $this->sortedNodeList;

        $this->nodeList       = [];
        $this->sortedNodeList = [];

        return array_reverse($sortedList);
    }
public function sort()
    {
        foreach ($this->nodeList as $vertex) {
            if ($vertex->state !== self::NOT_VISITED) {
                continue;
            }

            $this->visit($vertex);
        }

        $sortedList = $this->sortedNodeList;

        $this->nodeList       = [];
        $this->sortedNodeList = [];

        return array_reverse($sortedList);
    }
public function sort ( ) { foreach ( $ this -> nodeList as $ vertex ) { if ( $ vertex -> state !== self :: NOT_VISITED ) { continue ; } $ this -> visit ( $ vertex ) ; } $ sortedList = $ this -> sortedNodeList ; $ this -> nodeList = [ ] ; $ this -> sortedNodeList = [ ] ; return array_reverse ( $ sortedList ) ; }
Return a valid order list of all current nodes.
The desired topological sorting is the reverse post order of these searches.

{@internal Highly performance-sensitive method. }}

@return object[]
Return a valid order list of all current nodes . The desired topological sorting is the reverse post order of these searches .