classes/phing/parser/ProjectConfigurator.php
public static function configure($target, $attrs, Project $project)
    {
        if ($target instanceof TaskAdapter) {
            $target = $target->getProxy();
        }

        // if the target is an UnknownElement, this means that the tag had not been registered
        // when the enclosing element (task, target, etc.) was configured.  It is possible, however,
        // that the tag was registered (e.g. using <taskdef>) after the original configuration.
        // ... so, try to load it again:
        if ($target instanceof UnknownElement) {
            $tryTarget = $project->createTask($target->getTaskType());
            if ($tryTarget) {
                $target = $tryTarget;
            }
        }

        $bean = get_class($target);
        $ih = IntrospectionHelper::getHelper($bean);

        foreach ($attrs as $key => $value) {
            if ($key == 'id') {
                continue;
                // throw new BuildException("Id must be set Extermnally");
            }
            $value = $project->replaceProperties($value);
            try { // try to set the attribute
                $ih->setAttribute($project, $target, strtolower($key), $value);
            } catch (BuildException $be) {
                // id attribute must be set externally
                if ($key !== "id") {
                    throw $be;
                }
            }
        }
    }
public static function configure($target, $attrs, Project $project)
    {
        if ($target instanceof TaskAdapter) {
            $target = $target->getProxy();
        }

        // if the target is an UnknownElement, this means that the tag had not been registered
        // when the enclosing element (task, target, etc.) was configured.  It is possible, however,
        // that the tag was registered (e.g. using <taskdef>) after the original configuration.
        // ... so, try to load it again:
        if ($target instanceof UnknownElement) {
            $tryTarget = $project->createTask($target->getTaskType());
            if ($tryTarget) {
                $target = $tryTarget;
            }
        }

        $bean = get_class($target);
        $ih = IntrospectionHelper::getHelper($bean);

        foreach ($attrs as $key => $value) {
            if ($key == 'id') {
                continue;
                // throw new BuildException("Id must be set Extermnally");
            }
            $value = $project->replaceProperties($value);
            try { // try to set the attribute
                $ih->setAttribute($project, $target, strtolower($key), $value);
            } catch (BuildException $be) {
                // id attribute must be set externally
                if ($key !== "id") {
                    throw $be;
                }
            }
        }
    }
public static function configure ( $ target , $ attrs , Project $ project ) { if ( $ target instanceof TaskAdapter ) { $ target = $ target -> getProxy ( ) ; } // if the target is an UnknownElement, this means that the tag had not been registered // when the enclosing element (task, target, etc.) was configured.  It is possible, however, // that the tag was registered (e.g. using <taskdef>) after the original configuration. // ... so, try to load it again: if ( $ target instanceof UnknownElement ) { $ tryTarget = $ project -> createTask ( $ target -> getTaskType ( ) ) ; if ( $ tryTarget ) { $ target = $ tryTarget ; } } $ bean = get_class ( $ target ) ; $ ih = IntrospectionHelper :: getHelper ( $ bean ) ; foreach ( $ attrs as $ key => $ value ) { if ( $ key == 'id' ) { continue ; // throw new BuildException("Id must be set Extermnally"); } $ value = $ project -> replaceProperties ( $ value ) ; try { // try to set the attribute $ ih -> setAttribute ( $ project , $ target , strtolower ( $ key ) , $ value ) ; } catch ( BuildException $ be ) { // id attribute must be set externally if ( $ key !== "id" ) { throw $ be ; } } } }
Configures an element and resolves eventually given properties.

@param  mixed $target element to configure
@param  array $attrs element's attributes
@param  Project $project project this element belongs to
@throws BuildException
@throws Exception
Configures an element and resolves eventually given properties .