Class: Doctrine

Source Location: /Doctrine.php

Class Doctrine

Class Overview

Doctrine the base class of Doctrine framework

Located in /Doctrine.php [line 35]



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

Properties

Methods

[ Top ]
Constant Summary
ATTR_ACCESSORS  
ATTR_ACCESSOR_PREFIX_GET  
ATTR_ACCESSOR_PREFIX_SET  
ATTR_AUTOCOMMIT   PDO derived attributes
ATTR_AUTO_LENGTH_VLD  
ATTR_AUTO_TYPE_VLD  
ATTR_BATCH_SIZE  
ATTR_CACHE  
ATTR_CACHE_LIFESPAN  
ATTR_CASE  
ATTR_CLIENT_VERSION  
ATTR_CMPNAME_FORMAT  
ATTR_COLL_KEY  
ATTR_COLL_LIMIT  
ATTR_CONNECTION_STATUS  
ATTR_CREATE_TABLES  
ATTR_CURSOR  
ATTR_CURSOR_NAME  
ATTR_DBNAME_FORMAT  
ATTR_DECIMAL_PLACES  
ATTR_DEFAULT_SEQUENCE  
ATTR_DEFAULT_TABLE_TYPE  
ATTR_DEF_TABLESPACE  
ATTR_DEF_TEXT_LENGTH  
ATTR_DEF_VARCHAR_LENGTH  
ATTR_DRIVER_NAME  
ATTR_EMULATE_DATABASE  
ATTR_ERRMODE  
ATTR_EXPORT  
ATTR_FETCHMODE   TODO: REMOVE THE FOLLOWING CONSTANTS AND UPDATE THE DOCS !
ATTR_FETCH_CATALOG_NAMES  
ATTR_FETCH_TABLE_NAMES  
ATTR_FIELD_CASE  
ATTR_IDXNAME_FORMAT  
ATTR_LISTENER   Doctrine constants
ATTR_LOAD_REFERENCES  
ATTR_LOCKMODE  
ATTR_MAX_COLUMN_LEN  
ATTR_NAME_PREFIX  
ATTR_NS_GAP_DECREASE_EXP  
ATTR_NS_GAP_SIZE  
ATTR_NS_ROOT_COLUMN_NAME   NESTED SET CONSTANTS
ATTR_ORACLE_NULLS  
ATTR_PERSISTENT  
ATTR_PORTABILITY  
ATTR_PREFETCH  
ATTR_QUERY_LIMIT  
ATTR_QUOTE_IDENTIFIER  
ATTR_RECORD_LISTENER  
ATTR_SEQCOL_NAME  
ATTR_SEQNAME_FORMAT  
ATTR_SERVER_INFO  
ATTR_SERVER_VERSION  
ATTR_STATEMENT_CLASS  
ATTR_STRINGIFY_FETCHES  
ATTR_TBLCLASS_FORMAT  
ATTR_THROW_EXCEPTIONS  
ATTR_TIMEOUT  
ATTR_VLD  
CASE_LOWER   PDO derived constants
CASE_NATURAL  
CASE_UPPER  
CURSOR_FWDONLY  
CURSOR_SCROLL  
ERR   ERROR CONSTANTS
ERRMODE_EXCEPTION  
ERRMODE_SILENT  
ERRMODE_WARNING  
ERR_ACCESS_VIOLATION  
ERR_ALREADY_EXISTS  
ERR_CANNOT_ALTER  
ERR_CANNOT_CREATE  
ERR_CANNOT_DELETE  
ERR_CANNOT_DROP  
ERR_CANNOT_REPLACE  
ERR_CLASS_NAME  
ERR_CONNECT_FAILED  
ERR_CONSTRAINT  
ERR_CONSTRAINT_NOT_NULL  
ERR_DEADLOCK  
ERR_DIVZERO  
ERR_EXTENSION_NOT_FOUND  
ERR_INSUFFICIENT_DATA  
ERR_INVALID  
ERR_INVALID_DATE  
ERR_INVALID_DSN  
ERR_INVALID_NUMBER  
ERR_LOADMODULE  
ERR_MANAGER  
ERR_MANAGER_PARSE  
ERR_MISMATCH  
ERR_NEED_MORE_DATA  
ERR_NODBSELECTED  
ERR_NOSUCHDB  
ERR_NOSUCHFIELD  
ERR_NOSUCHTABLE  
ERR_NOT_CAPABLE  
ERR_NOT_FOUND  
ERR_NOT_LOCKED  
ERR_SYNTAX  
ERR_TRUNCATED  
ERR_UNSUPPORTED  
ERR_VALUE_COUNT_ON_ROW  
EXPORT_ALL   export all
EXPORT_CONSTRAINTS   export constraints
EXPORT_NONE   turns of exporting
EXPORT_TABLES   export tables
FETCH_ARRAY   FETCH ARRAY
FETCH_ASSOC  
FETCH_BATCH   BATCH FETCHING
FETCH_BOTH  
FETCH_BOUND  
FETCH_CLASS  
FETCH_CLASSTYPE  
FETCH_COLUMN  
FETCH_FUNC  
FETCH_GROUP  
FETCH_IMMEDIATE   IMMEDIATE FETCHING
FETCH_INTO  
FETCH_LAZY  
FETCH_LAZY_OFFSET   LAZY OFFSET FETCHING
FETCH_NAMED  
FETCH_NUM  
FETCH_OBJ  
FETCH_OFFSET   LAZY FETCHING
FETCH_ORI_ABS  
FETCH_ORI_FIRST  
FETCH_ORI_LAST  
FETCH_ORI_NEXT  
FETCH_ORI_PRIOR  
FETCH_ORI_REL  
FETCH_RECORD   FETCH RECORD
FETCH_SERIALIZE  
FETCH_UNIQUE  
FETCH_VHOLDER   FETCH VALUEHOLDER
IDENTIFIER_AUTOINC   constant for auto_increment identifier
IDENTIFIER_COMPOSITE   constant for composite identifier
IDENTIFIER_NATURAL   constant for normal identifier
IDENTIFIER_SEQUENCE   constant for sequence identifier
LIMIT_RECORDS   constant for record limiting
LIMIT_ROWS   constant for row limiting
LOCK_OPTIMISTIC   mode for optimistic locking
LOCK_PESSIMISTIC   mode for pessimistic locking
NULL_EMPTY_STRING  
NULL_NATURAL  
NULL_TO_STRING  
PARAM_BOOL  
PARAM_INPUT_OUTPUT  
PARAM_INT  
PARAM_LOB  
PARAM_NULL  
PARAM_STMT  
PARAM_STR  
PORTABILITY_ALL   Portability: turn on all portability features.
PORTABILITY_DELETE_COUNT   Portability: force reporting the number of rows deleted.
PORTABILITY_EMPTY_TO_NULL   Portability: convert empty values to null strings in data output by query*() and fetch*().
PORTABILITY_EXPR   Portability: makes Doctrine_Expression throw exception for unportable RDBMS expressions
PORTABILITY_FIX_ASSOC_FIELD_NAMES   Portability: removes database/table qualifiers from associative indexes
PORTABILITY_FIX_CASE   Portability: convert names of tables and fields to case defined in the "field_case" option when using the query*(), fetch*() methods.
PORTABILITY_NONE   Portability: turn off all portability features.
PORTABILITY_RTRIM   Portability: right trim the data output by query*() and fetch*().

