src/Peach/DT/SimpleFormat.php
private function interpret($text)
    {
        $input       = $text;
        $result      = new ArrayMap();
        $matched     = null;
        foreach ($this->context as $part) {
            $pattern = $this->getPatternByPart($part);
            $matched = $pattern->match($input);
            if ($matched === null) {
                throw $this->createFormatException($input, $this->format);
            }
            $pattern->apply($result, $matched);
            $input = substr($input, strlen($matched));
        }
        return $result;
    }
private function interpret($text)
    {
        $input       = $text;
        $result      = new ArrayMap();
        $matched     = null;
        foreach ($this->context as $part) {
            $pattern = $this->getPatternByPart($part);
            $matched = $pattern->match($input);
            if ($matched === null) {
                throw $this->createFormatException($input, $this->format);
            }
            $pattern->apply($result, $matched);
            $input = substr($input, strlen($matched));
        }
        return $result;
    }
指定されたテキストを構文解析します.

@param  string $text 解析対象の文字列
@return ArrayMap     構文解析した結果