Initial Photo Work
This commit is contained in:
17
application/classes/Model/People.php
Normal file
17
application/classes/Model/People.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class supports People.
|
||||
*
|
||||
* @package Photo
|
||||
* @category Models
|
||||
* @author Deon George
|
||||
* @copyright (c) 2014 Deon George
|
||||
* @license http://dev.leenooks.net/license.html
|
||||
*/
|
||||
class Model_People extends ORM {
|
||||
public function age($x=NULL) {
|
||||
return sprintf('%02s',date_diff(new DateTime(date('Y-m-d',is_null($x) ? time() : $x)),new DateTime(date('Y-m-d',$this->date_birth)))->y);
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user