本文整理汇总了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]);
}