public function setLevel($level) { // @todo Elgg has used string constants for logging levels if (is_string($level)) { $levelStringsToInts = array_flip(self::$levels); $level = $levelStringsToInts[$level]; } $this->level = $level; }