Changeset 980
- Timestamp:
- 08/13/10 10:12:19 (18 months ago)
- Location:
- trunk/engine
- Files:
-
- 2 modified
-
classes/Entity.class.php (modified) (3 diffs)
-
include/function.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/engine/classes/Entity.class.php
r974 r980 45 45 $aReturn=array(); 46 46 foreach ($aKeys as $key) { 47 if( key_exists($key,$this->_aData)) {47 if(array_key_exists($key,$this->_aData)) { 48 48 $aReturn[$key] = $this->_aData[$key]; 49 49 } … … 52 52 } 53 53 54 public function _getDataOne($sKey) { 55 if(array_key_exists($sKey,$this->_aData)) { 56 return $this->_aData[$sKey]; 57 } 58 return null; 59 } 60 54 61 /** 55 62 * Ставим хук на вызов неизвестного метода и считаем что хотели вызвать метод какого либо модуля … … 75 82 } 76 83 return null; 77 } elseif ($sType=='set' and key_exists(0,$aArgs)) {84 } elseif ($sType=='set' and array_key_exists(0,$aArgs)) { 78 85 $this->_aData[$sKey]=$aArgs[0]; 79 86 } -
trunk/engine/include/function.php
r896 r980 413 413 } 414 414 } 415 416 417 function func_underscore($sStr) { 418 return strtolower(preg_replace('/([^A-Z])([A-Z])/',"$1_$2",$sStr)); 419 } 420 421 function func_camelize($sStr) { 422 $aParts = explode('_',$sStr); 423 $sCamelized = ''; 424 foreach($aParts as $sPart) { 425 $sCamelized .= ucfirst($sPart); 426 } 427 return $sCamelized; 428 } 429 415 430 ?>
