class Doctrine_Lib (View source)

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

Methods

static string
getRecordStateAsString(integer $state)

Generates a human readable representation of a record's state.

static string
getRecordAsString(Doctrine_Record $record)

Dumps a record.

static string
getConnectionStateAsString(integer $state)

Generates a human readable representation of a connection's state.

static string
getConnectionAsString(Doctrine_Connection $connection)

Generates a string representation of a connection.

static string
getTableAsString(Doctrine_Table $table)

Generates a string representation of a table.

static string
formatSql(string $sql)

Generates a colored sql query.

static string
getCollectionAsString(Doctrine_Collection $collection)

Generates a string representation of a collection.

static 
arrayDeepMerge()

No description

static boolean
makeDirectories(string $path, integer $mode = 0777)

Makes the directories for a path recursively.

static boolean
removeDirectories(string $folderPath)

Removes a non empty directory.

static 
copyDirectory(string $source, string $dest)

Copy all directory content in another one.

static boolean
isValidClassName($className)

Checks for a valid class name for Doctrine coding standards.

Details

static string getRecordStateAsString(integer $state)

Generates a human readable representation of a record's state.

This method translates a Doctrine_Record state (integer constant) in an english string.

Parameters

integer $state the state of record

Return Value

string description of given state

See also

Doctrine_Record::STATE_* constants

static string getRecordAsString(Doctrine_Record $record)

Dumps a record.

This method returns an html representation of a given record, containing keys, state and data.

Parameters

Doctrine_Record $record

Return Value

string

static string getConnectionStateAsString(integer $state)

Generates a human readable representation of a connection's state.

This method translates a Doctrine_Connection state (integer constant) in a english description.

Parameters

integer $state state of the connection as a string

Return Value

string

See also

Doctrine_Transaction::STATE_* constants

static string getConnectionAsString(Doctrine_Connection $connection)

Generates a string representation of a connection.

This method returns an html dump of a connection, containing state, open transactions and loaded tables.

Parameters

Doctrine_Connection $connection

Return Value

string

static string getTableAsString(Doctrine_Table $table)

Generates a string representation of a table.

This method returns an html dump of a table, containing component name and table physical name.

Parameters

Doctrine_Table $table

Return Value

string

static string formatSql(string $sql)

Generates a colored sql query.

This methods parses a plain text query and generates the html needed for visual formatting.

Parameters

string $sql plain text query

Return Value

string the formatted sql code

static string getCollectionAsString(Doctrine_Collection $collection)

Generates a string representation of a collection.

This method returns an html dump of a collection of records, containing all data.

Parameters

Doctrine_Collection $collection

Return Value

string

static arrayDeepMerge()

static boolean makeDirectories(string $path, integer $mode = 0777)

Makes the directories for a path recursively.

This method creates a given path issuing mkdir commands for all folders that do not exist yet. Equivalent to 'mkdir -p'.

Parameters

string $path
integer $mode an integer (octal) chmod parameter for the created directories

Return Value

boolean true if succeeded

static boolean removeDirectories(string $folderPath)

Removes a non empty directory.

This method recursively removes a directory and all its descendants. Equivalent to 'rm -rf'.

Parameters

string $folderPath

Return Value

boolean success of the operation

static copyDirectory(string $source, string $dest)

Copy all directory content in another one.

This method recursively copies all $source files and subdirs in $dest. If $source is a file, only it will be copied in $dest.

Parameters

string $source a directory path
string $dest a directory path

static boolean isValidClassName($className)

Checks for a valid class name for Doctrine coding standards.

This methods tests if $className is a valid class name for php syntax and for Doctrine coding standards. $className must use camel case naming and underscores for directory separation.

Parameters

$className

Return Value

boolean