Ouzo\I18n::labels PHP Method

labels() public static method

public static labels ( $key = '' )
    public static function labels($key = '')
    {
        $labels = self::loadLabels();
        $explodedKey = explode('.', $key);
        return $key ? Arrays::getNestedValue($labels, $explodedKey) : $labels;
    }

Usage Example

Example #1
0
 /**
  * @test
  */
 public function shouldReturnAllLabels()
 {
     //when
     $allLabels = I18n::labels();
     //then
     $this->assertGreaterThan(1, sizeof($allLabels));
 }