WP_CLI
1 year ago
abstracts
1 year ago
actions
1 year ago
data-stores
1 year ago
migration
1 year ago
schedules
1 year ago
schema
1 year ago
ActionScheduler_ActionClaim.php
1 year ago
ActionScheduler_ActionFactory.php
1 year ago
ActionScheduler_AdminView.php
1 year ago
ActionScheduler_AsyncRequest_QueueRunner.php
1 year ago
ActionScheduler_Compatibility.php
1 year ago
ActionScheduler_DataController.php
1 year ago
ActionScheduler_DateTime.php
1 year ago
ActionScheduler_Exception.php
4 years ago
ActionScheduler_FatalErrorMonitor.php
1 year ago
ActionScheduler_InvalidActionException.php
1 year ago
ActionScheduler_ListTable.php
1 year ago
ActionScheduler_LogEntry.php
1 year ago
ActionScheduler_NullLogEntry.php
1 year ago
ActionScheduler_OptionLock.php
2 years ago
ActionScheduler_QueueCleaner.php
1 year ago
ActionScheduler_QueueRunner.php
1 year ago
ActionScheduler_SystemInformation.php
1 year ago
ActionScheduler_Versions.php
1 year ago
ActionScheduler_WPCommentCleaner.php
1 year ago
ActionScheduler_wcSystemStatus.php
4 years ago
index.php
3 years ago
ActionScheduler_LogEntry.php
26 lines
| 1 | <?php |
| 2 | if (!defined('ABSPATH')) exit; |
| 3 | class ActionScheduler_LogEntry { |
| 4 | protected $action_id = ''; |
| 5 | protected $message = ''; |
| 6 | protected $date; |
| 7 | public function __construct( $action_id, $message, $date = null ) { |
| 8 | if ( null !== $date && ! is_a( $date, 'DateTime' ) ) { |
| 9 | _doing_it_wrong( __METHOD__, 'The third parameter must be a valid DateTime instance, or null.', '2.0.0' ); |
| 10 | $date = null; |
| 11 | } |
| 12 | $this->action_id = $action_id; |
| 13 | $this->message = $message; |
| 14 | $this->date = $date ? $date : new Datetime(); |
| 15 | } |
| 16 | public function get_date() { |
| 17 | return $this->date; |
| 18 | } |
| 19 | public function get_action_id() { |
| 20 | return $this->action_id; |
| 21 | } |
| 22 | public function get_message() { |
| 23 | return $this->message; |
| 24 | } |
| 25 | } |
| 26 |