protected function getTokenFormatter($token)
    {
        $formatters = $this->getTokenFormatters();

        if (!array_key_exists($token, $formatters)) {
            $message = "The class %s does not know how to format the %s token\n".
                       "Have you added it in the getTokenFormatters() method?";

            throw new Exception(sprintf($message, get_called_class(), $token));
        }

        return $formatters[$token];
    }
protected function getTokenFormatter($token)
    {
        $formatters = $this->getTokenFormatters();

        if (!array_key_exists($token, $formatters)) {
            $message = "The class %s does not know how to format the %s token\n".
                       "Have you added it in the getTokenFormatters() method?";

            throw new Exception(sprintf($message, get_called_class(), $token));
        }

        return $formatters[$token];
    }
protected function getTokenFormatter ( $ token ) { $ formatters = $ this -> getTokenFormatters ( ) ; if ( ! array_key_exists ( $ token , $ formatters ) ) { $ message = "The class %s does not know how to format the %s token\n" . "Have you added it in the getTokenFormatters() method?" ; throw new Exception ( sprintf ( $ message , get_called_class ( ) , $ token ) ) ; } return $ formatters [ $ token ] ; }
Returns the formatter for a particular token.

@param  string $token
@return Array
@throws string
Returns the formatter for a particular token .