Skip to content

Ability to add namespace to FileLocator class #1552

Closed
@amigoscs

Description

@amigoscs

I add a namespace (Services::autoloader()->addNamespace()) and expect the FileLocator class to look for my class also in the added namespace, but this does not happen.

Example:

In my controller
Services::autoloader()->addNamespace('MyPlugin', APPPATH . 'Plugins/MyPlugin/');

Next, I try to access the language file
Lang('MyPlugin.title')

I expect the Language class will also load the file along the way
APPPATH . 'Plugins/MyPlugin/Language/{locale}/MyPlugin.php

but this is not happening

CodeIgniter 4 version
CodeIgniter 4.0.0 alpha 2

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