root/trunk/thirdparty/timestamped.php
| 99 | 245 | ||
|---|---|---|---|
58 | * $obj->save(); | 58 | * $obj->save(); |
59 | * echo $obj->created_at; // This will print 1980-01-01 00:00 even though the timestamp in the database is different | 59 | * echo $obj->created_at; // This will print 1980-01-01 00:00 even though the timestamp in the database is different |
60 | * | 60 | * |
61 | * | 61 | * |
62 | * @author Jonas Flodén <jonas@koalasoft.se> | ||
63 | * @par Copyright | ||
64 | * Copyright (c) 2008, Jonas Flodén <jonas@koalasoft.se> | ||
65 | * | ||
66 | * Revisions | 62 | * Revisions |
67 | * 2008-06-30 Initial version | 63 | * 2008-06-30 Initial version |
68 | * 2008-07-03 Pass parameters by reference for PHP4 compatibility (by Martin Wernstahl) | 64 | * 2008-07-03 Pass parameters by reference for PHP4 compatibility (by Martin Wernstahl) |
69 | * 2008-07-28 Add option to use local time instead of UTC and make both fields optional | 65 | * 2008-07-28 Add option to use local time instead of UTC and make both fields optional |
70 | * 2008-08-08 Fixed bug: Object was not updated with correct timestamp after save | 66 | * 2008-08-08 Fixed bug: Object was not updated with correct timestamp after save |
71 | * | 67 | * 2008-12-14 Changed class name to IR_timestamped (to match eariler changes in IR's behaviour code) (by Martin Wernstahl) |
68 | * | ||
69 | * @author Jonas Flodén <jonas@koalasoft.se> | ||
70 | * @copyright Copyright (c) 2008, Jonas Flodén <jonas@koalasoft.se> | ||
72 | */ | 71 | */ |
73 | class IgnitedRecord_timestamped | 72 | class IR_timestamped |
74 | { | 73 | { |
75 | var $__created_at; | 74 | var $__created_at; |
76 | var $__updated_at; | 75 | var $__updated_at; |
77 | var $__localtime; | 76 | var $__localtime; |
78 | 77 | ||
79 | function IgnitedRecord_timestamped(&$ORM, $opts) | 78 | function IR_timestamped(&$ORM, $opts) |
80 | { | 79 | { |
81 | // set opts | 80 | // set opts |
82 | $this->__created_at = isset($opts['created_at']) ? $opts['created_at'] : 'created_at'; | 81 | $this->__created_at = isset($opts['created_at']) ? $opts['created_at'] : 'created_at'; |
Download diff