public function setPrettyUrl($prettyUrl) { $this->prettyUrl = "/" . trim($prettyUrl, " /"); if (strlen($this->prettyUrl) < 2) { $this->prettyUrl = null; } return $this; }