lib/Psc/System/Deploy/Deployer.php
public function createTask($name) {
    $this->init();
    $class = Code::expandNamespace(\Webforge\Common\String::expand($name, 'Task'), 'Psc\System\Deploy');
    
    $gClass = GClass::factory($class);
    $params = array();
    if ($gClass->hasMethod('__construct')) {
      $constructor = $gClass->getMethod('__construct');
      foreach ($constructor->getParameters() as $parameter) {
        $params[] = $this->resolveTaskDependency($parameter, $gClass);
      }
    }
    
    return $gClass->newInstance($params);
  }
public function createTask($name) {
    $this->init();
    $class = Code::expandNamespace(\Webforge\Common\String::expand($name, 'Task'), 'Psc\System\Deploy');
    
    $gClass = GClass::factory($class);
    $params = array();
    if ($gClass->hasMethod('__construct')) {
      $constructor = $gClass->getMethod('__construct');
      foreach ($constructor->getParameters() as $parameter) {
        $params[] = $this->resolveTaskDependency($parameter, $gClass);
      }
    }
    
    return $gClass->newInstance($params);
  }
public function createTask ( $ name ) { $ this -> init ( ) ; $ class = Code :: expandNamespace ( \ Webforge \ Common \ String :: expand ( $ name , 'Task' ) , 'Psc\System\Deploy' ) ; $ gClass = GClass :: factory ( $ class ) ; $ params = array ( ) ; if ( $ gClass -> hasMethod ( '__construct' ) ) { $ constructor = $ gClass -> getMethod ( '__construct' ) ; foreach ( $ constructor -> getParameters ( ) as $ parameter ) { $ params [ ] = $ this -> resolveTaskDependency ( $ parameter , $ gClass ) ; } } return $ gClass -> newInstance ( $ params ) ; }
wird automatisch mit dependencies erstellt
@param string $name der Name des Tasks ohne Namespace und "Task" dahinter
wird automatisch mit dependencies erstellt