Class: Doctrine_Lib

Source Location: /Doctrine/Lib.php

Class Doctrine_Lib

Class Overview

Doctrine_Lib has not commonly used static functions, mostly for debugging purposes

Located in /Doctrine/Lib.php [line 32]



		
				Author(s):
		
		
		
Information Tags:
Version:  $Revision: 1916 $
Link:  www.phpdoctrine.com
Since:  1.0
License:  LGPL

Methods

[ Top ]
Method Summary
static string   formatSql()  
static string   getCollectionAsString()   returns a string representation of Doctrine_Collection object
static string   getCollectionAsXml()   Return an collection of records as XML.
static string   getConnectionAsString()   returns a string representation of Doctrine_Connection object
static void   getConnectionStateAsString()   getStateAsString
static string   getRecordAsString()   returns a string representation of Doctrine_Record object
static string   getRecordAsXml()   Return a recrd as XML.
static string   getRecordStateAsString()  
static string   getTableAsString()   returns a string representation of Doctrine_Table object
static void   plurelize()  

[ Top ]
Methods
static method formatSql  [line 224]

  static string formatSql( $sql  )

Parameters:
   $sql: 

API Tags:
Access:  public


[ Top ]
static method getCollectionAsString  [line 250]

  static string getCollectionAsString( Doctrine_Collection $collection  )

returns a string representation of Doctrine_Collection object

Parameters:
Doctrine_Collection   $collection: 

API Tags:
Access:  public


[ Top ]
static method getCollectionAsXml  [line 86]

  static string getCollectionAsXml( Doctrine_Collection $collection, [ $incomming_xml = null], SimpleXMLElement $xml  )

Return an collection of records as XML.

Parameters:
Doctrine_Collection   $collection: 
SimpleXMLElement   $xml: 
SimpleXMLElement   $incomming_xml: 

API Tags:
Return:  Xml as string
See:  getRecordAsXml for options to set in the record class to control this.
Access:  public


[ Top ]
static method getConnectionAsString  [line 196]

  static string getConnectionAsString( Doctrine_Connection $connection  )

returns a string representation of Doctrine_Connection object

Parameters:
Doctrine_Connection   $connection: 

API Tags:
Access:  public


[ Top ]
static method getConnectionStateAsString  [line 177]

  static void getConnectionStateAsString( integer $state  )

getStateAsString

returns a given connection state as string

Parameters:
integer   $state:  connection state

API Tags:
Access:  public


[ Top ]
static method getRecordAsString  [line 64]

  static string getRecordAsString( Doctrine_Record $record  )

returns a string representation of Doctrine_Record object

Parameters:
Doctrine_Record   $record: 

API Tags:
Access:  public


[ Top ]
static method getRecordAsXml  [line 128]

  static string getRecordAsXml( Doctrine_Record $record, [ $incomming_xml = NULL], SimpleXMLElement $xml  )

Return a recrd as XML.

In order to control how this is done set the "xml" option in a record. This option is an array that has the keys "ignore_fields" and "include_relations". Both of these are arrays that list the name of fields/relations to include/process.

If you want to insert this xml as a part inside another xml send a SimpleXMLElement to the function. Because of the nature of SimpleXML the content you add to this element will be avilable after the function is complete.

Parameters:
Doctrine_Record   $record: 
SimpleXMLElement   $xml: 
SimpleXMlElement   $incomming_xml: 

API Tags:
Return:  Xml as string
Access:  public


[ Top ]
static method getRecordStateAsString  [line 39]

  static string getRecordStateAsString( integer $state  )

Parameters:
integer   $state:  the state of record

API Tags:
Return:  string representation of given state
See:  Doctrine_Record::STATE_* constants
Access:  public


[ Top ]
static method getTableAsString  [line 213]

  static string getTableAsString( Doctrine_Table $table  )

returns a string representation of Doctrine_Table object

Parameters:
Doctrine_Table   $table: 

API Tags:
Access:  public


[ Top ]
static method plurelize  [line 109]

  static void plurelize( $string  )

Parameters:
   $string: 

API Tags:
Access:  public


[ Top ]