/** * @param string $value */ public function setPrimaryUriAttribute($value) { $this->attributes[self::ATTR_PRIMARY_URI] = URLHelper::sanitise($value); }
/** * @param string $location * * @return URLInterface */ public function findByLocation($location) { return $this->model->where('location', '=', URLHelper::sanitise($location))->first(); }
/** * @param string $value */ public function setLocationAttribute($value) { $this->attributes[self::ATTR_LOCATION] = URLHelper::sanitise($value); }
/** * @param string $location * * @return URLInterface */ public function findByLocation($location) { return $this->model->where(Model::ATTR_SITE, '=', $this->site->getId())->where(Model::ATTR_LOCATION, '=', URLHelper::sanitise($location))->first(); }