Model/Job.php

Go to the documentation of this file.
00001 <?php
00003 // {{{ license
00004 
00005 // +----------------------------------------------------------------------+
00006 // | FastFrame Application Framework                                      |
00007 // +----------------------------------------------------------------------+
00008 // | Copyright (c) 2002-2006 The Codejanitor Group                        |
00009 // +----------------------------------------------------------------------+
00010 // | This source file is subject to the GNU Lesser Public License (LGPL), |
00011 // | that is bundled with this package in the file LICENSE, and is        |
00012 // | available at through the world-wide-web at                           |
00013 // | http://www.fsf.org/copyleft/lesser.html                              |
00014 // | If you did not receive a copy of the LGPL and are unable to          |
00015 // | obtain it through the world-wide-web, you can get it by writing the  |
00016 // | Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
00017 // | MA 02111-1307, USA.                                                  |
00018 // +----------------------------------------------------------------------+
00019 // | Authors: Jason Rust <jrust@codejanitor.com>                          |
00020 // +----------------------------------------------------------------------+
00021 
00022 // }}}
00023 // {{{ requires
00024 
00025 require_once FASTFRAME_ROOT . 'lib/FastFrame/Model.php';
00026 
00027 // }}}
00028 // {{{ class FF_Model_Job
00029 
00042 // }}}
00043 class FF_Model_Job extends FF_Model {
00044     // {{{ properties
00045 
00050     var $title;
00051 
00056     var $description;
00057 
00062     var $url;
00063 
00068     var $company;
00069 
00074     var $salary;
00075     
00080     var $openingDate;
00081 
00086     var $location;
00087 
00088     // }}}
00089     // {{{ reset()
00090 
00097     function reset()
00098     {
00099         $this->id = null;
00100         $this->title = null;
00101         $this->description = null;
00102         $this->url = null;
00103         $this->company = null;
00104         $this->salary = null;
00105         $this->openingDate = null;
00106         $this->location = null;
00107     }
00108 
00109     // }}}
00110     // {{{ importFromArray()
00111 
00120     function importFromArray($in_data)
00121     {
00122         $this->setId($in_data['id']);
00123         $this->setTitle($in_data['title']);
00124         $this->setDescription($in_data['description']);
00125         $this->setUrl($in_data['url']);
00126         $this->setCompany($in_data['company']);
00127         $this->setSalary($in_data['salary']);
00128         $this->setOpeningDate($in_data['opening_date']);
00129         $this->setLocation($in_data['location']);
00130     }
00131 
00132     // }}}
00133     // {{{ exportToArray()
00134 
00143     function exportToArray()
00144     {
00145         $a_data = array();
00146         $a_data['id'] = $this->getId();
00147         $a_data['title'] = $this->getTitle();
00148         $a_data['description'] = $this->getDescription();
00149         $a_data['url'] = $this->getUrl();
00150         $a_data['company'] = $this->getCompany();
00151         $a_data['salary'] = $this->getSalary();
00152         $a_data['opening_date'] = $this->getOpeningDate();
00153         $a_data['location'] = $this->getLocation();
00154         return $a_data;
00155     }
00156 
00157     // }}}
00158     // {{{ getTitle()
00159 
00160     function getTitle()
00161     {
00162         return $this->title;
00163     }
00164 
00165     // }}}
00166     // {{{ setTitle()
00167 
00168     function setTitle($in_value)
00169     {
00170         $this->title = $in_value;
00171     }
00172 
00173     // }}}
00174     // {{{ getDescription()
00175 
00176     function getDescription()
00177     {
00178         return $this->description;
00179     }
00180 
00181     // }}}
00182     // {{{ setDescription()
00183 
00184     function setDescription($in_value)
00185     {
00186         $this->description = $in_value;
00187     }
00188 
00189     // }}}
00190     // {{{ getUrl()
00191 
00192     function getUrl()
00193     {
00194         return $this->url;
00195     }
00196 
00197     // }}}
00198     // {{{ setUrl()
00199 
00200     function setUrl($in_value)
00201     {
00202         $this->url = $in_value;
00203     }
00204 
00205     // }}}
00206     // {{{ getCompany()
00207 
00208     function getCompany()
00209     {
00210         return $this->company;
00211     }
00212 
00213     // }}}
00214     // {{{ setCompany()
00215 
00216     function setCompany($in_value)
00217     {
00218         $this->company = $in_value;
00219     }
00220 
00221     // }}}
00222     // {{{ getSalary()
00223 
00224     function getSalary()
00225     {
00226         return $this->salary;
00227     }
00228 
00229     // }}}
00230     // {{{ setSalary()
00231 
00232     function setSalary($in_value)
00233     {
00234         $this->salary = $in_value;
00235     }
00236 
00237     // }}}
00238     // {{{ getFormattedOpeningDate()
00239 
00240     function getFormattedOpeningDate()
00241     {
00242         return date('m/d/Y', $this->getOpeningDate());
00243     }
00244 
00245     // }}}
00246     // {{{ getOpeningDate()
00247 
00248     function getOpeningDate()
00249     {
00250         return is_null($this->openingDate) ? time() : $this->openingDate;
00251     }
00252 
00253     // }}}
00254     // {{{ setOpeningDate()
00255 
00256     function setOpeningDate($in_value)
00257     {
00258         $this->openingDate = $in_value;
00259     }
00260 
00261     // }}}
00262     // {{{ getLocation()
00263 
00264     function getLocation()
00265     {
00266         return $this->location;
00267     }
00268 
00269     // }}}
00270     // {{{ setLocation()
00271 
00272     function setLocation($in_value)
00273     {
00274         $this->location = $in_value;
00275     }
00276 
00277     // }}}
00278     // {{{ _initDataAccess()
00279 
00286     function _initDataAccess()
00287     {
00288         $this->o_dataAccess =& FF_DataAccess::factory('Job');
00289     }
00290 
00291     // }}}
00292 }
00293 ?>

Generated on Fri Jun 23 11:38:16 2006 for FastFrame by  doxygen 1.4.4