/** * Get cached modules. * * @param $key * @param $callback * * @return array */ public function getCached($key, Closure $callback) { if (!$this->config('cache.enabled')) { return $this->app->call($callback); } return $this->app['cache']->remember($this->config('cache.prefix') . '-' . $key, $this->config('cache.lifetime'), $callback); }
/** * Call the given Closure / class@method and inject its dependencies. * * @param callable|string $callback * @param array $parameters * @param string|null $defaultMethod * @return mixed * @static */ public static function call($callback, $parameters = array(), $defaultMethod = null) { //Method inherited from \Illuminate\Container\Container return \Illuminate\Foundation\Application::call($callback, $parameters, $defaultMethod); }
/** * 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]); }
/** * 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) { return $this->laravel->call([$this, 'fire']); }