Formatting output Plese Wait...
zigRowSet Class Reference
[Orm]
|
Public Member Functions |
| save (&$handle) |
| Updates the RowSet.
|
| remove (&$handle) |
| Deleta the RowSet.
|
| delete (&$handle) |
| __set ($colAlias, $colValue) |
| Handels set property Call.
|
| __get ($colAlias, &$value) |
| Handels get property Call.
|
| __call ($methodName, $args, &$return) |
| Handels get/set access method Calls.
|
| conflicts ($colAlias) |
| Checks Wheather or not conflicts occured.
|
| autoResolve () |
| Resolves the conflicts if occured.
|
Data Fields |
| $colList |
| $handle |
| $conflictable |
Detailed Description
zigmoyd RowSet Class. All ORM Rows ultimately Inherits this Class
Definition at line 29 of file zigRowSet.php.
Member Function Documentation
zigRowSet::save( unknown $handle )
Updates the RowSet.
you need to pass a reference to the table level object on which the update operation will take place.
For internal use only.
for rowSet Aggrigation
- Parameters:
-
| &$handle | zOrm_inc reference to the table Level Object. |
- Returns:
- boolean
Definition at line 57 of file zigRowSet.php.
References $handle, and $val.
Show Source00057 {
00058
00059 $src = $this->colList;
00060 foreach($src as $col => $val){
00061 $handle->writeColAlias($col, $val, ZIGORM_QUOTE, true);
00062 }
00063 foreach($handle->pk as $pk){
00064 $handle->identifyBy($handle->lex['aliasProperCaps'][$pk], $this->colList[$handle->lex['aliasProperCaps'][$pk]]);
00065 }
00066 return $handle->update();
00067 }
Top
zigRowSet::remove( unknown $handle )
Deleta the RowSet.
you need to pass a reference to the table level object on which the delete operation will take place.
For internal use only.
for rowSet Aggrigation
- Parameters:
-
| &$handle | zOrm_inc reference to the table Level Object. |
- Returns:
- boolean
Definition at line 76 of file zigRowSet.php.
References $handle.
Show Source00076 {
00077 foreach($handle->pk as $pk){
00078 $handle->identifyBy($handle->lex['aliasProperCaps'][$pk], $this->colList[$handle->lex['aliasProperCaps'][$pk]]);
00079 }
00080 return $handle->remove();
00081 }
Top
zigRowSet::delete( unknown $handle )
Alias of remove() method
- Parameters:
-
| &$handle | zOrm_inc reference to the table Level Object. |
- Returns:
- boolean
Definition at line 88 of file zigRowSet.php.
References $handle.
Show Source00088 {
00089 return $this->remove(&$handle);
00090 }
Top
zigRowSet::__set( unknown $colAlias, string $colValue )
Handels set property Call.
If you do $rowSetObj->columnName = Value
Its equivalent to $rowSetObj->setColumnName(value);
For internal use only.
for rowSet Aggrigation
- Parameters:
-
| $colAliasName | string |
| $colValue | |
Definition at line 99 of file zigRowSet.php.
References perror().
Referenced by __call().
Show Source00099 {
00100 if(!isset($this->colList[$colAlias])){
00101
00102 foreach($this->colList as $ca => $cv){
00103 if(strtolower($ca) === strtolower($colAlias)){
00104 $this->colList[$ca] = $colValue;
00105 return true;
00106 }
00107 }
00108
00109 perror('<code>zigmoyd.orm.rowSet.set'.$colAlias.'</code><br />column '.$colAlias.' doesn\'t exist');
00110 return false;
00111 }else{
00112 $this->colList[$colAlias] = $colValue;
00113 return true;
00114 }
00115 }
Top
zigRowSet::__get( string $colAlias, string $value )
Handels get property Call.
If you do $var = $rowSetObj->columnName
Its equivalent to $var = $rowSetObj->getColumnName(value);
For internal use only.
for rowSet Aggrigation
- Parameters:
-
- Returns:
- mixed
Definition at line 124 of file zigRowSet.php.
References perror().
Referenced by __call().
Show Source00124 {
00125 if($colAlias == 'colList')return $this->colList;
00126 if(!isset($this->colList[$colAlias])){
00127
00128 foreach($this->colList as $ca => $cv){
00129 if(strtolower($ca) === strtolower($colAlias)){
00130 $value = $this->colList[$ca];
00131 return true;
00132 }
00133 }
00134
00135 perror('<code>zigmoyd.orm.'.$this->handle->caller->__struct->alias.'.rowSet.get'.$colAlias.'</code><br />column '.$colAlias.' doesn\'t exist');
00136 return true;
00137 }else{
00138 $value = $this->colList[$colAlias];
00139 return true;
00140 }
00141 }
Top
zigRowSet::__call( string $methodName, string $args, string $return )
Handels get/set access method Calls.
you can use Magic Methods with the Row Level object. e.g. $rowSetObj->getCol('ColName')
to retrive the value of a column. from a row level object. and you can do $rowSetObj->setCol('ColName', 'Value')
which will set the value of a column to a new one However to complete a set Operation you need to execute save() method with a reference to the table level object.
For internal use only.
for rowSet Aggrigation
- Parameters:
-
| $methodName | |
| $arguments | array |
- Returns:
- mixed
Definition at line 153 of file zigRowSet.php.
References $val, __get(), __set(), and perror().
Show Source00153 {
00154 switch(true){
00155 case (preg_match('~set(\w+)~i', $methodName, $m) >= 1):
00156 if(!isset($args[0])){
00157 perror('<code>zigmoyd.orm.'.$methodName.'($value)</code><br />you must supply 1 Argument No argument has been Suplied');
00158 exit;
00159 }
00160 if(eregi('all', $m[1])){
00161 foreach($args[0] as $key => $val){
00162 if(isset($this->colList[$key])){
00163 $this->__set($m[1], $val);
00164 }else{
00165 perror('<code>zigmoyd.orm.setAll()</code><br />Column <code style="background-color: #FFFFFF;font-weight: normal;">'.$key.'</code> doesn\'t exist');
00166 }
00167 }
00168 }else{
00169 $ret = $this->__set($m[1], $args[0]);
00170 }
00171 break;
00172 case (preg_match('~get(\w+)~i', $methodName, $m) >= 1):
00173 if(isset($args[0])){
00174 perror('<code>zigmoyd.orm.'.$methodName.'($value)</code><br />you must supply 1 Argument No argument has been Suplied');
00175 return false;
00176 }
00177 if(eregi('all', $m[1]))$ret = $this->colList;
00178 else $this->__get($m[1], $ret);
00179 break;
00180 default:
00181 perror('<code>zigmoyd.orm.'.$methodName.'($value)</code><br />Method doesn\'t exists Plese Check the manual');
00182 return false;
00183 }
00184 $return = $ret;
00185 return true;
00186 }
Top
zigRowSet::conflicts( string $colAlias )
Checks Wheather or not conflicts occured.
- Parameters:
-
- Returns:
- boolean
Definition at line 193 of file zigRowSet.php.
References $colList.
Show Source00193 {
00194 $this->conflictable = $colAlias;
00195
00196 $colList = $this->colList;
00197 foreach($colList as $ca => $cv){
00198 if(strtolower($ca) === strtolower($this->conflictable)){
00199 return true;
00200 }
00201 }
00202
00203 return false;
00204 }
Top
zigRowSet::autoResolve( )
Resolves the conflicts if occured.
- Returns:
- String
Definition at line 210 of file zigRowSet.php.
References $colList, and perror().
Show Source00210 {
00211
00212 $colList = $this->colList;
00213 foreach($colList as $ca => $cv){
00214 if(strtolower($ca) === strtolower($this->conflictable)){
00215
00216 $this->conflictable = null;
00217 return $this->colList[$ca];
00218 }
00219 }
00220
00221 $this->conflictable = null;
00222 perror('<code>zigmoyd.orm.'.$this->handle->caller->__struct->alias.'.rowSet.get'.$this->conflictable.'</code><br />Wired Problem Conflict occured But could not be resolved for column '.$this->conflictable);
00223 return false;
00224 }
Top
Field Documentation
The documentation for this class was generated from the following file: