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 |
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.
OrmDriver::connAlias | ( | $ | conAliasName = null |
) |
Set the Connection Alias name against which to connect.
$conAliasName | string Connection Alias name. |
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 }
OrmDriver::qType | ( | $ | qType | ) |
Query Type.
$qType | int Query type. |
Definition at line 110 of file driver_core.php.
References $qType.
Referenced by OrmDriver_mysql::__generate().
OrmDriver::pasteLex | ( | $ | lex | ) | [protected] |
Pass/update lexims structure.
$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 | ( | ) |
OrmDriver::numRows | ( | ) |
Number of rows in result set.
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.
Definition at line 139 of file driver_core.php.
OrmDriver::whereLexToStr | ( | $ | whereLex | ) | [private] |
Converts Where Lexims to String Where Clause.
$whereLex | array |
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.
$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 }
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 }
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 }
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 }
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] |
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] |
OrmDriver::$caller [private] |