Check if a hook exists in the current application

@access public
@param string $name
@return bool
962369
public static function exists($name) {
		$application = Application::get();

		if (!in_array($name, self::$definable_hooks)) {
			return false;
		}

		if (file_exists($application->path . '/config/Hook.php')) {
			require_once $application->path . '/config/Hook.php';
			$classname = 'Hook_' . ucfirst($application->name);

			if (method_exists($classname, $name)) {
				return true;
			}
		}

		return false;
	}
309578
public function exists($name)
    {
        if (!$this->validateCmsObject($name)) {
            return parent::exists($name);
        }

        return $this->obj->exists;
    }
898180
public function hasDoing($hookName = null) : bool
    {
        if (null === $hookName) {
            return ! empty($this->current);
        }

        $hookName = $this->sanitizeKeyName($hookName);
        return $hookName && isset($this->current[$hookName]);
    }
309093
public function has($name): bool
    {
        return isset($this->values[$name]) ||
            isset($this->factory[$name]) ||
            isset($this->alias[$name]) ||
            \array_key_exists($name, $this->values);
    }
530019
public function has($name)
    {
        $names = is_array($name) ? $name : func_get_args();

        foreach ($names as $value) {
            if (! $this->routes->hasNamedRoute($value)) {
                return false;
            }
        }

        return true;
    }
930064
public function hasOwnMethod($name)
    {
        if ($this->hasMethod($name) === true) {
            return $this->getMethod($name)->class === $this->getName();
        } else {
            return false;
        }
    }
842301
public function has($name)
    {
        $checker = $this->_classes['checker'];
        return isset($this->_handlers[$name]) || $checker::has($name);
    }
1250251
public function has(string $name) : bool
    {
        try {
            $result = $this->configCommand($name);
        } catch (RuntimeException $exception) {
            return false;
        }

        return $result->isSuccessful();
    }
80003
public function isExists($name)
    {
        try {
            $this->getQueueId($name);
            $result = true;
        } catch (RuntimeException $e) {
            $result = false;
        }

        return $result;
    }
588964
public static function exists($name)
    {
        if(is_integer($name))
        {
            return isset($_SERVER['argv'][$name]);
        }
        else
        {
            return isset(static::$cliArgs[$name]);
        }
    }
996491
protected static function trigger($name)
    {
        if (isset(static::$_hooks[$name])) {
            $events = [];
            
            foreach (static::$_hooks[$name] as $hookEvent) {
                if ($hookEvent->isHandled) {
                    continue;
                }
                
                if (is_array($hookEvent->handler)) {
                    $hookEvent->output = call_user_func_array($hookEvent->handler, [$hookEvent]);
                } elseif (is_callable($hookEvent->handler)) {
                    $hookEvent->output = call_user_func($hookEvent->handler, $hookEvent);
                } else {
                    throw new Exception("The provided hook event handler is not valid.");
                }
                
                $hookEvent->isHandled = true;
                
                if ($hookEvent->isValid) {
                    $events[] = $hookEvent;
                }
            }

            return $events;
        }

        return [];
    }
245511
public function __isset($name)
    {
        if (0 === stripos($name, 'conf_')) {
            $name = str_replace('conf_', '', $name);
            if (array_key_exists($name, $this->configs)) {
                return true;
            }
        }

        return (array_key_exists($name, $this->modules) ||
            array_key_exists($name, $this->globals));
    }
1145184
public function hasOpt(string $name): bool
    {
        return isset($this->sOpts[$name]) || isset($this->lOpts[$name]);
    }
128600
public function template_exists($name)
    {
        foreach ($this->skin_paths as $skin_path) {
            $filename = RCUBE_INSTALL_PATH . $skin_path . '/templates/' . $name . '.html';
            if ((is_file($filename) && is_readable($filename))
                || ($this->deprecated_templates[$name] && $this->template_exists($this->deprecated_templates[$name]))
            ) {
                return true;
            }
        }

        return false;
    }
605011
private function parse_method_name( $name ){
		if ( preg_match( '|^(_?[^_]+_)(.*)$|', $name, $matches ) ) {
			$hook_type = trim( $matches[1], '_' ); //Methods prefixed with _ are always hooked
			$hook_name = $matches[2];

			if ( ! in_array( $hook_type , array( 'theme', 'action', 'filter', 'shortcode' ) ) ) {
				return false;
			}

			return compact( 'hook_type', 'hook_name' );
		}

		return false;
	}
192056
public function exists(string $name): bool
    {
        $this->autoload();

        return \array_key_exists($name, $this->env);
    }
505334
public function has($name)
    {
        Types::assert(['string' => [$name]]);

        return array_key_exists(strtolower($name), $this->headers);
    }