public __construct ( array $config = [] ) | ||
$config | array | The options array, possible options are: - `'closure'`: the closure to execute for this stub. - `'args'`: the arguments required for exectuting this stub. - `'static'`: the type of call required for exectuting this stub. - `'returns'`: the returns values for this stub (used only if the `'closure'` option is missing). |
public function __construct($config = [])
{
$defaults = ['closures' => null, 'args' => [], 'returns' => null, 'static' => false];
$config += $defaults;
parent::__construct($config);
$this->_name = ltrim($this->_name, '\\');
$this->_closures = $config['closures'];
$this->_returns = $config['returns'];
}