コード例 #1
0
ファイル: Tokenizer.php プロジェクト: laborci/PhlexDev
 function run()
 {
     $string = '';
     while ($this->pointer < strlen($this->string)) {
         $result = $this->stateObject->transition();
         if ($result) {
             $this->stateObject->evaluate($string);
             $this->stateObject = $result;
             $this->stateObject->t = $this;
             $this->pointer += $this->stateObject->shiftPointerBy;
             $this->state = $this->state = \Phlex\Tool\StringTool::getPart('\\', get_class($this->stateObject), -1);
             $string = '';
         } else {
             $string .= $this->string[$this->pointer];
             $this->pointer++;
         }
     }
     return $this->items;
 }
コード例 #2
0
ファイル: Data.php プロジェクト: laborci/PhlexDev
 function getAsBoolean($key)
 {
     return $this->has($key) ? StringTool::parseBool($this->getKey($key)) : null;
 }