public function &getTaggableObjectData(ITaggable $object, array &$taggableObjectData) { if (!$object instanceof IFile) { throw new EyeInvalidClassException('$object must be an instance of IFile.'); } if (!$object->exists()) { throw new EyeFileNotFoundException('Unable to tag non-existing file ' . $object->getPath() . '.'); } $taggableObjectData[self::OBJECTDATA_KEY_PATH] = $object->getPath(); return $taggableObjectData; }
public function removeAllTags(ITaggable $object, array $tags) { try { if ($object->getId() === null) { throw new EyeNullPointerException('$object ID is null.'); } $objectData = array(self::KEY_TAGGABLEID => $object->getId()); foreach ($tags as $tag) { SecurityManager::getInstance()->checkPermission($object, new SimplePermission(null, array('removetag'), $tag)); } $this->getProvider()->removeAllTags($objectData, $tags); } catch (Exception $e) { self::$Logger->error('Unable to remove tag(s) from object of class ' . get_class($object) . ': ' . $e->getMessage()); if (self::$Logger->isDebugEnabled()) { self::$Logger->debug(ExceptionStackUtil::getStackTrace($e, false)); } throw $e; } }