diff options
Diffstat (limited to 'lib/Model/Index.php')
-rw-r--r-- | lib/Model/Index.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/Model/Index.php b/lib/Model/Index.php index f25da7e..9924871 100644 --- a/lib/Model/Index.php +++ b/lib/Model/Index.php @@ -30,11 +30,14 @@ class Index implements \JsonSerializable { const INDEX_OK = 1; const INDEX_IGNORE = 2; + const INDEX_META = 4; const INDEX_CONTENT = 8; const INDEX_FULL = 12; const INDEX_REMOVE = 16; - const INDEX_FAILED = 32; + + const INDEX_DONE = 32; + const INDEX_FAILED = 64; const ERROR_FAILED = 1; const ERROR_FAILED2 = 2; @@ -126,12 +129,22 @@ class Index implements \JsonSerializable { /** * @param int $status * - * @return int + * @return bool */ public function isStatus($status) { return ((int)$status & $this->getStatus()); } + /** + * @param int $status + */ + public function unsetStatus($status) { + if (!$this->isStatus($status)) { + return; + } + + $this->status -= $status; + } /** * @param int $err |