Loading Please wait...

OrmDriver Class Reference
[Object-relational mapping.]

Inheritance diagram for OrmDriver:

Inheritance graph
[legend]

Public Member Functions

 connAlias ($conAliasName=null)
 qType ($qType)
 isConnected ()
 numRows ()
 affectedRows ()
 setCaller (&$caller)
 connect ()
 disConnect ()
 execute ()
 exportRaw ()

Data Fields

 $sql
 $afectedRows
 $numRows

Protected Member Functions

 pasteLex ($lex)

Protected Attributes

 $connected

Private Member Functions

 whereLexToStr ($whereLex)

Private Attributes

 $conn
 $connAlias = null
 $connData
 $res
 $qType
 $lex
 $caller

Detailed Description

Core Driver Class. all Driver Classes directly inherits it.

For internal use only.

you dont need to know much about this class if you are not extending Zigmoyd. e.g. If you are just using Zigmoyd you dont need to do much hassle with this class.

Definition at line 31 of file driver_core.php.


Member Function Documentation

OrmDriver::connAlias ( conAliasName = null  ) 

Set the Connection Alias name against which to connect.

Parameters:
$conAliasName string Connection Alias name.
Returns:
boolean

Definition at line 90 of file driver_core.php.

References perror().

Referenced by OrmDriver_mysql::connect().

00090                                         {
00091     if(is_null($conAliasName))return $this->connAlias;
00092     $path = ZIGROOT.DRS.Z_DIR_PROJECTS.DRS.Z_PROJECT_DIR.DRS.ZIGSETTINGSDIR.DRS.Z_DIR_ETC_CONF.DRS.$conAliasName.".con.ini.php";
00093     //$path = dirname(__FILE__)."/".$conAliasName.".con.ini.php";
00094     if(!file_exists($path)){
00095       print("<code>zigmoyd.orm.driver.core.connection</code>No such Connection file exists on ".$path);
00096       return false;
00097     }
00098     if(!is_readable($path)){
00099       perror("<code>zigmoyd.orm.driver.core.connection</code>Connection file exists on ".$path." but not readable Plese check the permission");
00100       return false;
00101     }
00102     $this->connData = parse_ini_file($path);
00103     $this->connAlias = $conAliasName;
00104     return false;
00105   }

Here is the call graph for this function:

OrmDriver::qType ( qType  ) 

Query Type.

Parameters:
$qType int Query type.

Definition at line 110 of file driver_core.php.

References $qType.

Referenced by OrmDriver_mysql::__generate().

00110                         {
00111     $this->qType = $qType;
00112   }

OrmDriver::pasteLex ( lex  )  [protected]

Pass/update lexims structure.

Parameters:
$lex array associative array of lexims.

Definition at line 118 of file driver_core.php.

References $lex.

00118                          {
00119     $this->lex = $lex;
00120   }

OrmDriver::isConnected (  ) 

Checks wheather connected or not.

Returns:
boolean

Definition at line 125 of file driver_core.php.

00125                         {
00126     return $this->connected;
00127   }

OrmDriver::numRows (  ) 

Number of rows in result set.

Returns:
int

Definition at line 132 of file driver_core.php.

00132                     {
00133     return $this->numRows;
00134   }

OrmDriver::affectedRows (  ) 

Number of rows affected due to update/insert/delete query.

Returns:
int

Definition at line 139 of file driver_core.php.

00139                          {
00140     return $this->afectedRows;
00141   }

OrmDriver::whereLexToStr ( whereLex  )  [private]

Converts Where Lexims to String Where Clause.

Parameters:
$whereLex array
Returns:
string

Definition at line 148 of file driver_core.php.

Referenced by OrmDriver_mysql::__generate().

00148                                    {
00149     $whereStr = '';
00150     $lineStr = array();
00151     foreach($whereLex as $whereObj){
00152       $value = ($whereObj->quote) ? "'$whereObj->value'" : $whereObj->value;
00153       $cnj = (count($lineStr) >= 1) ? $whereObj->cnj : "";
00154       $lineStr[] = trim("$cnj $whereObj->colName $whereObj->op $value");
00155     }
00156     return implode(" ", $lineStr);
00157   }

OrmDriver::setCaller ( &$  caller  ) 

send a reference to the called Object.

Parameters:
$caller zOrm_inc

Definition at line 162 of file driver_core.php.

References $caller.

00162                               {
00163     $this->caller = $caller;
00164   }

OrmDriver::connect (  ) 

Reimplemented in OrmDriver_mysql.

Definition at line 166 of file driver_core.php.

References perror().

00166                     {
00167     perror("<code>zigmoyd.orm.driver.core.connect()</code>The Driver Class Must override the connect() Method");
00168   }

Here is the call graph for this function:

OrmDriver::disConnect (  ) 

Reimplemented in OrmDriver_mysql.

Definition at line 169 of file driver_core.php.

References perror().

00169                        {
00170     perror("<code>zigmoyd.orm.driver.core.connect()</code>The Driver Class Must override the disConnect() Method");
00171   }

Here is the call graph for this function:

OrmDriver::execute (  ) 

Reimplemented in OrmDriver_mysql.

Definition at line 172 of file driver_core.php.

References perror().

00172                     {
00173     perror("<code>zigmoyd.orm.driver.core.connect()</code>The Driver Class Must override the execute() Method");
00174   }

Here is the call graph for this function:

OrmDriver::exportRaw (  ) 

Reimplemented in OrmDriver_mysql.

Definition at line 175 of file driver_core.php.

References perror().

00175                       {
00176     perror("<code>zigmoyd.orm.driver.core.connect()</code>The Driver Class Must override the exportRaw() Method");
00177   }

Here is the call graph for this function:


Field Documentation

OrmDriver::$conn [private]

Connection

Definition at line 36 of file driver_core.php.

OrmDriver::$connAlias = null [private]

Connection Alias Name

Definition at line 41 of file driver_core.php.

OrmDriver::$connData [private]

Connection Data

Definition at line 46 of file driver_core.php.

OrmDriver::$res [private]

Definition at line 50 of file driver_core.php.

OrmDriver::$sql

The SQL Query used

Definition at line 55 of file driver_core.php.

OrmDriver::$qType [private]

Query Type

Definition at line 60 of file driver_core.php.

Referenced by qType().

OrmDriver::$afectedRows

Number of rows affected.

Definition at line 64 of file driver_core.php.

OrmDriver::$numRows

Number of Rows in Result Set

Definition at line 68 of file driver_core.php.

OrmDriver::$connected [protected]

is Connected boolean Value

Definition at line 73 of file driver_core.php.

OrmDriver::$lex [private]

Lexims structure

Definition at line 78 of file driver_core.php.

Referenced by pasteLex().

OrmDriver::$caller [private]

Caller Object

Definition at line 83 of file driver_core.php.

Referenced by setCaller().


The documentation for this class was generated from the following file:

Generated on Mon Oct 27 23:53:09 2008 for zigmoyd.kdevelop by doxygen 1.5.6