public function setLocale(locale $locale = null) { $this->locale = $locale ?: new locale(); return $this; }