protected function instantiateCompiler(string &$className, &$description): CompilerInterface {
        if(is_array($description)) {
            $class = $description[ self::COMPILER_CLASS_KEY ] ?? $className;
            if(!isset($description[ self::COMPILER_ID_KEY ]))
                $description[ self::COMPILER_ID_KEY ] = $className;

            $id = $description[ self::COMPILER_ID_KEY ];
            if($args = $description[ self::COMPILER_ARGUMENTS_KEY ] ?? NULL) {
                return new $class($id, ...array_values($args));
            } else {
                return new $class($id, $description);
            }
        } else {
            // $className is compiler id and $description is class name
            $instance =  new $description($className);
            $description = [
                self::COMPILER_ID_KEY => $className
            ];
            return $instance;
        }
    }
protected function instantiateCompiler(string &$className, &$description): CompilerInterface {
        if(is_array($description)) {
            $class = $description[ self::COMPILER_CLASS_KEY ] ?? $className;
            if(!isset($description[ self::COMPILER_ID_KEY ]))
                $description[ self::COMPILER_ID_KEY ] = $className;

            $id = $description[ self::COMPILER_ID_KEY ];
            if($args = $description[ self::COMPILER_ARGUMENTS_KEY ] ?? NULL) {
                return new $class($id, ...array_values($args));
            } else {
                return new $class($id, $description);
            }
        } else {
            // $className is compiler id and $description is class name
            $instance =  new $description($className);
            $description = [
                self::COMPILER_ID_KEY => $className
            ];
            return $instance;
        }
    }
protected function instantiateCompiler ( string & $ className , & $ description ) : CompilerInterface { if ( is_array ( $ description ) ) { $ class = $ description [ self :: COMPILER_CLASS_KEY ] ?? $ className ; if ( ! isset ( $ description [ self :: COMPILER_ID_KEY ] ) ) $ description [ self :: COMPILER_ID_KEY ] = $ className ; $ id = $ description [ self :: COMPILER_ID_KEY ] ; if ( $ args = $ description [ self :: COMPILER_ARGUMENTS_KEY ] ?? NULL ) { return new $ class ( $ id , ... array_values ( $ args ) ) ; } else { return new $ class ( $ id , $ description ) ; } } else { // $className is compiler id and $description is class name $ instance = new $ description ( $ className ) ; $ description = [ self :: COMPILER_ID_KEY => $ className ] ; return $ instance ; } }
Method is called with the key and value pair of compiler description. See getCompilerDescriptions to learn how it is formatted.

@param string $className
@param $description
@return CompilerInterface
@see AbstractExtendedCompilerFactory::getCompilerDescriptions()
Method is called with the key and value pair of compiler description . See getCompilerDescriptions to learn how it is formatted .