Webmozart\Console\Api\Config\ApplicationConfig::create PHP Method

create() public static method

Creates a new console application.
public static create ( string $name = null, string $version = null ) : static
$name string The name of the application.
$version string The application version.
return static The created instance.
    public static function create($name = null, $version = null)
    {
        return new static($name, $version);
    }

Usage Example

Ejemplo n.º 1
0
 public function testDoNotRethrowParseErrorIfLenient()
 {
     $config = ApplicationConfig::create()->beginCommand('package')->enableLenientArgsParsing()->end();
     $application = new ConsoleApplication($config);
     $command = $application->getCommand('package');
     $rawArgs = new StringArgs('package --foo');
     $resolvedCommand = $this->resolver->resolveCommand($rawArgs, $application, true);
     $args = new Args($command->getArgsFormat(), $rawArgs);
     $this->assertSame($command, $resolvedCommand->getCommand());
     $this->assertEquals($args, $resolvedCommand->getArgs());
 }
All Usage Examples Of Webmozart\Console\Api\Config\ApplicationConfig::create