public function __get($name) { if (isset($this->_setting[strtolower($name)])) { return $this->_setting[$name]; } throw new CException(Ibos::t("yii", "Property \"{class}.{property}\" is not defined.", array("{class}" => get_class($this), "{property}" => $name))); }
public function __set($name, $value) { $setter = "set" . $name; if (method_exists($this, $setter)) { return $this->{$setter}($value); } elseif (isset($this->_attributes[$name])) { return $this->_attributes[$name] = $value; } if (method_exists($this, "get" . $name)) { throw new CException(Ibos::t("yii", "Property \"{class}.{property}\" is read only.", array("{class}" => get_class($this), "{property}" => $name))); } else { throw new CException(Ibos::t("yii", "Property \"{class}.{property}\" is not defined.", array("{class}" => get_class($this), "{property}" => $name))); } }
public function create($data = "") { if (empty($data)) { $data = $_POST; } elseif (is_object($data)) { $data = get_object_vars($data); } if (empty($data) || !is_array($data)) { throw new DataException(Ibos::t("Data type invalid", "error")); } $fields = $this->getAttributes(); if (isset($fields)) { foreach ($data as $key => $val) { if (!array_key_exists($key, $fields)) { unset($data[$key]); } } } return $data; }
public function init() { if (!ModuleUtil::getIsEnabled("statistics")) { $this->error(Ibos::t("Module \"{module}\" is illegal.", "error", array("{module}" => Ibos::lang("Statistics"))), $this->createUrl("default/index")); } }
private function chkInstance($adapter) { if (!$adapter instanceof ICIM) { throw new CException(Ibos::t("error", "Class \"{class}\" is illegal.", array("{class}" => get_class($adapter)))); } }
private function chkInstance($chart) { if (!$chart instanceof ICChart) { throw new CException(Ibos::t("error", "Class \"{class}\" is illegal.", array("{class}" => get_class($chart)))); } }