SourceForge.net LogoPHPGallue
[ class tree: libbase ] [ index: libbase ] [ all elements ]

Class: GALOrder

Source Location: /libbase/table.inc.php

Class Overview


Simple class to create SQL "ORDER BY" statements.


Methods



Class Details

[line 315]
Simple class to create SQL "ORDER BY" statements.

This class doesn't perform validity or security checks, but just handles an array of strings which is imploded with ", " and prepended by " ORDER BY " in __toString(). It is introduced to make it possible to prepend order criteria to a given ORDER statement without hacking. As in most cases field names are string constants, a more complex class seems unnecessary overhead to me.




[ Top ]


Class Methods


constructor __construct [line 322]

GALOrder __construct( string $criterium,...)

Construct from a list of order criteria.



Tags:

access:  public


Parameters:

string   $criterium,...   Unlimited number of order criteria (plain strings).

[ Top ]

method append [line 330]

void append( string $string,...)

Append order criteria to this statement.



Tags:

access:  public


Parameters:

string   $string,...   Unlimited number of order criteria (plain strings).

[ Top ]

method prepend [line 338]

void prepend( string $string,...)

Prepend order criteria to this statement.



Tags:

access:  public


Parameters:

string   $string,...   Unlimited number of order criteria (plain strings).

[ Top ]

method __toString [line 346]

string __toString( )

SQL string representation of this ORDER statement.



Tags:

return:  "' ORDER BY '.join(', ', $this->items).' '"
access:  public


[ Top ]


Documentation generated on Wed, 16 Aug 2006 15:36:46 +0200 by phpDocumentor 1.3.0RC6