classes/phing/types/DataType.php
public function getCheckedRef($requiredClass, $dataTypeName)
    {
        if (!$this->checked) {
            // should be in stack
            $stk = [];
            $stk[] = $this;
            $this->dieOnCircularReference($stk, $this->getProject());
        }

        $o = $this->ref->getReferencedObject($this->getProject());
        if (!($o instanceof $requiredClass)) {
            throw new BuildException($this->ref->getRefId() . " doesn't denote a " . $dataTypeName);
        } else {
            return $o;
        }
    }
public function getCheckedRef($requiredClass, $dataTypeName)
    {
        if (!$this->checked) {
            // should be in stack
            $stk = [];
            $stk[] = $this;
            $this->dieOnCircularReference($stk, $this->getProject());
        }

        $o = $this->ref->getReferencedObject($this->getProject());
        if (!($o instanceof $requiredClass)) {
            throw new BuildException($this->ref->getRefId() . " doesn't denote a " . $dataTypeName);
        } else {
            return $o;
        }
    }
public function getCheckedRef ( $ requiredClass , $ dataTypeName ) { if ( ! $ this -> checked ) { // should be in stack $ stk = [ ] ; $ stk [ ] = $ this ; $ this -> dieOnCircularReference ( $ stk , $ this -> getProject ( ) ) ; } $ o = $ this -> ref -> getReferencedObject ( $ this -> getProject ( ) ) ; if ( ! ( $ o instanceof $ requiredClass ) ) { throw new BuildException ( $ this -> ref -> getRefId ( ) . " doesn't denote a " . $ dataTypeName ) ; } else { return $ o ; } }
Performs the check for circular references and returns the referenced object.

@param $requiredClass
@param $dataTypeName

@throws BuildException

@return mixed
Performs the check for circular references and returns the referenced object .