Class Xyster_Orm_Xsql

Description

A helper for XSQL syntax

  • copyright: Copyright (c) 2007-2008 Irrational Logic (http://irrationallogic.net)
  • license: New BSD License

Located in /Orm/Xsql.php (line 28)


	
			
Class Constant Summary
 PARENTH_QUOTE_REGEX = '/(?<![\w\d])(\(((?:"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"|[^()])|(?1))+\))/m'
Method Summary
static boolean isLiteral (string $lit)
static boolean isMethodCall (string $field, [ &$matches = array()])
static boolean isValidField (string $field)
static array matchGroups (string $string)
static array splitArrow (string $haystack)
static array splitComma (string $haystack)
static array splitSpace (string $haystack)
static boolean _checkMethodParameters (array $params)
Methods
static method isLiteral (line 55)

Checks a literal for syntactical correctness

  • access: public
static boolean isLiteral (string $lit)
  • string $lit
static method isMethodCall (line 44)

Checks if a literal is a method call

  • access: public
static boolean isMethodCall (string $field, [ &$matches = array()])
  • string $field
  • array &$matches
static method isValidField (line 73)

Checks a reference for syntactical correctness

  • access: public
static boolean isValidField (string $field)
  • string $field
static method matchGroups (line 104)

Match nested parentheses groups not inside of double-quotes

This method will find all balanced parentheses not inside of double quotes. It also respects escaped double quotes (i.e. with a preceding backslash).

  • todo: make this work with top-level strings with parenths in them
  • access: public
static array matchGroups (string $string)
  • string $string
static method splitArrow (line 125)

Splits a string on the arrow ('->')

  • access: public
static array splitArrow (string $haystack)
  • string $haystack
static method splitComma (line 136)

Splits a string on the comma (',')

  • access: public
static array splitComma (string $haystack)
  • string $haystack
static method splitSpace (line 147)

Splits a string on the space (' ')

  • access: public
static array splitSpace (string $haystack)
  • string $haystack
static method _checkMethodParameters (line 158)

Checks method parameters for syntactical correctness

  • access: protected
static boolean _checkMethodParameters (array $params)
  • array $params
Class Constants
PARENTH_QUOTE_REGEX = '/(?<![\w\d])(\(((?:"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"|[^()])|(?1))+\))/m' (line 36)

Used for matching parenthesis groups not inside quotes

It works, but this still matches parentheses inside quotes that aren't in parentheses.

Documentation generated on Mon, 19 May 2008 17:07:44 -0400 by phpDocumentor 1.4.2