Skip to content

New Config helper #1071

Description

@lonnieezell

Inspired by #1070:

  • new CodeIgniter\Config\Config class with one public static method: get(). This takes a class name and returns an instance of the class.
  • By default it returns a shared instance, but a new instance can be returned by setting the second parameter to false, just like the Services class.
  • If the config name is fully qualified (Config\App) it will simply try to instantiate/cache and return.
  • If the config name does not include the namespace (App), it will attempt to discover the class similar to way the Services class does, though don't discover and preload all of them, just as requested.
  • new helper method, config() that is just a slightly nicer way of calling CodeIgniter\Config\Config::get().

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions