public function __construct($filter = null) { if (null === $filter) { $filter = new Model_Data_Filter(); } $this->setFilter($filter); $this->setMapper(Model_DB_Data_Mapper::get_instance()); }
public function getCoordinates() { if (is_null($this->_coordinates)) { $filter = new Model_Data_Filter(); $filter->setIdRoad($this->getId()); $this->setCoordinates(Model_DB_Data_Mapper::get_instance()->findByFilter($filter)); } return $this->_coordinates; }
public function delete() { Model_DB_Data_Mapper::get_instance()->delete($this->getId()); }
public function save() { Model_DB_Data_Mapper::get_instance()->save($this); }