public function addHook(Hook $hook)
    {
        if (isset($this->hooks[$hook->name]) === false) {
            $this->logger->debug(
                "Adding definition for hook '{$hook->name}' for the first time."
            );
            $this->hooks[$hook->name] = [];
        }

        $this->hooks[$hook->name][] = $hook->definition;
    }
public function addHook(Hook $hook)
    {
        if (isset($this->hooks[$hook->name]) === false) {
            $this->logger->debug(
                "Adding definition for hook '{$hook->name}' for the first time."
            );
            $this->hooks[$hook->name] = [];
        }

        $this->hooks[$hook->name][] = $hook->definition;
    }
public function addHook ( Hook $ hook ) { if ( isset ( $ this -> hooks [ $ hook -> name ] ) === false ) { $ this -> logger -> debug ( "Adding definition for hook '{$hook->name}' for the first time." ) ; $ this -> hooks [ $ hook -> name ] = [ ] ; } $ this -> hooks [ $ hook -> name ] [ ] = $ hook -> definition ; }
Add hook definition to container

@param \SlaxWeb\Hooks\Hook $hook Hook definition
@return void
Add hook definition to container