Exemplo n.º 1
0
 function exists($channel, $strict = true)
 {
     if (!$this->initialized) {
         $this->lazyInit();
     }
     $database = Db::getRegistry($this->_path);
     $sql = 'SELECT channel FROM channels WHERE alias = "' . $database->escapeString($channel) . '"';
     if (!$strict && ($a = $database->querySingle($sql))) {
         return true;
     }
     $sql = 'SELECT channel FROM channels WHERE channel = "' . $database->escapeString($channel) . '"';
     if ($a = $database->querySingle($sql)) {
         return true;
     }
     return parent::exists($channel, $strict);
 }
Exemplo n.º 2
0
 /**
  * Check if the channel has been discovered.
  *
  * @param string $channel Name of the channel
  * @param bool   $strict  Allow aliases or not
  *
  * @return bool
  */
 function exists($channel, $strict = true)
 {
     if (file_exists($this->getChannelFile($channel))) {
         return true;
     }
     if ($strict) {
         return parent::exists($channel, $strict);
     }
     if (file_exists($this->getAliasFile($channel))) {
         return true;
     }
     return parent::exists($channel, $strict);
 }