/** * Throws exception with given message * * @throws Exception */ private static function _throwException($msg = 'resource smart load exception') { YiiBase::log($msg, CLogger::LEVEL_ERROR, get_called_class()); throw new Exception($msg); // you can change class of exception }
/** * Logs given array (to system log) * * @param array $resources * @param string $msg Message for log */ private function _log($resources, $msg = 'Disabled following resources:') { if ($this->enableLog) { YiiBase::log($msg . PHP_EOL . var_export($resources, true), CLogger::LEVEL_TRACE, 'resourceSmartLoad'); } }