Ouzo\Utilities\TimeAgo::getKey PHP Method

getKey() public method

public getKey ( ) : string
return string
    public function getKey()
    {
        return $this->key;
    }

Usage Example

Esempio n. 1
0
 public function asString()
 {
     $key = $this->timeAgo->getKey();
     $params = $this->timeAgo->getParams();
     if (Strings::equal($key, 'timeAgo.thisYear')) {
         $params['month'] = I18n::t($params['month']);
     }
     return I18n::t($key, $params);
 }