// $reply->data = $tag; // } // } else if(empty($tagName) === false) { // $tag = Tag::getTagByName($pdo, $id); // if($tag !== null && $tag->getTagName() === $_SESSION["tag"]->getTagName()) { // $reply->data = $tag; // } // } else if(empty($allTags) === false) { // $tag = Tag::getAllTags($pdo, $id); // if($tag !== null && $tag->getAllTags() === $_SESSION["tag"]->getAllTags()) { // $reply->data = $tag; // } // // } if (empty($id) === false) { $reply->data = Tag::getTagById($pdo, $tagId); } else { if (empty($city) === false) { $reply->data = Tag::getTagByName($pdo, $tagName)->toArray(); } else { if (empty($name) === false) { $reply->data = Tag::getAllTags($pdo, $tags)->toArray(); } } } } //handle REST calls for PUT methods //If the user is logged in, allow to POST their own tag. if (empty($_SESSION["profile"]) !== false) { if ($method === "POST") { verifyXsrf();