public function getHandlerFor(string $type)
    {
        if (empty($this->handlers[$type])) {
            throw new \InvalidArgumentException('There is no handler for the "'.$type.'" criteria type.');
        } elseif (is_object($this->handlers[$type]) && $this->handlers[$type] instanceof CriteriaHandler) {
            return $this->handlers[$type];
        }

        return new $this->handlers[$type];
    }
public function getHandlerFor(string $type)
    {
        if (empty($this->handlers[$type])) {
            throw new \InvalidArgumentException('There is no handler for the "'.$type.'" criteria type.');
        } elseif (is_object($this->handlers[$type]) && $this->handlers[$type] instanceof CriteriaHandler) {
            return $this->handlers[$type];
        }

        return new $this->handlers[$type];
    }
public function getHandlerFor ( string $ type ) { if ( empty ( $ this -> handlers [ $ type ] ) ) { throw new \ InvalidArgumentException ( 'There is no handler for the "' . $ type . '" criteria type.' ) ; } elseif ( is_object ( $ this -> handlers [ $ type ] ) && $ this -> handlers [ $ type ] instanceof CriteriaHandler ) { return $ this -> handlers [ $ type ] ; } return new $ this -> handlers [ $ type ] ; }
Get the handler for the given criteria type.

@param string $type

@return CriteriaHandler
Get the handler for the given criteria type .