本文整理匯總了PHP中Illuminate\Contracts\Foundation\Application::call方法的典型用法代碼示例。如果您正苦於以下問題:PHP Application::call方法的具體用法?PHP Application::call怎麽用?PHP Application::call使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Illuminate\Contracts\Foundation\Application
的用法示例。
在下文中一共展示了Application::call方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setup
/**
*
*/
public final function setup()
{
if (method_exists($this, 'boot')) {
$this->app->call([$this, 'boot']);
}
$this->setupCompleted = true;
$this->halted = false;
}
示例2: __construct
/**
* Create a new instance of Storytelling.
*
* @param \Illuminate\Contracts\Foundation\Application $app
*/
public function __construct($app)
{
$this->app = $app;
if (method_exists($this, 'initiate')) {
$app->call([$this, 'initiate']);
}
}
示例3: edit
/**
* @return \Cocona\Core\Html\Elements\Form
*/
public function edit($id)
{
$form = $this->app->call([$this->resource, 'form']);
// Create the route param from the name
$param = str_replace('-', '_', snake_case($this->resource->name()));
$form->action($this->to('update', [$param => $id]));
// Spoof the form method and add the CSRF token
$form->hidden('_method', 'PUT');
$form->token();
// Fill the form with the model and overwrite it with
// the request if is available
$form->fill($this->resource->item($id), $this->session->getOldInput());
return $form;
}
示例4: registerAdditionalRoutes
/**
* Register additional routes.
*
* @param AddonServiceProvider $provider
*/
protected function registerAdditionalRoutes(AddonServiceProvider $provider)
{
if ($this->routesAreCached()) {
return;
}
if (method_exists($provider, 'map')) {
try {
$this->application->call([$provider, 'map']);
} catch (\Exception $e) {
/*
* If, for whatever reason, this fails let
* it fail silently. Mapping additional routes
* could be volatile at certain application states.
*/
}
}
}
示例5: filtersPass
/**
* Determine if the filters pass for the event.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @return bool
*/
public function filtersPass($app)
{
foreach ($this->filters as $callback) {
if (!$app->call($callback)) {
return false;
}
}
foreach ($this->rejects as $callback) {
if ($app->call($callback)) {
return false;
}
}
return true;
}
示例6: filtersPass
/**
* Determine if the filters pass for the event.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @return bool
*/
protected function filtersPass(Application $app)
{
if ($this->filter && !$app->call($this->filter) || $this->reject && $app->call($this->reject)) {
return false;
}
return true;
}
示例7: execute
/**
* Execute the console command.
*
* @param \Symfony\Component\Console\Input\InputInterface $input
* @param \Symfony\Component\Console\Output\OutputInterface $output
* @return mixed
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
$method = method_exists($this, 'handle') ? 'handle' : 'fire';
return $this->laravel->call([$this, $method]);
}