Register the model generator
778759
protected function registerModel()
    {
        $this->app['generate.model'] = $this->app->share(function($app)
        {
            $generator = $this->app->make('Way\Generators\Generator');

            return new ModelGeneratorCommand($generator);
        });

        $this->commands('generate.model');
    }
517287
def register():
    
    try:
        signals.article_generator_init.connect(feed_parser_initialization)
        signals.article_generator_context.connect(fetch_github_activity)
    except ImportError:
        logger.warning('`github_activity` failed to load dependency `feedparser`.'
                       '`github_activity` plugin not loaded.')
1119331
def build_model_name(cls, name='modelName', output_name='output'):
        
        obj = cls(name)
        obj.exporter = 'generate_model_name'
        obj.output_name = output_name
        return obj
451016
def register():
    """"""
    if webassets:
        signals.initialized.connect(add_jinja2_ext)
        signals.generator_init.connect(create_assets_env)
    else:
        logger.warning('`assets` failed to load dependency `webassets`.'
                       '`assets` plugin not loaded.')
1025016
def register_element(self, model, idx):
        

        if idx is None:
            idx = model + '_' + str(len(self._idx_model))

        self._idx_model[idx] = model
        self._idx.append(idx)

        return idx
31885
def register(self, *handlers, **params):
        
        for handler in handlers:

            if issubclass(handler, PWModel):
                handler = type(
                    handler._meta.db_table.title() + 'Admin',
                    (PWAdminHandler,), dict(model=handler, **params))
                self.app.register(handler)
                continue

            name = handler.name.lower()
            self.handlers[name] = handler
1072927
protected function registerGenerator()
	{
		$this->app->bindShared('command.controller.make', function($app)
		{
			// The controller generator is responsible for building resourceful controllers
			// quickly and easily for the developers via the FlyConsole CLI. We'll go ahead
			// and register this command instances in this container for registration.
			$path = $app['path'].'/controllers';

			$generator = new ControllerGenerator($app['files']);

			return new MakeControllerCommand($generator, $path);
		});
	}
639239
def register(self, entry_point):
        
        if entry_point in self.registered_converters:
            raise ValueError('Already registered')
        self.registered_converters.insert(0, entry_point)
875593
def _register_user_models(user_models, admin=None, schema=None):
    
    if any([issubclass(cls, AutomapModel) for cls in user_models]):
        AutomapModel.prepare(  # pylint:disable=maybe-no-member
                               db.engine, reflect=True, schema=schema)

    for user_model in user_models:
        register_model(user_model, admin)
168461
def generate(engine, database, models, **kwargs):
    '''
    
    '''
    validate_args(engine, database, models)
    generator = Generator(engine, database, models)
    generator.run()
894109
def register_model(klass)
      LOCK.synchronize do
        models.push(klass) unless models.include?(klass)
      end
    end
41207
def register():
    """"""
    from pelican import signals

    signals.initialized.connect(setup_gist)

    signals.article_generator_finalized.connect(replace_gist_tags)
467142
def _expose_models(cls):
        
        if db._IS_OK_:
            register_models(**{m.__name__: m
                               for m in db.Model.__subclasses__()
                               if not hasattr(models, m.__name__)})
492459
def register_models(**kwargs):
    
    [setattr(models, k, v) for k, v in kwargs.items()]
1027862
def generate(model, config, manifest, source_config=None, provider=None):
    
    return generate_model(model, config, manifest, source_config, provider)
1219892
def addModel(self, moduleName, modelName, model):
        
        modelIdentifier = "{}.{}".format(moduleName, modelName)
        if modelIdentifier not in self._models:
            self._models[modelIdentifier] = model
        else:
            message = "Application - addModel() - " \
                      "A model with the identifier {} already exists." \
                      .format(modelIdentifier)
            raise Exception(message)
201058
def generate_models(args):
  """"""
  data_table = get_data_table(args.filename)
  tables = to_tables(data_table.rows_to_dicts())
  attr_indent = "\n" + args.indent * 2
  attr_sep = "," + attr_indent

  for tname, cols in tables.items():
    model_name = table_to_model_name(tname, list(cols.values())[0]["table_schema"])
    pk_cols, oth_cols = split_pks(cols)
    timestamps = get_timestamps(cols, args.created_at_col_name, args.updated_at_col_name)
    is_auto = len(pk_cols) == 1 and cols[pk_cols[0]]["is_auto"] == "t"

    attrs = OrderedDict()
    for cname in oth_cols:
      if cname not in timestamps:
        attrs[cname] = None

    print(_MODEL_SOURCE.format(
      class_name=model_name,
      base_class_name="ModelBase",
      indent=args.indent,
      table_name=repr(tname),
      pk_name=repr(pk_cols[0] if len(pk_cols) == 1 else pk_cols),
      pk_is_auto=is_auto,
      timestamps=timestamps,
      attrs="dict(" + attr_indent + attr_sep.join("{0}={1}".format(k, v) for k, v in attrs.items()) + ")"))
    print()