示例#1
0
 public function handleDelete($postId)
 {
     if (!$this->driverEnabled() || magnify_filter('disable_delete', false, $this->driver, $postId)) {
         return;
     }
     try {
         $this->driver->delete($blogId = $this->getCurrentBlog(), $postId);
         magnify_act('deleted_post', $blogId, $postId);
     } catch (\Exception $e) {
         $this->logException($e, sprintf('deleting post #%d', $postId));
     }
 }
示例#2
0
 public static function driverEnabled(Driver $driver)
 {
     $e = self::getEnabledDrivers();
     return !empty($e[$driver->getIdentifier()]);
 }
示例#3
0
 private function keyFor(Driver $driver)
 {
     return $driver->getIdentifier();
 }