[ Top ]
Property Summary
static string   $path  
static boolean   $_debug  

[ Top ]
Method Summary
static boolean   autoload()   simple autoload function returns true if the class was loaded, otherwise false
static string   classify()   returns class name from table name
static void   compile()   compile
static void   debug()  
static void|string   dump()   dump
static void   exportSchema()   exportSchema method for exporting Doctrine_Record classes to a schema
static void   exportSql()   exportSql method for exporting Doctrine_Record classes to a schema
static string   getPath()   getPath returns the doctrine root
static boolean   importSchema()   importSchema method for importing existing schema to Doctrine_Record classes
static boolean   isValidClassname()   checks for valid class name (uses camel case and underscores)
static void   loadAll()   loadAll loads all runtime classes
static string   tableize()   returns table name from class name
Doctrine   __construct()   constructor

[ Top ]
Properties
static string   $path [line 370]
API Tags:
Access:  private


[ Top ]
static boolean   $_debug = false [line 374]
API Tags:
Access:  private


[ Top ]
Methods
static method autoload  [line 464]

  static boolean autoload( string $classname  )

simple autoload function returns true if the class was loaded, otherwise false

Parameters:
string   $classname: 

API Tags:
Access:  public


[ Top ]
static method classify  [line 529]

  static string classify( string $tablename  )

