getType() public method

public getType ( ) : string
return string
コード例 #1
0
 /**
  * @inheritdoc
  */
 public function canParse(Token $token) : bool
 {
     return $token->getType() === TokenType::LIST_REFERENCE_TYPE;
 }
コード例 #2
0
 /**
  * @inheritdoc
  */
 public function canParse(Token $token) : bool
 {
     return $token->getType() === TokenType::DYNAMIC_ARRAY_TYPE;
 }
コード例 #3
0
ファイル: IdentityTokenParser.php プロジェクト: nelmio/alice
 /**
  * @inheritdoc
  */
 public function canParse(Token $token) : bool
 {
     return $token->getType() === TokenType::IDENTITY_TYPE;
 }
コード例 #4
0
 /**
  * @inheritdoc
  */
 public function canParse(Token $token) : bool
 {
     return $token->getType() === TokenType::FUNCTION_TYPE;
 }
コード例 #5
0
ファイル: StringTokenParser.php プロジェクト: nelmio/alice
 /**
  * @inheritdoc
  */
 public function canParse(Token $token) : bool
 {
     return $token->getType() === TokenType::STRING_TYPE;
 }
コード例 #6
0
 public static function createForUnparsableToken(Token $token, int $code = 0, \Throwable $previous = null) : ParseException
 {
     return new ParseException(sprintf('Could not parse the token "%s" (type: %s).', $token->getValue(), $token->getType()), $code, $previous);
 }
コード例 #7
0
ファイル: VariableTokenParser.php プロジェクト: nelmio/alice
 /**
  * @inheritdoc
  */
 public function canParse(Token $token) : bool
 {
     return $token->getType() === TokenType::VARIABLE_TYPE;
 }
コード例 #8
0
ファイル: ParameterTokenParser.php プロジェクト: nelmio/alice
 /**
  * @inheritdoc
  */
 public function canParse(Token $token) : bool
 {
     return $token->getType() === TokenType::PARAMETER_TYPE;
 }
コード例 #9
0
 /**
  * @inheritdoc
  */
 public function canParse(Token $token) : bool
 {
     return TokenType::ESCAPED_VALUE_TYPE === $token->getType();
 }