src/Event.php
public function start()
    {
        $command = $this->buildCommand();
        $process = Process::fromStringCommand($command);

        $this->setProcess($process);
        $this->getProcess()->start(
            function ($type, $content): void {
                $this->wholeOutput[] = $content;
            }
        );

        if ($this->preventOverlapping) {
            $this->lock();
        }

        /** @var int $pid */
        $pid = $this->getProcess()
            ->getPid();

        return $pid;
    }
public function start()
    {
        $command = $this->buildCommand();
        $process = Process::fromStringCommand($command);

        $this->setProcess($process);
        $this->getProcess()->start(
            function ($type, $content): void {
                $this->wholeOutput[] = $content;
            }
        );

        if ($this->preventOverlapping) {
            $this->lock();
        }

        /** @var int $pid */
        $pid = $this->getProcess()
            ->getPid();

        return $pid;
    }
public function start ( ) { $ command = $ this -> buildCommand ( ) ; $ process = Process :: fromStringCommand ( $ command ) ; $ this -> setProcess ( $ process ) ; $ this -> getProcess ( ) -> start ( function ( $ type , $ content ) : void { $ this -> wholeOutput [ ] = $ content ; } ) ; if ( $ this -> preventOverlapping ) { $ this -> lock ( ) ; } /** @var int $pid */ $ pid = $ this -> getProcess ( ) -> getPid ( ) ; return $ pid ; }
Start the event execution.

@return int
Start the event execution .