returns class name from table name

Parameters:
string   $tablename: 

API Tags:
Access:  public


[ Top ]
static method compile  [line 453]

  static void compile( [string $target = null]  )

compile

method for making a single file of most used doctrine runtime components including the compiled file instead of multiple files (in worst cases dozens of files) can improve performance by an order of magnitude

Parameters:
string   $target: 

API Tags:
Access:  public

Information Tags:
Throws:  Doctrine_Exception

[ Top ]
static method debug  [line 376]

  static void debug( [ $bool = null]  )

Parameters:
   $bool: 

API Tags:
Access:  public


[ Top ]
static method dump  [line 491]

  static void|string dump( mixed $var, [boolean $output = true]  )

dump

dumps a given variable

Parameters:
mixed   $var:  a variable of any type
boolean   $output:  whether to output the content

API Tags:
Access:  public


[ Top ]
static method exportSchema  [line 428]

  static void exportSchema( [string $directory = null]  )

exportSchema method for exporting Doctrine_Record classes to a schema

Parameters:
string   $directory: 

API Tags:
Access:  public


[ Top ]
static method exportSql  [line 438]

  static void exportSql( [string $directory = null]  )

exportSql method for exporting Doctrine_Record classes to a schema

Parameters:
string   $directory: 

API Tags:
Access:  public


[ Top ]
static method getPath  [line 389]

  static string getPath( )

getPath returns the doctrine root


API Tags:
Access:  public


[ Top ]
static method importSchema  [line 418]

  static boolean importSchema( string $directory, [ $databases = array()], array $info  )

importSchema method for importing existing schema to Doctrine_Record classes

Parameters:
string   $directory: 
array   $info: 
array   $databases: 

API Tags:
Access:  public


[ Top ]
static method isValidClassname  [line 539]

  static boolean isValidClassname( string $classname  )

checks for valid class name (uses camel case and underscores)

Parameters:
string   $classname: 

API Tags:
Access:  public


[ Top ]
static method loadAll  [line 402]

  static void loadAll( )

loadAll loads all runtime classes


API Tags:
Access:  public


[ Top ]
static method tableize  [line 519]

  static string tableize( string $classname  )

returns table name from class name

Parameters:
string   $classname: 

API Tags:
Access:  public


[ Top ]
Constructor __construct  [line 363]

  Doctrine __construct( )

constructor


API Tags:
Access:  public


[ Top ]
Constants
ATTR_ACCESSORS = 124 [line 183]

[ Top ]
ATTR_ACCESSOR_PREFIX_GET = 125 [line 184]

[ Top ]
ATTR_ACCESSOR_PREFIX_SET = 126 [line 185]

[ Top ]
ATTR_AUTOCOMMIT = 0 [line 126]

PDO derived attributes


[ Top ]
ATTR_AUTO_LENGTH_VLD = 110 [line 165]

[ Top ]
ATTR_AUTO_TYPE_VLD = 111 [line 166]

[ Top ]
ATTR_BATCH_SIZE = 119 [line 178]

[ Top ]
ATTR_CACHE = 150 [line 194]

[ Top ]
ATTR_CACHE_LIFESPAN = 151 [line 195]

[ Top ]
ATTR_CASE = 8 [line 134]

[ Top ]
ATTR_CLIENT_VERSION = 5 [line 131]

[ Top ]
ATTR_CMPNAME_FORMAT = 118 [line 155]

[ Top ]
ATTR_COLL_KEY = 108 [line 163]

[ Top ]
ATTR_COLL_LIMIT = 123 [line 182]

[ Top ]
ATTR_CONNECTION_STATUS = 7 [line 133]

[ Top ]
ATTR_CREATE_TABLES = 122 [line 181]

[ Top ]
ATTR_CURSOR = 10 [line 136]

[ Top ]
ATTR_CURSOR_NAME = 9 [line 135]

[ Top ]
ATTR_DBNAME_FORMAT = 117 [line 156]

