Crunz\Event::buildCommand PHP Метод

buildCommand() публичный Метод

Build the comand string.
public buildCommand ( ) : string
Результат string
    public function buildCommand()
    {
        $command = '';
        if ($this->cwd) {
            if ($this->user) {
                $command .= $this->sudo();
            }
            $command .= 'cd ' . $this->cwd . '; ';
        }
        if ($this->user) {
            $this->sudo();
        }
        $command .= $this->isClosure() ? $this->serializeClosure($this->command) : $this->command;
        return trim($command, '& ');
    }

Usage Example

Пример #1
0
 public function testBuildCommand()
 {
     $e = new Event($this->id, 'php -i');
     $this->assertSame("php -i", $e->buildCommand());
 }