classes/phing/types/Path.php
public function dieOnCircularReference(&$stk, Project $p = null)
    {
        if ($this->checked) {
            return;
        }

        // elements can contain strings, FileSets, Reference, etc.
        foreach ($this->elements as $o) {
            if ($o instanceof Reference) {
                $o = $o->getReferencedObject($p);
            }

            if ($o instanceof DataType) {
                if (in_array($o, $stk, true)) {
                    throw $this->circularReference();
                } else {
                    $stk[] = $o;
                    $o->dieOnCircularReference($stk, $p);
                    array_pop($stk);
                }
            }
        }

        $this->checked = true;
    }
public function dieOnCircularReference(&$stk, Project $p = null)
    {
        if ($this->checked) {
            return;
        }

        // elements can contain strings, FileSets, Reference, etc.
        foreach ($this->elements as $o) {
            if ($o instanceof Reference) {
                $o = $o->getReferencedObject($p);
            }

            if ($o instanceof DataType) {
                if (in_array($o, $stk, true)) {
                    throw $this->circularReference();
                } else {
                    $stk[] = $o;
                    $o->dieOnCircularReference($stk, $p);
                    array_pop($stk);
                }
            }
        }

        $this->checked = true;
    }
public function dieOnCircularReference ( & $ stk , Project $ p = null ) { if ( $ this -> checked ) { return ; } // elements can contain strings, FileSets, Reference, etc. foreach ( $ this -> elements as $ o ) { if ( $ o instanceof Reference ) { $ o = $ o -> getReferencedObject ( $ p ) ; } if ( $ o instanceof DataType ) { if ( in_array ( $ o , $ stk , true ) ) { throw $ this -> circularReference ( ) ; } else { $ stk [ ] = $ o ; $ o -> dieOnCircularReference ( $ stk , $ p ) ; array_pop ( $ stk ) ; } } } $ this -> checked = true ; }
Overrides the version of DataType to recurse on all DataType
child elements that may have been added.

@param $stk
@param Project $p

@return void

@throws BuildException
Overrides the version of DataType to recurse on all DataType child elements that may have been added .