[ Top ]
ATTR_DECIMAL_PLACES = 141 [line 159]

[ Top ]
ATTR_DEFAULT_SEQUENCE = 133 [line 172]

[ Top ]
ATTR_DEFAULT_TABLE_TYPE = 112 [line 167]

[ Top ]
ATTR_DEF_TABLESPACE = 115 [line 170]

[ Top ]
ATTR_DEF_TEXT_LENGTH = 113 [line 168]

[ Top ]
ATTR_DEF_VARCHAR_LENGTH = 114 [line 169]

[ Top ]
ATTR_DRIVER_NAME = 16 [line 142]

[ Top ]
ATTR_EMULATE_DATABASE = 116 [line 171]

[ Top ]
ATTR_ERRMODE = 3 [line 129]

[ Top ]
ATTR_EXPORT = 140 [line 158]

[ Top ]
ATTR_FETCHMODE = 118 [line 177]

TODO: REMOVE THE FOLLOWING CONSTANTS AND UPDATE THE DOCS !


[ Top ]
ATTR_FETCH_CATALOG_NAMES = 15 [line 141]

[ Top ]
ATTR_FETCH_TABLE_NAMES = 14 [line 140]

[ Top ]
ATTR_FIELD_CASE = 102 [line 151]

[ Top ]
ATTR_IDXNAME_FORMAT = 103 [line 152]

[ Top ]
ATTR_LISTENER = 100 [line 149]

Doctrine constants


[ Top ]
ATTR_LOAD_REFERENCES = 153 [line 196]

[ Top ]
ATTR_LOCKMODE = 120 [line 179]

[ Top ]
ATTR_MAX_COLUMN_LEN = 18 [line 144]

[ Top ]
ATTR_NAME_PREFIX = 121 [line 180]

[ Top ]
ATTR_NS_GAP_DECREASE_EXP = 132 [line 192]

[ Top ]
ATTR_NS_GAP_SIZE = 131 [line 191]

[ Top ]
ATTR_NS_ROOT_COLUMN_NAME = 130 [line 190]

NESTED SET CONSTANTS


[ Top ]
ATTR_ORACLE_NULLS = 11 [line 137]

[ Top ]
ATTR_PERSISTENT = 12 [line 138]

[ Top ]
ATTR_PORTABILITY = 106 [line 161]

[ Top ]
ATTR_PREFETCH = 1 [line 127]

[ Top ]
ATTR_QUERY_LIMIT = 109 [line 164]

[ Top ]
ATTR_QUOTE_IDENTIFIER = 101 [line 150]

[ Top ]
ATTR_RECORD_LISTENER = 154 [line 197]

[ Top ]
ATTR_SEQCOL_NAME = 105 [line 154]

[ Top ]
ATTR_SEQNAME_FORMAT = 104 [line 153]

[ Top ]
ATTR_SERVER_INFO = 6 [line 132]

[ Top ]
ATTR_SERVER_VERSION = 4 [line 130]

[ Top ]
ATTR_STATEMENT_CLASS = 13 [line 139]

[ Top ]
ATTR_STRINGIFY_FETCHES = 17 [line 143]

[ Top ]
ATTR_TBLCLASS_FORMAT = 119 [line 157]

[ Top ]
ATTR_THROW_EXCEPTIONS = 155 [line 198]

[ Top ]
ATTR_TIMEOUT = 2 [line 128]

[ Top ]
ATTR_VLD = 107 [line 162]

[ Top ]
CASE_LOWER = 2 [line 80]

PDO derived constants


[ Top ]
CASE_NATURAL = 0 [line 81]

[ Top ]
CASE_UPPER = 1 [line 82]

[ Top ]
CURSOR_FWDONLY = 0 [line 83]

[ Top ]
CURSOR_SCROLL = 1 [line 84]

[ Top ]
ERR = -1 [line 40]

ERROR CONSTANTS


[ Top ]
ERRMODE_EXCEPTION = 2 [line 85]

[ Top ]
ERRMODE_SILENT = 0 [line 86]

[ Top ]
ERRMODE_WARNING = 1 [line 87]

[ Top ]
ERR_ACCESS_VIOLATION = -27 [line 66]

