classes/phing/Phing.php
private function addBuildListeners(Project $project)
    {
        // Add the default listener
        $project->addBuildListener($this->createLogger());

        foreach ($this->listeners as $listenerClassname) {
            try {
                $clz = Phing::import($listenerClassname);
            } catch (Exception $e) {
                $msg = "Unable to instantiate specified listener "
                    . "class " . $listenerClassname . " : "
                    . $e->getMessage();
                throw new ConfigurationException($msg);
            }

            $listener = new $clz();

            if ($listener instanceof StreamRequiredBuildLogger) {
                throw new ConfigurationException("Unable to add " . $listenerClassname . " as a listener, since it requires explicit error/output streams. (You can specify it as a -logger.)");
            }
            $project->addBuildListener($listener);
        }
    }
private function addBuildListeners(Project $project)
    {
        // Add the default listener
        $project->addBuildListener($this->createLogger());

        foreach ($this->listeners as $listenerClassname) {
            try {
                $clz = Phing::import($listenerClassname);
            } catch (Exception $e) {
                $msg = "Unable to instantiate specified listener "
                    . "class " . $listenerClassname . " : "
                    . $e->getMessage();
                throw new ConfigurationException($msg);
            }

            $listener = new $clz();

            if ($listener instanceof StreamRequiredBuildLogger) {
                throw new ConfigurationException("Unable to add " . $listenerClassname . " as a listener, since it requires explicit error/output streams. (You can specify it as a -logger.)");
            }
            $project->addBuildListener($listener);
        }
    }
private function addBuildListeners ( Project $ project ) { // Add the default listener $ project -> addBuildListener ( $ this -> createLogger ( ) ) ; foreach ( $ this -> listeners as $ listenerClassname ) { try { $ clz = Phing :: import ( $ listenerClassname ) ; } catch ( Exception $ e ) { $ msg = "Unable to instantiate specified listener " . "class " . $ listenerClassname . " : " . $ e -> getMessage ( ) ; throw new ConfigurationException ( $ msg ) ; } $ listener = new $ clz ( ) ; if ( $ listener instanceof StreamRequiredBuildLogger ) { throw new ConfigurationException ( "Unable to add " . $ listenerClassname . " as a listener, since it requires explicit error/output streams. (You can specify it as a -logger.)" ) ; } $ project -> addBuildListener ( $ listener ) ; } }
Bind any registered build listeners to this project.

This means adding the logger and any build listeners that were specified
with -listener arg.

@param  Project $project
@throws BuildException
@throws ConfigurationException
@return void
Bind any registered build listeners to this project .