l::get PHP Method

get() static public method

Gets a language value by key
static public get ( mixed $key = null, mixed $default = null ) : mixed
$key mixed The key to look for. Pass false or null to return the entire language array.
$default mixed Optional default value, which should be returned if no element has been found
return mixed
    static function get($key = null, $default = null)
    {
        if (empty($key)) {
            return self::$lang;
        }
        return a::get(self::$lang, $key, $default);
    }

Usage Example

示例#1
0
文件: user.php 项目: kompuser/panel
 public function __construct()
 {
     $this->type = 'text';
     $this->icon = 'user';
     $this->label = l::get('fields.user.label', 'User');
     $this->placeholder = l::get('fields.user.placeholder', 'Username…');
 }
All Usage Examples Of l::get