Get type of hook.

@param $name

@return string
545638
public function type($name)
    {
        $hook = $this->hooks()->where('name', $name)->first();

        if (!is_null($hook)) {
            return $hook->type;
        }
    }
138125
protected function getArg ($name)
	{
		
		if (isset ($this->request['post'][$name]))
		{
			return $this->request['post'][$name];
		}
		else
		{
			return $this->getURLArg ($name);
		}
		
	}
728723
function getHook(className, hookType) {
  if (hooks[className] && hooks[className][hookType]) {
    return hooks[className][hookType];
  }
  return undefined;
}
905440
public function getPropertyType(string $name)
    {
        return isset($this->propertyTypeMap[$name]) ? $this->propertyTypeMap[$name] : null;
    }
920800
public static function getHookCommand(string $hook) : string
    {
        if (!self::isValid($hook)) {
            throw new RuntimeException(sprintf('Hook \'%s\' is not supported', $hook));
        }
        return Hooks::getValidHooks()[$hook];
    }
1036429
private function getTypeByName($name)
    {
        if (isset($this->types[$name])) {
            return $this->doctrine
                ->getRepository('AnimeDbCatalogBundle:Type')
                ->find($this->types[$name]);
        }
    }
601031
public function getOption($name)
    {
        return isset($this->optionMapping[$name]) ? $this->optionMapping[$name] : null;
    }
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 [];
    }
134572
public static function create($name) {
		$name = static::slug($name);
		static::$hooks[$name] = new static($name);
		return self::$hooks[$name];
	}
1343453
public function getValueType($name)
    {
        if (!$this->isParsed) {
            $this->parseDefinitions();
        } //if

        $longName = (strlen($name) == 1 ? ( isset($this->shortNames[$name]) ? $this->shortNames[$name] : '') : $name);

        if (isset($this->longNames[$longName]['parameterType'])
            && $this->longNames[$longName]['parameterType'] !== false) {
            return $this->longNames[$longName]['parameterType'];
        } else {
            return '';
        } //if
    }
193680
public function applyChain($name, $hookArg = null)
    {
        $hooks = $this->app->getHooks();

        if (!isset($hooks[$name])) {
            $hooks[$name] = array(array());
        }
        if (!empty($hooks[$name])) {
            // Sort by priority, low to high, if there's more than one priority
            if (count($hooks[$name]) > 1) {
                ksort($hooks[$name]);
            }
            foreach ($hooks[$name] as $priority) {
                if (!empty($priority)) {
                    foreach ($priority as $callable) {
                        $value = call_user_func($callable, $hookArg);
                        if ($value !== null) {
                            return $value;
                        }
                    }
                }
            }
        }
    }
1299834
public function types($name)
    {
        $return = [];
        foreach ($this->controls as $control) {
            if ((method_exists($control, 'getType') ? $control->getType() : $control->type) == $name) {
                array_push($return, $control);
            }
        }
        return $return;
    }
932395
protected function getTokenValue($name)
    {
        $method = "get{$name}";
        
        if ($this->hasMethod($method)) {
            return $this->{$method}();
        }
        
        return $this->$name;
    }
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;
	}
508780
public function getFieldType($name)
    {
        $type = pg_field_type($this->handler, $this->getFieldNumber($name));

        return $type !== 'unknown' ? $type : null;
    }
568607
final public function getPropertyType($name) {

		if (in_array($name, ['db', 'loadedFromDb', 'typeList', 'errors'])) {
			$type = NULL;
		} else if (array_key_exists($name, $this->typeList)) {
			$type = $this->typeList[$name];
		} else {
			$type = 'string';
		}

		return $type;
	
	}
1218862
public function applyHook($name)
    {
        $calls = $this->getHooks($name);
        usort($calls, function ($a, $b) {
            return ($b[1] - $a[1]);
        });
        $args = func_get_args();
        array_shift($args);
        $rets = [];
        foreach ($calls as list($call, $priority)) {
            $rets[] = call_user_func_array($call, $args);
        }
        return $rets;
    }