本文整理汇总了PHP中Illuminate\Console\Application::call方法的典型用法代码示例。如果您正苦于以下问题:PHP Application::call方法的具体用法?PHP Application::call怎么用?PHP Application::call使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Console\Application
的用法示例。
在下文中一共展示了Application::call方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
function it_will_run_seeder_with_custom_class_if_told_to(Console $console)
{
$console->call('migrate:install')->shouldBeCalled();
$console->call('migrate:refresh')->shouldBeCalled();
$console->call('db:seed', array('--class' => 'MyDatabaseSeeder'))->shouldBeCalled();
$this->appInst->setRequestForConsoleEnvironment()->shouldBeCalled();
$this->appInst->boot()->shouldBeCalled();
$this->appInst->make('artisan')->shouldBeCalled();
$this->appInst->make('artisan')->willReturn($console);
$this->beConstructedWith(null, '.');
$this->setMigrateDatabase(true);
$this->setSeedDatabase(true, 'MyDatabaseSeeder');
$this->refreshApplication($this->appInst);
}
示例2: call
/**
* Run an Artisan console command by name.
*
* @param string $command
* @param array $parameters
* @param \Symfony\Component\Console\Output\OutputInterface $output
* @return void
* @static
*/
public static function call($command, $parameters = array(), $output = null)
{
\Illuminate\Console\Application::call($command, $parameters, $output);
}
示例3: call
/**
* Run an Artisan console command by name.
*
* @param string $command
* @param array $parameters
*
* @return int
*/
public function call($command, array $parameters = [])
{
return $this->artisan->call($command, $parameters);
}