[ Top ]
ERR_ALREADY_EXISTS = -5 [line 44]

[ Top ]
ERR_CANNOT_ALTER = -31 [line 70]

[ Top ]
ERR_CANNOT_CREATE = -15 [line 54]

[ Top ]
ERR_CANNOT_DELETE = -16 [line 55]

[ Top ]
ERR_CANNOT_DROP = -17 [line 56]

[ Top ]
ERR_CANNOT_REPLACE = -28 [line 67]

[ Top ]
ERR_CLASS_NAME = -36 [line 75]

[ Top ]
ERR_CONNECT_FAILED = -24 [line 63]

[ Top ]
ERR_CONSTRAINT = -3 [line 42]

[ Top ]
ERR_CONSTRAINT_NOT_NULL = -29 [line 68]

[ Top ]
ERR_DEADLOCK = -30 [line 69]

[ Top ]
ERR_DIVZERO = -13 [line 52]

[ Top ]
ERR_EXTENSION_NOT_FOUND = -25 [line 64]

[ Top ]
ERR_INSUFFICIENT_DATA = -35 [line 74]

[ Top ]
ERR_INVALID = -8 [line 47]

[ Top ]
ERR_INVALID_DATE = -12 [line 51]

[ Top ]
ERR_INVALID_DSN = -23 [line 62]

[ Top ]
ERR_INVALID_NUMBER = -11 [line 50]

[ Top ]
ERR_LOADMODULE = -34 [line 73]

[ Top ]
ERR_MANAGER = -32 [line 71]

[ Top ]
ERR_MANAGER_PARSE = -33 [line 72]

[ Top ]
ERR_MISMATCH = -7 [line 46]

[ Top ]
ERR_NEED_MORE_DATA = -20 [line 59]

[ Top ]
ERR_NODBSELECTED = -14 [line 53]

[ Top ]
ERR_NOSUCHDB = -26 [line 65]

[ Top ]
ERR_NOSUCHFIELD = -19 [line 58]

[ Top ]
ERR_NOSUCHTABLE = -18 [line 57]

[ Top ]
ERR_NOT_CAPABLE = -9 [line 48]

[ Top ]
ERR_NOT_FOUND = -4 [line 43]

[ Top ]
ERR_NOT_LOCKED = -21 [line 60]

[ Top ]
ERR_SYNTAX = -2 [line 41]

[ Top ]
ERR_TRUNCATED = -10 [line 49]

[ Top ]
ERR_UNSUPPORTED = -6 [line 45]

[ Top ]
ERR_VALUE_COUNT_ON_ROW = -22 [line 61]

[ Top ]
EXPORT_ALL = 3 [line 341]

export all


[ Top ]
EXPORT_CONSTRAINTS = 2 [line 337]

export constraints


[ Top ]
EXPORT_NONE = 0 [line 329]

turns of exporting


[ Top ]
EXPORT_TABLES = 1 [line 333]

export tables


[ Top ]
FETCH_ARRAY = 3 [line 261]

FETCH ARRAY


[ Top ]
FETCH_ASSOC = 2 [line 88]

[ Top ]
FETCH_BATCH = 1 [line 227]

BATCH FETCHING

mode for batch fetching


[ Top ]
FETCH_BOTH = 4 [line 89]

[ Top ]
FETCH_BOUND = 6 [line 90]

[ Top ]
FETCH_CLASS = 8 [line 91]

[ Top ]
FETCH_CLASSTYPE = 262144 [line 92]

[ Top ]
FETCH_COLUMN = 7 [line 93]

[ Top ]
FETCH_FUNC = 10 [line 94]

[ Top ]
FETCH_GROUP = 65536 [line 95]

[ Top ]
FETCH_IMMEDIATE = 0 [line 222]

IMMEDIATE FETCHING

mode for immediate fetching


[ Top ]
FETCH_INTO = 9 [line 96]

[ Top ]
FETCH_LAZY = 1 [line 97]

[ Top ]
FETCH_LAZY_OFFSET = 4 [line 237]

LAZY OFFSET FETCHING

mode for lazy offset fetching


[ Top ]
FETCH_NAMED = 11 [line 98]

[ Top ]
FETCH_NUM = 3 [line 99]

[ Top ]
FETCH_OBJ = 5 [line 100]

