protected function _runCmd( $cmd )
    {
        if ( !empty( $cmd ) )
        {
            if ( is_array( $cmd ) )
            {
                $cmd = implode( ' && ', $cmd );
            }
            if ( $this->_isWindows() )
            {
                if ( function_exists( 'popen' ) && function_exists( 'pclose' ) )
                {
                    pclose( popen( 'start / B ' . $cmd, 'r' ) );
                }
                else
                {
                    if ( $this->messaging === true )
                    {
                        $this->error( 'Windows php.exe should support \'popen\'|\'pclose\' commands to proper functionality' );
                    }
                }
            }
            else
            {
                if ( function_exists( 'exec' ) )
                {
                    exec( $cmd );
                }
                else
                {
                    if ( $this->messaging === true )
                    {
                        $this->error( 'linux php-cli should support \'exec\' command to proper functionality' );
                    }
                }
            }
        }
        else
        {
            $this->error( 'Command is empty. Check Requirements first.' );
        }
    }
protected function _runCmd( $cmd )
    {
        if ( !empty( $cmd ) )
        {
            if ( is_array( $cmd ) )
            {
                $cmd = implode( ' && ', $cmd );
            }
            if ( $this->_isWindows() )
            {
                if ( function_exists( 'popen' ) && function_exists( 'pclose' ) )
                {
                    pclose( popen( 'start / B ' . $cmd, 'r' ) );
                }
                else
                {
                    if ( $this->messaging === true )
                    {
                        $this->error( 'Windows php.exe should support \'popen\'|\'pclose\' commands to proper functionality' );
                    }
                }
            }
            else
            {
                if ( function_exists( 'exec' ) )
                {
                    exec( $cmd );
                }
                else
                {
                    if ( $this->messaging === true )
                    {
                        $this->error( 'linux php-cli should support \'exec\' command to proper functionality' );
                    }
                }
            }
        }
        else
        {
            $this->error( 'Command is empty. Check Requirements first.' );
        }
    }
protected function _runCmd ( $ cmd ) { if ( ! empty ( $ cmd ) ) { if ( is_array ( $ cmd ) ) { $ cmd = implode ( ' && ' , $ cmd ) ; } if ( $ this -> _isWindows ( ) ) { if ( function_exists ( 'popen' ) && function_exists ( 'pclose' ) ) { pclose ( popen ( 'start / B ' . $ cmd , 'r' ) ) ; } else { if ( $ this -> messaging === true ) { $ this -> error ( 'Windows php.exe should support \'popen\'|\'pclose\' commands to proper functionality' ) ; } } } else { if ( function_exists ( 'exec' ) ) { exec ( $ cmd ) ; } else { if ( $ this -> messaging === true ) { $ this -> error ( 'linux php-cli should support \'exec\' command to proper functionality' ) ; } } } } else { $ this -> error ( 'Command is empty. Check Requirements first.' ) ; } }
Execute predefined non-PHP console command
@param string|array $cmd
Execute predefined non - PHP console command