You are here

function cmfcClassesCoreStandAlone::propertiesToArray in Calendar Systems 7.3

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

File

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

Class

cmfcClassesCoreStandAlone
all cmf classes inherit from this class

Code

function propertiesToArray($exceptNulls = false, $prefix = null) {
  $propertiesValues = array();
  if ($this->_dynamicSystemEnabled) {
    $vars = get_object_vars($this);
    foreach ($vars as $varName => $varValue) {
      if (preg_match('/^' . $prefix . '.*/', $varName) or is_null($prefix)) {
        $propertiesValues[$varName] = $varValue;
      }
    }
  }
  else {

    // only for sample :

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