[ Top ]
FETCH_OFFSET = 3 [line 232]

LAZY FETCHING

mode for offset fetching


[ Top ]
FETCH_ORI_ABS = 4 [line 101]

[ Top ]
FETCH_ORI_FIRST = 2 [line 102]

[ Top ]
FETCH_ORI_LAST = 3 [line 103]

[ Top ]
FETCH_ORI_NEXT = 0 [line 104]

[ Top ]
FETCH_ORI_PRIOR = 1 [line 105]

[ Top ]
FETCH_ORI_REL = 5 [line 106]

[ Top ]
FETCH_RECORD = 2 [line 256]

FETCH RECORD

Specifies that the fetch method shall return Doctrine_Record objects as the elements of the result set.

This is the default fetchmode.


[ Top ]
FETCH_SERIALIZE = 524288 [line 107]

[ Top ]
FETCH_UNIQUE = 196608 [line 108]

[ Top ]
FETCH_VHOLDER = 1 [line 247]

FETCH VALUEHOLDER


[ Top ]
IDENTIFIER_AUTOINC = 1 [line 347]

constant for auto_increment identifier


[ Top ]
IDENTIFIER_COMPOSITE = 4 [line 359]

constant for composite identifier


[ Top ]
IDENTIFIER_NATURAL = 3 [line 355]

constant for normal identifier


[ Top ]
IDENTIFIER_SEQUENCE = 2 [line 351]

constant for sequence identifier


[ Top ]
LIMIT_RECORDS = 2 [line 212]

constant for record limiting


[ Top ]
LIMIT_ROWS = 1 [line 208]

constant for row limiting


[ Top ]
LOCK_OPTIMISTIC = 0 [line 317]

mode for optimistic locking


[ Top ]
LOCK_PESSIMISTIC = 1 [line 321]

mode for pessimistic locking


[ Top ]
NULL_EMPTY_STRING = 1 [line 109]

[ Top ]
NULL_NATURAL = 0 [line 110]

[ Top ]
NULL_TO_STRING = NULL [line 111]

[ Top ]
PARAM_BOOL = 5 [line 112]

[ Top ]
PARAM_INPUT_OUTPUT = -2147483648 [line 113]

[ Top ]
PARAM_INT = 1 [line 114]

[ Top ]
PARAM_LOB = 3 [line 115]

[ Top ]
PARAM_NULL = 0 [line 116]

[ Top ]
PARAM_STMT = 4 [line 117]

[ Top ]
PARAM_STR = 2 [line 118]

[ Top ]
PORTABILITY_ALL = 33 [line 308]

Portability: turn on all portability features.

API Tags:
See:  Doctrine::ATTR_PORTABILITY


[ Top ]
PORTABILITY_DELETE_COUNT = 4 [line 287]

Portability: force reporting the number of rows deleted.

API Tags:
See:  Doctrine::ATTR_PORTABILITY


[ Top ]
PORTABILITY_EMPTY_TO_NULL = 8 [line 293]

Portability: convert empty values to null strings in data output by query*() and fetch*().

API Tags:
See:  Doctrine::ATTR_PORTABILITY


[ Top ]
PORTABILITY_EXPR = 32 [line 303]

Portability: makes Doctrine_Expression throw exception for unportable RDBMS expressions

API Tags:
See:  Doctrine::ATTR_PORTABILITY


[ Top ]
PORTABILITY_FIX_ASSOC_FIELD_NAMES = 16 [line 298]

Portability: removes database/table qualifiers from associative indexes

API Tags:
See:  Doctrine::ATTR_PORTABILITY


[ Top ]
PORTABILITY_FIX_CASE = 1 [line 276]

Portability: convert names of tables and fields to case defined in the "field_case" option when using the query*(), fetch*() methods.

API Tags:
See:  Doctrine::ATTR_PORTABILITY


[ Top ]
PORTABILITY_NONE = 0 [line 270]

Portability: turn off all portability features.

API Tags:
See:  Doctrine::ATTR_PORTABILITY


[ Top ]
PORTABILITY_RTRIM = 2 [line 282]

Portability: right trim the data output by query*() and fetch*().

API Tags:
See:  Doctrine::ATTR_PORTABILITY


[ Top ]