You are here

function cmfcClassesCoreStandAlone::setOptionByReference in Calendar Systems 8

Same name and namespace in other branches
  1. 8.2 calendar/lib/classesCore.class.inc.php \cmfcClassesCoreStandAlone::setOptionByReference()
  2. 6.3 calendar/lib/classesCore.class.inc.php \cmfcClassesCoreStandAlone::setOptionByReference()
  3. 6 calendar/lib/classesCore.class.inc.php \cmfcClassesCoreStandAlone::setOptionByReference()
  4. 7.3 calendar/lib/classesCore.class.inc.php \cmfcClassesCoreStandAlone::setOptionByReference()
  5. 7 calendar/lib/classesCore.class.inc.php \cmfcClassesCoreStandAlone::setOptionByReference()
  6. 7.2 calendar/lib/classesCore.class.inc.php \cmfcClassesCoreStandAlone::setOptionByReference()
2 calls to cmfcClassesCoreStandAlone::setOptionByReference()
cmfcClassesCoreStandAlone::setOption in calendar/lib/classesCore.class.inc.php
* @NOTICE child classed definition should apply the byReference version of function *
cmfcClassesCoreStandAlone::setOptionsByReference in calendar/lib/classesCore.class.inc.php

File

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

Class

cmfcClassesCoreStandAlone
all cmf classes inherit from this class

Code

function setOptionByReference($name, &$value, $merge = false) {
  $r = null;
  if ($name == 'storage') {
    $r =& $this
      ->setStorage($value);
  }
  elseif ($name == 'storage') {
    $r =& $this
      ->setLog($value);
  }
  elseif (is_array($value) and $merge == true) {
    $this->{'_' . $name} =& cmfcArray::mergeRecursive($this->{'_' . $name}, $value);
    $value =& $this->{'_' . $name};
  }
  else {
    $this->{'_' . $name} =& $value;
  }
  $this->_options[$name] =& $value;
  return $r;
}