creole.util.sql
[ class tree: creole.util.sql ] [ index: creole.util.sql ] [ all elements ]

Class: SQLStatementExtractor

Source Location: /creole/util/sql/SQLStatementExtractor.php

Class Overview


Static class for extracting SQL statements from a string or file.


Author(s):

Version:

  • $Revision: 1.5 $

Variables

Methods



Class Details

[line 29]
Static class for extracting SQL statements from a string or file.



Tags:

version:  $Revision: 1.5 $
author:  Hans Lellelid <hans@xmpl.org>


[ Top ]


Class Variables

$delimiter =  ';'

[line 31]



Tags:

static:  
access:  protected

Type:   mixed


[ Top ]



Class Methods


method endsWith [line 124]

boolean endsWith( string $check, string $string)

Tests if a string ends with a given string.



Tags:

return:  True if $string ends with $check, or they are equal, or $check is empty.
static:  
access:  protected


Parameters:

string   $check   The substring to check.
string   $string   The string to check in (haystack).

[ Top ]

method extract [line 53]

array extract( mixed $buffer, string $txt)

Extract statements from string.



Tags:

static:  
access:  public


Parameters:

string   $txt  

[ Top ]

method extractFile [line 39]

array extractFile( string $filename)

Get SQL statements from file.



Tags:

return:  SQL statements
static:  
access:  public


Parameters:

string   $filename   Path to file to read.

[ Top ]

method extractStatements [line 63]

string extractStatements( array $lines)

Extract SQL statements from array of lines.



Tags:

static:  
access:  protected


Parameters:

array   $lines   Lines of the read-in file.

[ Top ]

method getLines [line 159]

array getLines( mixed $buffer, string $filename)

Convert string buffer into array of lines.



Tags:

return:  string[] lines of file.
static:  
access:  protected


Parameters:

string   $filename  

[ Top ]

method startsWith [line 110]

boolean startsWith( string $check, string $string)

Tests if a string starts with a given string.



Tags:

return:  True if $string starts with $check, or they are equal, or $check is empty.
static:  
access:  protected


Parameters:

string   $check   The substring to check.
string   $string   The string to check in (haystack).

[ Top ]

method substring [line 136]

void substring( mixed $string, mixed $startpos, [mixed $endpos = -1])

a natural way of getting a subtring, php's circular string buffer and strange

return values suck if you want to program strict as of C or friends




Tags:

static:  
access:  protected


[ Top ]


Documentation generated on Mon, 23 Aug 2004 21:53:19 -0400 by phpDocumentor 1.3.0RC3