本文整理匯總了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);
}