| 1 |
<?php |
| 2 |
|
| 3 |
namespace FlyWP\StaticSite\Engine\Incremental; |
| 4 |
|
| 5 |
/** |
| 6 |
* The work of an incremental build. |
| 7 |
* |
| 8 |
* - full_reason = "global_change" or "large_list": the engine must run a full build. |
| 9 |
* - full_reason = null and urls and deleted_urls are empty: nothing changed. |
| 10 |
* |
| 11 |
* @since 1.8.0 |
| 12 |
*/ |
| 13 |
class ChangeSet { |
| 14 |
|
| 15 |
/** |
| 16 |
* Reason for a full build: "global_change", "large_list", "no_changes" or null. |
| 17 |
* |
| 18 |
* @var string|null |
| 19 |
*/ |
| 20 |
public $full_reason = null; |
| 21 |
|
| 22 |
/** |
| 23 |
* Absolute URLs to rebuild. All pages of each list in $lists are included. |
| 24 |
* |
| 25 |
* @var string[] |
| 26 |
*/ |
| 27 |
public $urls = []; |
| 28 |
|
| 29 |
/** |
| 30 |
* Absolute URLs that are gone. |
| 31 |
* |
| 32 |
* @var string[] |
| 33 |
*/ |
| 34 |
public $deleted_urls = []; |
| 35 |
|
| 36 |
/** |
| 37 |
* Each list page (home or posts page, post type archive, term, author, date) with its current page count. |
| 38 |
* The engine deletes the files of pages after the last page. |
| 39 |
* |
| 40 |
* @var array<int, array{url:string, pages:int}> |
| 41 |
*/ |
| 42 |
public $lists = []; |
| 43 |
|
| 44 |
/** |
| 45 |
* Highest change row ID in this set. The engine clears rows up to this ID after the build. |
| 46 |
* |
| 47 |
* @var int |
| 48 |
*/ |
| 49 |
public $max_change_id = 0; |
| 50 |
} |
| 51 |
|