public function register(EntityDefinition $builder): void {
    $this->defs[$builder->full_name] = $builder;
    $this->unchecked[] = $builder;

    $binding_name = str_replace('\\', '.', $builder->full_name);
    $this->ioc->bind('bap.remodel.scopes.' . $binding_name, function() use($builder) {
      return $builder->scopes;
    });

    foreach($builder->virtuals as $virtual) {
      $this->ioc->bind("bap.remodel.virtuals.{$binding_name}.{$virtual->alias}", function() use($virtual) {
        return $virtual->callback;
      });
    }

    $this->tailor->bindCallback($builder->full_name, function(Generator $gen) use($builder): void {
      $this->checkDefinitions();

      $file = $gen->generate('Entity', $builder->toArray());
      $gen->includeFile($file);
    });

    foreach(static::CLASS_SUFFIXES as $class) {
      $this->tailor->bindCallback($builder->full_name . $class, function(Generator $gen) use($builder, $class): void {
        $this->checkDefinitions();

        $file = $gen->generate($class, $builder->toArray());
        $gen->includeFile($file);
      });
    }
  }
public function register(EntityDefinition $builder): void {
    $this->defs[$builder->full_name] = $builder;
    $this->unchecked[] = $builder;

    $binding_name = str_replace('\\', '.', $builder->full_name);
    $this->ioc->bind('bap.remodel.scopes.' . $binding_name, function() use($builder) {
      return $builder->scopes;
    });

    foreach($builder->virtuals as $virtual) {
      $this->ioc->bind("bap.remodel.virtuals.{$binding_name}.{$virtual->alias}", function() use($virtual) {
        return $virtual->callback;
      });
    }

    $this->tailor->bindCallback($builder->full_name, function(Generator $gen) use($builder): void {
      $this->checkDefinitions();

      $file = $gen->generate('Entity', $builder->toArray());
      $gen->includeFile($file);
    });

    foreach(static::CLASS_SUFFIXES as $class) {
      $this->tailor->bindCallback($builder->full_name . $class, function(Generator $gen) use($builder, $class): void {
        $this->checkDefinitions();

        $file = $gen->generate($class, $builder->toArray());
        $gen->includeFile($file);
      });
    }
  }
public function register ( EntityDefinition $ builder ) : void { $ this -> defs [ $ builder -> full_name ] = $ builder ; $ this -> unchecked [ ] = $ builder ; $ binding_name = str_replace ( '\\' , '.' , $ builder -> full_name ) ; $ this -> ioc -> bind ( 'bap.remodel.scopes.' . $ binding_name , function ( ) use ( $ builder ) { return $ builder -> scopes ; } ) ; foreach ( $ builder -> virtuals as $ virtual ) { $ this -> ioc -> bind ( "bap.remodel.virtuals.{$binding_name}.{$virtual->alias}" , function ( ) use ( $ virtual ) { return $ virtual -> callback ; } ) ; } $ this -> tailor -> bindCallback ( $ builder -> full_name , function ( Generator $ gen ) use ( $ builder ) : void { $ this -> checkDefinitions ( ) ; $ file = $ gen -> generate ( 'Entity' , $ builder -> toArray ( ) ) ; $ gen -> includeFile ( $ file ) ; } ) ; foreach ( static :: CLASS_SUFFIXES as $ class ) { $ this -> tailor -> bindCallback ( $ builder -> full_name . $ class , function ( Generator $ gen ) use ( $ builder , $ class ) : void { $ this -> checkDefinitions ( ) ; $ file = $ gen -> generate ( $ class , $ builder -> toArray ( ) ) ; $ gen -> includeFile ( $ file ) ; } ) ; } }
Register an Entity definition.  Note this method DOES NOT generate the classes.  They are generated when needed.

@param  EntityDefinition  $builder

@return  void
Register an Entity definition . Note this method DOES NOT generate the classes . They are generated when needed .