public function applyDefaults($definition)
    {
        if (!is_array($definition)) {
            return $definition;
        }

        if (!isset($definition['component'])) {
            throw new AppException('Missing required "component" key in listener definition');
        }

        return array_merge($this->defaults, $definition);
    }
public function applyDefaults($definition)
    {
        if (!is_array($definition)) {
            return $definition;
        }

        if (!isset($definition['component'])) {
            throw new AppException('Missing required "component" key in listener definition');
        }

        return array_merge($this->defaults, $definition);
    }
public function applyDefaults ( $ definition ) { if ( ! is_array ( $ definition ) ) { return $ definition ; } if ( ! isset ( $ definition [ 'component' ] ) ) { throw new AppException ( 'Missing required "component" key in listener definition' ) ; } return array_merge ( $ this -> defaults , $ definition ) ; }
Applies default values or missing properties to listener definition

@param array|callable $definition

@return array
@throws AppException
Applies default values or missing properties to listener definition