getStorage()->exists($name); if(!$exists && method_exists($this, $name)) { $action = $this->$name(); $this->getStorage()->set($name, $action); }elseif(!$exists) { }elseif($exists){ $action = $this->getStorage()->get($name); }else{ throw new \Exception("Repository `{$name}` not found"); } return $action; } /** * @return Server */ public function server() { return new Server($this->getClient()); } /** * @return ClassOfServices */ public function cos() { return new ClassOfServices($this->getClient()); } /** * @return Domains */ public function domains() { return new Domains($this->getClient()); } /** * @return Accounts */ public function accounts() { return new Accounts($this->getClient()); } /** * */ public function lists() { return new DistributionLists($this->getClient()); } }