for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Arcanesoft\Seo\Models\Presenters;
use Arcanesoft\Seo\Entities\Locales;
/**
* Class FooterPresenter
*
* @package Arcanesoft\Seo\Models\Presenters
* @author ARCANEDEV <[email protected]>
* @property string locale
* @property string locale_name
* @property string content
* @property \Arcanesoft\Seo\Models\Page page
*/
trait FooterPresenter
{
/* -----------------------------------------------------------------
| Accessors
| -----------------------------------------------------------------
* Get the `locale_name` attribute.
* @return string|null
public function getLocaleNameAttribute()
return Locales::get($this->locale);
}
* Get the `content` attribute.
* @return string
public function getContentAttribute()
return $this->page->renderContent([
'footer_name' => $this->name,
name
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
class MyClass { } $x = new MyClass(); $x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:
class MyClass { public $foo; } $x = new MyClass(); $x->foo = true;
'footer_localization' => $this->localization,
localization
]);
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: