You are here

function cmfcClassesCoreStandAlone::clearProperties in Calendar Systems 8.2

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

File

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

Class

cmfcClassesCoreStandAlone
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;
    */
  }
}