public function getOperator(string $className, LeafType $type): AbstractOperator
    {
        if (!is_a($className, AbstractOperator::class, true)) {
            throw new Exception('Expects a FQCN implementing `' . AbstractOperator::class . '`, but instead got: ' . $className);
        }

        $key = Utils::getOperatorTypeName($className, $type);

        if (!isset($this->types[$key])) {
            $instance = new $className($this, $type);
            $this->registerInstance($instance);
        }

        return $this->types[$key];
    }
public function getOperator(string $className, LeafType $type): AbstractOperator
    {
        if (!is_a($className, AbstractOperator::class, true)) {
            throw new Exception('Expects a FQCN implementing `' . AbstractOperator::class . '`, but instead got: ' . $className);
        }

        $key = Utils::getOperatorTypeName($className, $type);

        if (!isset($this->types[$key])) {
            $instance = new $className($this, $type);
            $this->registerInstance($instance);
        }

        return $this->types[$key];
    }
public function getOperator ( string $ className , LeafType $ type ) : AbstractOperator { if ( ! is_a ( $ className , AbstractOperator :: class , true ) ) { throw new Exception ( 'Expects a FQCN implementing `' . AbstractOperator :: class . '`, but instead got: ' . $ className ) ; } $ key = Utils :: getOperatorTypeName ( $ className , $ type ) ; if ( ! isset ( $ this -> types [ $ key ] ) ) { $ instance = new $ className ( $ this , $ type ) ; $ this -> registerInstance ( $ instance ) ; } return $ this -> types [ $ key ] ; }
Returns an operator input type

This is for internal use only.

@param string $className the class name of an operator (`EqualOperatorType::class`)
@param LeafType $type

@throws Exception

@return AbstractOperator
Returns an operator input type