Skip to content

Can we arrange our classes in multiple directories? #16

@badar121

Description

@badar121

In the classes_dir parameter, we have to specify the directory where our classes are located which we want to use for autoloading. For example, you said that if the classes are in the 'src' directory we have to specify 'src', and if the classes are in the root directory, nothing needs to be set.

My question is if we have split our classes into different directories, for example:
In root_dirctory/admin/includes (it holds admin classes) and root_directory/public/includes (it holds public classes)

In the above scenario, what do we have to specify in the classes_dir parameter? Should we leave it empty or should we write the name of both directories that holds our classes like:

'namespace_prefix' => 'My_Project',
'classes_dir' => [ 'admin', 'public' ]

Looking forward to your instructions on it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions