00001 <?php
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 require_once FASTFRAME_ROOT . 'lib/FastFrame/Model.php';
00026
00027
00028
00029
00042
00043 class FF_Model_Job extends FF_Model {
00044
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
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
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
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
00159
00160 function getTitle()
00161 {
00162 return $this->title;
00163 }
00164
00165
00166
00167
00168 function setTitle($in_value)
00169 {
00170 $this->title = $in_value;
00171 }
00172
00173
00174
00175
00176 function getDescription()
00177 {
00178 return $this->description;
00179 }
00180
00181
00182
00183
00184 function setDescription($in_value)
00185 {
00186 $this->description = $in_value;
00187 }
00188
00189
00190
00191
00192 function getUrl()
00193 {
00194 return $this->url;
00195 }
00196
00197
00198
00199
00200 function setUrl($in_value)
00201 {
00202 $this->url = $in_value;
00203 }
00204
00205
00206
00207
00208 function getCompany()
00209 {
00210 return $this->company;
00211 }
00212
00213
00214
00215
00216 function setCompany($in_value)
00217 {
00218 $this->company = $in_value;
00219 }
00220
00221
00222
00223
00224 function getSalary()
00225 {
00226 return $this->salary;
00227 }
00228
00229
00230
00231
00232 function setSalary($in_value)
00233 {
00234 $this->salary = $in_value;
00235 }
00236
00237
00238
00239
00240 function getFormattedOpeningDate()
00241 {
00242 return date('m/d/Y', $this->getOpeningDate());
00243 }
00244
00245
00246
00247
00248 function getOpeningDate()
00249 {
00250 return is_null($this->openingDate) ? time() : $this->openingDate;
00251 }
00252
00253
00254
00255
00256 function setOpeningDate($in_value)
00257 {
00258 $this->openingDate = $in_value;
00259 }
00260
00261
00262
00263
00264 function getLocation()
00265 {
00266 return $this->location;
00267 }
00268
00269
00270
00271
00272 function setLocation($in_value)
00273 {
00274 $this->location = $in_value;
00275 }
00276
00277
00278
00279
00286 function _initDataAccess()
00287 {
00288 $this->o_dataAccess =& FF_DataAccess::factory('Job');
00289 }
00290
00291
00292 }
00293 ?>