Overview

Namespaces

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

Classes

  • ANSICompiler
  • Compiler
  • MySQLCompiler
  • SQLiteCompiler
  • Overview
  • Namespace
  • Class
  • Tree

Class Compiler

Direct known subclasses

Alchemy\dialect\ANSICompiler

Indirect known subclasses

Alchemy\dialect\MySQLCompiler, Alchemy\dialect\SQLiteCompiler
Namespace: Alchemy\dialect
Located at alchemy/dialect/Compiler.php
Methods summary
public
# __construct( mixed $config = array() )
public array|string
# compile( array|Expression $obj = null, array $config = null )

Compile an Expression or array of Expressions into a string.

Compile an Expression or array of Expressions into a string.

Parameters

$obj
array|Expression
$obj object(s) to compile
$config
array
$config temporary config overrides

Returns

array|string
compiled result(s)
public string
# format( string $format = '', array $subject = '' )

Apply the special Compiler-format to an array of strings (recursive). Variardic formatting is done with %/<subformat>/<delimiter>/, which applies a format & implode to the remainder of the elements, if any (you may use any punctuation mark in place of '/'). <subformat> may contain recursive tokens. It is your responsibility to make sure $format and $subject make sense to use together.

Apply the special Compiler-format to an array of strings (recursive). Variardic formatting is done with %/<subformat>/<delimiter>/, which applies a format & implode to the remainder of the elements, if any (you may use any punctuation mark in place of '/'). <subformat> may contain recursive tokens. It is your responsibility to make sure $format and $subject make sense to use together.

Ex: "%s %s (%4/+%s/, /)" * [A, B, C, D, E] = "A B (D, E)" Ex: "%2$s (%2$1/+%s/, /)" * [[A, B, C], D] = "D (A, B, C)"

Parameters

$format
string
$format
$subject
array
$subject

Returns

string
public
# getConfig( mixed $key )
protected
# getFunction( mixed $obj, mixed $tag = '', mixed $prefix = '', mixed $strict = false )
public
# popConfig( )
public
# pushConfig( mixed $config )
protected
# map( mixed $method, mixed $objs )
Properties summary
protected static string $default_tag 'sql.compile'
#
protected array $defaults array()
#
API documentation generated by ApiGen 2.8.0