mageekguy\atoum\script::__construct PHP Method

__construct() public method

public __construct ( $name, mageekguy\atoum\adapter $adapter = null )
$adapter mageekguy\atoum\adapter
    public function __construct($name, adapter $adapter = null)
    {
        $this->name = (string) $name;
        $this->setCli()->setAdapter($adapter)->setLocale()->setPrompt()->setArgumentsParser()->setOutputWriter()->setInfoWriter()->setErrorWriter()->setWarningWriter()->setHelpWriter();
        if ($this->adapter->php_sapi_name() !== 'cli') {
            throw new exceptions\logic('\'' . $this->getName() . '\' must be used in CLI only');
        }
    }

Usage Example

示例#1
0
 public function __construct($name, atoum\adapter $adapter = null)
 {
     parent::__construct($name, $adapter);
     $this->setPharFactory();
 }
All Usage Examples Of mageekguy\atoum\script::__construct