/**
  * Returns how many tags exist with $keyword.
  *
  * @throws \RuntimeException
  *
  * @param string $keyword
  * @param string $translation
  * @param bool $useAlwaysAvailable
  *
  * @return int
  */
 public function getTagsByKeywordCount($keyword, $translation, $useAlwaysAvailable = true)
 {
     try {
         return $this->innerGateway->getTagsByKeywordCount($keyword, $translation, $useAlwaysAvailable);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
Exemple #2
0
 /**
  * Returns the number of tags with specified $keyword.
  *
  * @param string $keyword
  * @param string $translation
  * @param bool $useAlwaysAvailable
  *
  * @return int
  */
 public function getTagsByKeywordCount($keyword, $translation, $useAlwaysAvailable = true)
 {
     return $this->gateway->getTagsByKeywordCount($keyword, $translation, $useAlwaysAvailable);
 }