]> dev.renevier.net Git - syj.git/blob - application/models/Path.php
version 0.1
[syj.git] / application / models / Path.php
1 <?php
2 /*  This file is part of Syj, Copyright (c) 2010 Arnaud Renevier,
3     and is published under the AGPL license. */
4
5 class Syj_Model_Path extends Syj_Model_Generic
6 {
7     protected $_id;
8     protected $_geom;
9     protected $_owner;
10     protected $_title;
11     protected $_urlcomp;
12
13     public function setId($id) {
14         $this->_id = (int) $id;
15         return $this;
16     }
17
18     public function getId() {
19         return $this->_id;
20     }
21
22     public function setGeom(gisconverter\Geometry $geom) {
23         $this->_geom = $geom;
24         return $this;
25     }
26
27     public function getGeom() {
28         return $this->_geom;
29     }
30
31     public function setOwner(Syj_Model_User $owner) {
32         $this->_owner = $owner;
33         return $this;
34     }
35
36     public function getOwner() {
37         return $this->_owner;
38     }
39
40     public function setTitle($title) {
41         $this->_title = (string) $title;
42         return $this;
43     }
44
45     public function getTitle() {
46         return $this->_title;
47     }
48
49     public function getDisplayTitle() {
50         if ($this->_title) {
51             return $this->_title;
52         } else if ($this->_id) {
53             return "journey number " . (string)$this->_id;
54         } else {
55             return "";
56         }
57     }
58
59     public function setUrlComp($_urlcomp) {
60         $this->_urlcomp = (string) $_urlcomp;
61         return $this;
62     }
63
64     public function getUrlComp() {
65         return $this->_urlcomp;
66     }
67
68 }