You are here

function cmfcClassesCore::clearProperties in Calendar Systems 5

File

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

Class

cmfcClassesCore
all cmf classes inherit from this class

Code

function clearProperties($prefix = null) {
  if ($this->_dynamicSystemEnabled) {
    $vars = get_object_vars($this);
    foreach ($vars as $varName => $varValue) {
      if (preg_match('/^' . $prefix . '.*/', $varName) or is_null($prefix)) {
        $this->{$varName} = null;
      }
    }
  }
  else {

    // only for sample :

    /*
    $this->_language=null;
    */
  }
}