public function setUrl($url) { if (!strlen($url) > 0) { throw new Exception('No url specified'); } $this->url = $url; return $this; }