| 1 |
<?php |
| 2 |
|
| 3 |
namespace ImageOptimizer\Classes\Async_Operation; |
| 4 |
|
| 5 |
use DateTime; |
| 6 |
|
| 7 |
class Async_Operation_Item { |
| 8 |
private int $id; |
| 9 |
private string $hook; |
| 10 |
private string $status; |
| 11 |
private array $args; |
| 12 |
private string $queue; |
| 13 |
private DateTime $date; |
| 14 |
private array $logs; |
| 15 |
|
| 16 |
public function get_id(): int { |
| 17 |
return $this->id; |
| 18 |
} |
| 19 |
|
| 20 |
public function set_id( int $id ): Async_Operation_Item { |
| 21 |
$this->id = $id; |
| 22 |
return $this; |
| 23 |
} |
| 24 |
|
| 25 |
public function get_hook(): string { |
| 26 |
return $this->hook; |
| 27 |
} |
| 28 |
|
| 29 |
public function set_hook( string $hook ): Async_Operation_Item { |
| 30 |
$this->hook = $hook; |
| 31 |
return $this; |
| 32 |
} |
| 33 |
|
| 34 |
public function get_status(): string { |
| 35 |
return $this->status; |
| 36 |
} |
| 37 |
|
| 38 |
public function set_status( string $status ): Async_Operation_Item { |
| 39 |
$this->status = $status; |
| 40 |
return $this; |
| 41 |
} |
| 42 |
|
| 43 |
public function get_args(): array { |
| 44 |
return $this->args; |
| 45 |
} |
| 46 |
|
| 47 |
public function set_args( array $args ): Async_Operation_Item { |
| 48 |
$this->args = $args; |
| 49 |
return $this; |
| 50 |
} |
| 51 |
|
| 52 |
public function get_date(): DateTime { |
| 53 |
return $this->date; |
| 54 |
} |
| 55 |
|
| 56 |
public function set_date( DateTime $date ): Async_Operation_Item { |
| 57 |
$this->date = $date; |
| 58 |
return $this; |
| 59 |
} |
| 60 |
|
| 61 |
public function get_queue(): string { |
| 62 |
return $this->queue; |
| 63 |
} |
| 64 |
|
| 65 |
public function set_queue( string $queue ): Async_Operation_Item { |
| 66 |
$this->queue = $queue; |
| 67 |
return $this; |
| 68 |
} |
| 69 |
|
| 70 |
public function get_logs(): array { |
| 71 |
return $this->logs; |
| 72 |
} |
| 73 |
|
| 74 |
public function set_logs( array $logs ): Async_Operation_Item { |
| 75 |
$this->logs = $logs; |
| 76 |
return $this; |
| 77 |
} |
| 78 |
} |
| 79 |
|