Prado\I18N\core\Gettext\TGettext::fromArray PHP 메소드

fromArray() 공개 메소드

Assigns meta info and strings from an array of a structure like that: array( 'meta' => array( 'Content-Type' => 'text/plain; charset=iso-8859-1', 'Last-Translator' => 'Michael Wallner ', 'PO-Revision-Date' => date('Y-m-d H:iO'), 'Language-Team' => 'German ', ), 'strings' => array( 'All rights reserved' => 'Alle Rechte vorbehalten', 'Welcome' => 'Willkommen', ... ) )
또한 보기: toArray()
public fromArray ( array $array ) : boolean
$array array
리턴 boolean
    function fromArray($array)
    {
        if (!array_key_exists('strings', $array)) {
            if (count($array) != 2) {
                return false;
            } else {
                list($this->meta, $this->strings) = $array;
            }
        } else {
            $this->meta = @$array['meta'];
            $this->strings = @$array['strings'];
        }
        return true;
    }