public function run(Result $result = null)
    {
        $cmd = $this->getBuiltCommand();

        $result = ($result) ? $result : new Result();
        if (($this->os->isWindowsLike() && !($this->flags & FORCE_USE_PROC_OPEN)) || ($this->flags & FORCE_USE_EXEC)) {
            return $this->exec($cmd, $result);
        } else {
            return $this->procOpen($cmd, $result);
        }
    }
public function run(Result $result = null)
    {
        $cmd = $this->getBuiltCommand();

        $result = ($result) ? $result : new Result();
        if (($this->os->isWindowsLike() && !($this->flags & FORCE_USE_PROC_OPEN)) || ($this->flags & FORCE_USE_EXEC)) {
            return $this->exec($cmd, $result);
        } else {
            return $this->procOpen($cmd, $result);
        }
    }
public function run ( Result $ result = null ) { $ cmd = $ this -> getBuiltCommand ( ) ; $ result = ( $ result ) ? $ result : new Result ( ) ; if ( ( $ this -> os -> isWindowsLike ( ) && ! ( $ this -> flags & FORCE_USE_PROC_OPEN ) ) || ( $ this -> flags & FORCE_USE_EXEC ) ) { return $ this -> exec ( $ cmd , $ result ) ; } else { return $ this -> procOpen ( $ cmd , $ result ) ; } }
Runs the command and returns a result object

@param  Result $result [optional] You can pass a result object to store the result of the run command.
If none is provided, one will be initialized automatically for you.

@return \Tivie\Command\Result An object containing the result of the command
@throws \Tivie\Command\Exception\Exception
Runs the command and returns a result object