private function findMatchingToken($input)
    {
        // Check with all tokenDefinitions
        foreach ($this->tokenDefinitions as $tokenDefinition) {
            $token = $tokenDefinition->match($input);

            // Return the first token that was matched.
            if ($token) {
                return $token;
            }
        }

        // Return null if no tokens were matched.

        return null;
    }
private function findMatchingToken($input)
    {
        // Check with all tokenDefinitions
        foreach ($this->tokenDefinitions as $tokenDefinition) {
            $token = $tokenDefinition->match($input);

            // Return the first token that was matched.
            if ($token) {
                return $token;
            }
        }

        // Return null if no tokens were matched.

        return null;
    }
private function findMatchingToken ( $ input ) { // Check with all tokenDefinitions foreach ( $ this -> tokenDefinitions as $ tokenDefinition ) { $ token = $ tokenDefinition -> match ( $ input ) ; // Return the first token that was matched. if ( $ token ) { return $ token ; } } // Return null if no tokens were matched. return null ; }
Find a matching token at the begining of the provided input.

@retval Token|null Matched token
@param string $input
Find a matching token at the begining of the provided input .