本文整理汇总了PHP中Illuminate\Console\Command::__call方法的典型用法代码示例。如果您正苦于以下问题:PHP Command::__call方法的具体用法?PHP Command::__call怎么用?PHP Command::__call使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Console\Command
的用法示例。
在下文中一共展示了Command::__call方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __call
/**
* Dynamically handle calls to the build methods.
*
* @param string $method
* @param array $parameters
* @return mixed
*/
public function __call($method, $parameters)
{
if (in_array($method, array('buildAsDevelopment', 'buildAsProduction'))) {
list($name, $collection) = $parameters;
try {
$this->builder->{$method}($collection, 'stylesheets');
$this->line('<info>[' . $name . ']</info> Stylesheets successfully built.');
} catch (BuildNotRequiredException $error) {
$this->line('<comment>[' . $name . ']</comment> Stylesheets build was not required for collection.');
}
try {
$this->builder->{$method}($collection, 'javascripts');
$this->line('<info>[' . $name . ']</info> Javascripts successfully built.');
} catch (BuildNotRequiredException $error) {
$this->line('<comment>[' . $name . ']</comment> Javascripts build was not required for collection.');
}
$this->line('');
} else {
return parent::__call($method, $parameters);
}
}