src/CLI/Command/ArgumentParser.php
protected function onEndOfLine( &$status, &$buffer, &$option )
	{
		if( $status == self::STATUS_READ_ARGUMENT )
			$this->foundArguments[]	= $buffer;
		else if( $status == self::STATUS_READ_OPTION_VALUE )										//  still reading an option value
			$this->onReadOptionValue( ' ', $status, $buffer, $option );								//  close reading and save last option
		else if( $status == self::STATUS_READ_OPTION_KEY )
		{
			if( !array_key_exists( $option, $this->possibleOptions ) )
				throw new InvalidArgumentException( 'Invalid option: '.$option.'.' );
			if( $this->possibleOptions[$option] )
				throw new RuntimeException( 'Missing value of option "'.$option.'".' );
			$this->foundOptions[$option]	= TRUE;
		}
		if( count( $this->foundArguments ) < $this->numberArguments )
			throw new RuntimeException( 'Missing argument.' );
		$this->finishOptions();
		$this->parsed	= TRUE;
	}
protected function onEndOfLine( &$status, &$buffer, &$option )
	{
		if( $status == self::STATUS_READ_ARGUMENT )
			$this->foundArguments[]	= $buffer;
		else if( $status == self::STATUS_READ_OPTION_VALUE )										//  still reading an option value
			$this->onReadOptionValue( ' ', $status, $buffer, $option );								//  close reading and save last option
		else if( $status == self::STATUS_READ_OPTION_KEY )
		{
			if( !array_key_exists( $option, $this->possibleOptions ) )
				throw new InvalidArgumentException( 'Invalid option: '.$option.'.' );
			if( $this->possibleOptions[$option] )
				throw new RuntimeException( 'Missing value of option "'.$option.'".' );
			$this->foundOptions[$option]	= TRUE;
		}
		if( count( $this->foundArguments ) < $this->numberArguments )
			throw new RuntimeException( 'Missing argument.' );
		$this->finishOptions();
		$this->parsed	= TRUE;
	}
protected function onEndOfLine ( & $ status , & $ buffer , & $ option ) { if ( $ status == self :: STATUS_READ_ARGUMENT ) $ this -> foundArguments [ ] = $ buffer ; else if ( $ status == self :: STATUS_READ_OPTION_VALUE ) //  still reading an option value $ this -> onReadOptionValue ( ' ' , $ status , $ buffer , $ option ) ; //  close reading and save last option else if ( $ status == self :: STATUS_READ_OPTION_KEY ) { if ( ! array_key_exists ( $ option , $ this -> possibleOptions ) ) throw new InvalidArgumentException ( 'Invalid option: ' . $ option . '.' ) ; if ( $ this -> possibleOptions [ $ option ] ) throw new RuntimeException ( 'Missing value of option "' . $ option . '".' ) ; $ this -> foundOptions [ $ option ] = TRUE ; } if ( count ( $ this -> foundArguments ) < $ this -> numberArguments ) throw new RuntimeException ( 'Missing argument.' ) ; $ this -> finishOptions ( ) ; $ this -> parsed = TRUE ; }
Handles open Argument or Option at the End of the Argument String.
@access		protected
@param		int			$status		Status Reference
@param		string		$buffer		Argument Buffer Reference
@param		string		$option		Option Buffer Reference
@return		void
Handles open Argument or Option at the End of the Argument String .