get() public method

Get setting value
public get ( string $name, mixed $default = null ) : mixed
$name string key name
$default mixed default value when not exists
return mixed
Esempio n. 1
0
 /**
  * Make title text
  *
  * @param SeoUsable $item item instance
  * @return string
  */
 protected function makeTitle(SeoUsable $item = null)
 {
     if ($item) {
         return $item->getTitle() . ' - ' . $this->translator->trans($this->setting->get('mainTitle'));
     }
     return implode(' - ', [$this->translator->trans($this->setting->get('mainTitle')), $this->translator->trans($this->setting->get('subTitle'))]);
 }
 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     $this->app->bind('xe.seo', function ($app) {
         $setting = new Setting($app['xe.config'], $app['xe.storage'], $app['xe.media'], $app['xe.keygen']);
         return new SeoHandler([new BasicImporter($app['xe.frontend'], $app['request']), new OpenGraphImporter($app['xe.frontend'], $app['request']), new TwitterCardImporter($app['xe.frontend'], $app['request'], $setting->get('twitterUsername'))], $setting, $app['xe.translator']);
     }, true);
     $this->app->bind(SeoHandler::class, 'xe.seo');
 }