You are here

function cmfcClassesCore::arrayToProperties in Calendar Systems 5

File

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

Class

cmfcClassesCore
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;
}