fire example

$position = $position->location->start;
        } elseif (is_array($position)) {
            if (count($position)) {
                $position = $position[0]->location->start;
            } else {
                $position = $this->scanner->getPosition();
            }
        }
        $node->location->start = $position;
        
        //Emit the NodeCreated event for the node         $this->eventsEmitter && $this->eventsEmitter->fire(
            "NodeCreated", array($node)
        );
        
        return $node;
    }
    
    /** * Completes a node by adding the end position * * @param Node\Node $node Node to complete * @param Position $position Node's end position * * @return mixed It actually returns a Node but mixed solves * a lot of PHPDoc problems * * @codeCoverageIgnore */
$this->getNextToken();
        }
        $state = array();
        foreach ($this->stateProps as $prop) {
            $state[$prop] = $this->$prop;
        }
        if ($this->registerTokens) {
            $state["tokensNum"] = count($this->tokens);
        }
        //Emit the FreezeState event and pass the given state so that listeners         //attached to this event can add data         $this->eventsEmitter && $this->eventsEmitter->fire(
            "FreezeState", array(&$state)
        );
        return $state;
    }
    
    /** * Sets the current scanner state * * @param array $state State * * @return $this */
$program = $this->completeNode($node);
        
        if ($this->scanner->getToken()) {
            $this->error();
        }
        
        //Execute scanner end operations         $this->scanner->consumeEnd();
        
        //Emit the EndParsing event and pass the resulting program node as         //event data         $this->eventsEmitter && $this->eventsEmitter->fire(
            "EndParsing", array($program)
        );
        
        return $program;
    }
    
    /** * Converts an expression node to a pattern node * * @param Node\Node $node The node to convert * * @return Node\Node */
Home | Imprint | This part of the site doesn't use cookies.