src/CodeGenerator/CodeGeneratorRegistry.php
public static function register(CodeGeneratorInterface $codeGenerator)
    {
        $class = get_class($codeGenerator);
        if (!defined("$class::ENTITY_CLASS")) {
            throw new \Exception($class . ' must define a ENTITY_CLASS constant.');
        }
        if (!defined("$class::ENTITY_FIELD")) {
            throw new \Exception($class . ' must define a ENTITY_FIELD constant.');
        }
        self::$generators[$codeGenerator::ENTITY_CLASS][$codeGenerator::ENTITY_FIELD] = $codeGenerator;
    }
public static function register(CodeGeneratorInterface $codeGenerator)
    {
        $class = get_class($codeGenerator);
        if (!defined("$class::ENTITY_CLASS")) {
            throw new \Exception($class . ' must define a ENTITY_CLASS constant.');
        }
        if (!defined("$class::ENTITY_FIELD")) {
            throw new \Exception($class . ' must define a ENTITY_FIELD constant.');
        }
        self::$generators[$codeGenerator::ENTITY_CLASS][$codeGenerator::ENTITY_FIELD] = $codeGenerator;
    }
public static function register ( CodeGeneratorInterface $ codeGenerator ) { $ class = get_class ( $ codeGenerator ) ; if ( ! defined ( "$class::ENTITY_CLASS" ) ) { throw new \ Exception ( $ class . ' must define a ENTITY_CLASS constant.' ) ; } if ( ! defined ( "$class::ENTITY_FIELD" ) ) { throw new \ Exception ( $ class . ' must define a ENTITY_FIELD constant.' ) ; } self :: $ generators [ $ codeGenerator :: ENTITY_CLASS ] [ $ codeGenerator :: ENTITY_FIELD ] = $ codeGenerator ; }
Registers an entity code generator service.

@param CodeGeneratorInterface $codeGenerator the entity code generator service

@throws \Exception
Registers an entity code generator service .