Overview

Namespaces

  • Alchemy
    • core
      • query
      • schema
    • dialect
    • engine
    • orm
    • tests
    • util
      • promise
  • PHP

Classes

  • DataTypeLexer
  • Monad
  • Overview
  • Namespace
  • Class
  • Tree

Class DataTypeLexer

Parse a data type definition into it's various components. For example: >>> $type = new DataTypeLexer("Integer(11, primary_key = true)"); >>> $type->getType(); "Integer" >>> $type->getArgs(); array(11, "primary_key" => true)

Namespace: Alchemy\util
Located at alchemy/util/DataTypeLexer.php
Methods summary
public
# __construct( string $def )

Object Constructor

Object Constructor

Parameters

$def
string
$def Data Type Definition
public array
# getArgs( )

Get the positional arguments in the definition

Get the positional arguments in the definition

Returns

array
public string
# getType( )

Get the Data Type form the definition

Get the Data Type form the definition

Returns

string
protected array
# lexString( string $def )

Lexically analyze the given string into a stream of tokens.

Lexically analyze the given string into a stream of tokens.

Parameters

$def
string
$def

Returns

array
protected mixed
# normalizeToken( string $token )

Normalize the given token into PHP values

Normalize the given token into PHP values

Parameters

$token
string
$token

Returns

mixed
protected
# parse( string $def )

Lex and parse the given token, saving it's data into the object

Lex and parse the given token, saving it's data into the object

Parameters

$def
string
$def
Constants summary
string T_EQUALS '='
#
API documentation generated by ApiGen 2.8.0