We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| 1 | <?php |
||
| 38 | class Cache { |
||
| 39 | |||
| 40 | /** |
||
| 41 | * An array of Hyphenator instances indexed by language. |
||
| 42 | * |
||
| 43 | * @var array |
||
| 44 | */ |
||
| 45 | protected $cache = []; |
||
| 46 | |||
| 47 | /** |
||
| 48 | * A flag that indicated that the cache has changed since creation/deserialization. |
||
| 49 | * |
||
| 50 | * @var bool |
||
| 51 | */ |
||
| 52 | protected $changed = false; |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Ignore the "changed" flag during serialization. |
||
| 56 | * |
||
| 57 | * @return array |
||
| 58 | */ |
||
| 59 | public function __sleep() { |
||
| 64 | |||
| 65 | /** |
||
| 66 | * Caches a Hyphenator instance. |
||
| 67 | * |
||
| 68 | * @param string $lang A language code. |
||
| 69 | * @param Hyphenator $hyphenator The object to cache. |
||
| 70 | */ |
||
| 71 | public function set_hyphenator( $lang, Hyphenator $hyphenator ) { |
||
| 75 | |||
| 76 | /** |
||
| 77 | * Retrieves a cached Hyphenator. |
||
| 78 | * |
||
| 79 | * @param string $lang A language code. |
||
| 80 | * |
||
| 81 | * @return Hyphenator|null |
||
| 82 | */ |
||
| 83 | public function get_hyphenator( $lang ) { |
||
| 90 | |||
| 91 | /** |
||
| 92 | * Determines whether the cache (not its content) has been modified since |
||
| 93 | * instance creatino (or deserialization). |
||
| 94 | * |
||
| 95 | * @return bool |
||
| 96 | */ |
||
| 97 | public function has_changed() { |
||
| 100 | } |
||
| 101 |