protected static function executeCommand( Event $event, $cmd, array $options = array() )
	{
		$php = escapeshellarg( self::getPhp() );
		$console = escapeshellarg( self::getConsoleDir( $event ) . '/console' );
		$cmd = escapeshellarg( $cmd );

		foreach( $options as $key => $option ) {
			$options[$key] = escapeshellarg( $option );
		}

		if( $event->getIO()->isDecorated() ) {
			$console .= ' --ansi';
		}

		$process = new Process( $php . ' ' . $console . ' ' . $cmd . ' ' . implode( ' ', $options ), null, null, null, 3600 );

		$process->run( function( $type, $buffer ) use ( $event ) {
			$event->getIO()->write( $buffer, false );
		} );

		if( !$process->isSuccessful() ) {
			throw new \RuntimeException( sprintf( 'An error occurred when executing the "%s" command', escapeshellarg( $cmd ) ) );
		}
	}
protected static function executeCommand( Event $event, $cmd, array $options = array() )
	{
		$php = escapeshellarg( self::getPhp() );
		$console = escapeshellarg( self::getConsoleDir( $event ) . '/console' );
		$cmd = escapeshellarg( $cmd );

		foreach( $options as $key => $option ) {
			$options[$key] = escapeshellarg( $option );
		}

		if( $event->getIO()->isDecorated() ) {
			$console .= ' --ansi';
		}

		$process = new Process( $php . ' ' . $console . ' ' . $cmd . ' ' . implode( ' ', $options ), null, null, null, 3600 );

		$process->run( function( $type, $buffer ) use ( $event ) {
			$event->getIO()->write( $buffer, false );
		} );

		if( !$process->isSuccessful() ) {
			throw new \RuntimeException( sprintf( 'An error occurred when executing the "%s" command', escapeshellarg( $cmd ) ) );
		}
	}
protected static function executeCommand ( Event $ event , $ cmd , array $ options = array ( ) ) { $ php = escapeshellarg ( self :: getPhp ( ) ) ; $ console = escapeshellarg ( self :: getConsoleDir ( $ event ) . '/console' ) ; $ cmd = escapeshellarg ( $ cmd ) ; foreach ( $ options as $ key => $ option ) { $ options [ $ key ] = escapeshellarg ( $ option ) ; } if ( $ event -> getIO ( ) -> isDecorated ( ) ) { $ console .= ' --ansi' ; } $ process = new Process ( $ php . ' ' . $ console . ' ' . $ cmd . ' ' . implode ( ' ' , $ options ) , null , null , null , 3600 ) ; $ process -> run ( function ( $ type , $ buffer ) use ( $ event ) { $ event -> getIO ( ) -> write ( $ buffer , false ) ; } ) ; if ( ! $ process -> isSuccessful ( ) ) { throw new \ RuntimeException ( sprintf ( 'An error occurred when executing the "%s" command' , escapeshellarg ( $ cmd ) ) ) ; } }
Executes a Symphony command.

@param Event $event Command event object
@param string $cmd Command name to execute, e.g. "aimeos:update"
@param array List of configuration options for the given command
@throws \RuntimeException If the command couldn't be executed
Executes a Symphony command .