2 /* This file is part of Syj, Copyright (c) 2010 Arnaud Renevier,
3 and is published under the AGPL license. */
5 class Syj_Model_Path extends Syj_Model_Generic
12 protected $_creator_ip;
14 public function setId($id) {
15 $this->_id = (int) $id;
19 public function getId() {
23 public function setGeom(gisconverter\Geometry $geom) {
28 public function getGeom() {
32 public function setCreator(Syj_Model_User $creator = null) {
33 $this->_creator = $creator;
37 public function getCreator() {
38 return $this->_creator;
41 public function isCreator(Syj_Model_User $creator = null) {
42 if (!$creator or !$this->creator) {
45 return ($creator->id == $this->creator->id);
48 public function setTitle($title) {
49 $this->_title = (string) $title;
53 public function getTitle() {
57 public function getDisplayTitle() {
60 } else if ($this->_id) {
61 $title = $this->getTranslator()->translate("route number %d");
62 return str_replace('%d', (string)$this->id, $title);
68 public function setUrlComp($_urlcomp) {
69 $this->_urlcomp = (string) $_urlcomp;
73 public function getUrlComp() {
74 return $this->_urlcomp;
77 public function setCreatorIp($_creator_ip) {
78 $this->_creator_ip = (string) $_creator_ip;
82 public function getCreatorIp() {
83 return $this->_creator_ip;