You are here

function cmfcClassesCoreStandAlone::arrayToProperties in Calendar Systems 8.2

Same name and namespace in other branches
  1. 8 calendar/lib/classesCore.class.inc.php \cmfcClassesCoreStandAlone::arrayToProperties()
  2. 6.3 calendar/lib/classesCore.class.inc.php \cmfcClassesCoreStandAlone::arrayToProperties()
  3. 6 calendar/lib/classesCore.class.inc.php \cmfcClassesCoreStandAlone::arrayToProperties()
  4. 7.3 calendar/lib/classesCore.class.inc.php \cmfcClassesCoreStandAlone::arrayToProperties()
  5. 7 calendar/lib/classesCore.class.inc.php \cmfcClassesCoreStandAlone::arrayToProperties()
  6. 7.2 calendar/lib/classesCore.class.inc.php \cmfcClassesCoreStandAlone::arrayToProperties()

File

calendar/lib/classesCore.class.inc.php, line 242

Class

cmfcClassesCoreStandAlone
all cmf classes inherit from this class

Code

function arrayToProperties($propertiesValues, $exceptNulls = false, $prefix = null) {
  if (is_array($propertiesValues)) {
    if ($this->_dynamicSystemEnabled) {
      foreach ($propertiesValues as $propertyName => $propertyValue) {
        $this->{$prefix . $propertyName} = $propertyValue;
      }
    }
    else {

      // only for sample :

      /*
      if ($exceptNulls==false or ($exceptNulls and !is_null($propertiesValues[$this->colnId])))
      	@$this->cvId=$propertiesValues[$this->colnId];
      */
    }
    return true;
  }
  return false;
}