PhpBrew\CommandBuilder::__toString PHP Méthode

__toString() public méthode

public __toString ( )
    public function __toString()
    {
        return $this->buildCommand();
    }

Usage Example

Exemple #1
0
 public function execute()
 {
     $args = func_get_args();
     // $currentVersion;
     $root = Config::getPhpbrewRoot();
     $home = Config::getPhpbrewHome();
     $buildDir = Config::getBuildDir();
     $version = getenv('PHPBREW_PHP');
     // XXX: get source dir from current build information
     $sourceDir = $buildDir . DIRECTORY_SEPARATOR . $version;
     $this->logger->info($sourceDir);
     $cmd = new CommandBuilder('ctags');
     $cmd->arg('--recurse');
     $cmd->arg('-a');
     $cmd->arg('-h');
     $cmd->arg('.c.h.cpp');
     $cmd->arg($sourceDir . DIRECTORY_SEPARATOR . 'main');
     $cmd->arg($sourceDir . DIRECTORY_SEPARATOR . 'ext');
     $cmd->arg($sourceDir . DIRECTORY_SEPARATOR . 'Zend');
     foreach ($args as $a) {
         $cmd->arg($a);
     }
     $this->logger->info($cmd->__toString());
     $cmd->execute();
     $this->logger->info("Done");
 }
All Usage Examples Of PhpBrew\CommandBuilder::__toString