From 907ce8c044159ca8da6ccce3ec5362ac61e7c142 Mon Sep 17 00:00:00 2001 From: yehudah Date: Mon, 25 Nov 2019 07:50:30 +0000 Subject: deleted by mistake --- Postman/PostmanState.php | 113 ----------------------------------------------- 1 file changed, 113 deletions(-) delete mode 100644 Postman/PostmanState.php (limited to 'Postman/PostmanState.php') diff --git a/Postman/PostmanState.php b/Postman/PostmanState.php deleted file mode 100644 index 4b077e0..0000000 --- a/Postman/PostmanState.php +++ /dev/null @@ -1,113 +0,0 @@ -logger = new PostmanLogger(get_class($this)); - $this->load(); - } - // - public function save() { - update_option ( self::SLUG, $this->options ); - } - public function reload() { - $this->load (); - } - private function load() { - $this->options = get_option ( self::SLUG ); - } - /** - * Shows the review feature of Postman up to thirty days after install - * - * @return boolean - */ - public function isTimeToReviewPostman() { - if (! empty ( $this->options [self::INSTALL_DATE] )) { - $successful = PostmanState::getInstance ()->getSuccessfulDeliveries () > 0; - $maxTime = $this->options [self::INSTALL_DATE] + self::TOO_LONG_SEC; - return $successful && time () <= $maxTime; - } - } - public function isFileLockingEnabled() { - if (isset ( $this->options [self::FILE_LOCKING_ENABLED] )) - return $this->options [self::FILE_LOCKING_ENABLED]; - else - return false; - } - public function setFileLockingEnabled($enabled) { - $this->options [self::FILE_LOCKING_ENABLED] = $enabled; - $this->save (); - } - public function getVersion() { - if (! empty ( $this->options [self::VERSION] )) { - return $this->options [self::VERSION]; - } - } - function getSuccessfulDeliveries() { - if (isset ( $this->options [PostmanState::DELIVERY_SUCCESS_TOTAL] )) - return $this->options [PostmanState::DELIVERY_SUCCESS_TOTAL]; - else - return 0; - } - function setSuccessfulDelivery($total) { - $this->options [PostmanState::DELIVERY_SUCCESS_TOTAL] = $total; - } - function incrementSuccessfulDelivery() { - $this->setSuccessfulDelivery ( $this->getSuccessfulDeliveries () + 1 ); - $this->logger->debug ( 'incrementing success count: ' . $this->getSuccessfulDeliveries () ); - $this->save (); - } - function getFailedDeliveries() { - if (isset ( $this->options [PostmanState::DELIVERY_FAILURE_TOTAL] )) - return $this->options [PostmanState::DELIVERY_FAILURE_TOTAL]; - else - return 0; - } - function setFailedDelivery($total) { - $this->options [PostmanState::DELIVERY_FAILURE_TOTAL] = $total; - } - function incrementFailedDelivery() { - $this->setFailedDelivery ( $this->getFailedDeliveries () + 1 ); - $this->logger->debug ( 'incrementing failure count: ' . $this->getFailedDeliveries () ); - $this->save (); - } - } -} \ No newline at end of file -- cgit v1.2.3