public function fetchHooks($class) {
		$hooks = [];

		$reader = new \Doctrine\Common\Annotations\SimpleAnnotationReader();
		$reader->addNamespace('Asgard\Hook\Annotation');
		if($this->cache) {
			$reader = new \Doctrine\Common\Annotations\CachedReader(
				$reader,
				$this->cache,
				$this->debug
			);
		}

		$reflection = new \ReflectionClass($class);
		foreach($reflection->getMethods() as $method) {
			$hookAnnot = $reader->getMethodAnnotation($method, 'Asgard\Hook\Annotation\Hook');
			if($hookAnnot !== null) {
				$hook = $hookAnnot->value;
				$hooks[$hook][] = [$class, $method->getName()];
			}
		}

		return $hooks;
	}
public function fetchHooks($class) {
		$hooks = [];

		$reader = new \Doctrine\Common\Annotations\SimpleAnnotationReader();
		$reader->addNamespace('Asgard\Hook\Annotation');
		if($this->cache) {
			$reader = new \Doctrine\Common\Annotations\CachedReader(
				$reader,
				$this->cache,
				$this->debug
			);
		}

		$reflection = new \ReflectionClass($class);
		foreach($reflection->getMethods() as $method) {
			$hookAnnot = $reader->getMethodAnnotation($method, 'Asgard\Hook\Annotation\Hook');
			if($hookAnnot !== null) {
				$hook = $hookAnnot->value;
				$hooks[$hook][] = [$class, $method->getName()];
			}
		}

		return $hooks;
	}
public function fetchHooks ( $ class ) { $ hooks = [ ] ; $ reader = new \ Doctrine \ Common \ Annotations \ SimpleAnnotationReader ( ) ; $ reader -> addNamespace ( 'Asgard\Hook\Annotation' ) ; if ( $ this -> cache ) { $ reader = new \ Doctrine \ Common \ Annotations \ CachedReader ( $ reader , $ this -> cache , $ this -> debug ) ; } $ reflection = new \ ReflectionClass ( $ class ) ; foreach ( $ reflection -> getMethods ( ) as $ method ) { $ hookAnnot = $ reader -> getMethodAnnotation ( $ method , 'Asgard\Hook\Annotation\Hook' ) ; if ( $ hookAnnot !== null ) { $ hook = $ hookAnnot -> value ; $ hooks [ $ hook ] [ ] = [ $ class , $ method -> getName ( ) ] ; } } return $ hooks ; }
Return the hooks of a container.
@param string $class HookContainer class.
@return array
Return the hooks of a container .