You are here

function cmfcClassesCore::setOption in Calendar Systems 5

2 calls to cmfcClassesCore::setOption()
cmfcCalendarV1::setOption in calendar/v1/calendarV1.class.inc.php
cmfcClassesCore::setOptions in calendar/lib/classesCore.class.inc.php
1 method overrides cmfcClassesCore::setOption()
cmfcCalendarV1::setOption in calendar/v1/calendarV1.class.inc.php

File

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

Class

cmfcClassesCore
all cmf classes inherit from this class

Code

function setOption($name, $value, $merge = false) {
  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);
  }
  else {
    $this->{'_' . $name} =& $value;
  }
  $this->_options[$name] =& $value;
  return $r;
}