/var/www/hkosl.com/nick/codeigniter/application/vendor/gettext/gettext/src/Extractors/PhpArray.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php

namespace Gettext\Extractors;

use 
BadMethodCallException;
use 
Gettext\Translations;
use 
Gettext\Utils\MultidimensionalArrayTrait;

/**
 * Class to get gettext strings from php files returning arrays.
 */
class PhpArray extends Extractor implements ExtractorInterface
{
    use 
MultidimensionalArrayTrait;

    
/**
     * {@inheritdoc}
     */
    
public static function fromFile($fileTranslations $translations, array $options = [])
    {
        foreach (static::
getFiles($file) as $file) {
            
self::fromArray(include($file), $translations);
        }
    }

    
/**
     * {@inheritdoc}
     */
    
public static function fromString($stringTranslations $translations, array $options = [])
    {
        throw new 
BadMethodCallException('PhpArray::fromString() cannot be called. Use PhpArray::fromFile()');
    }
}