M
M
Maxim2015-11-20 14:06:58
Yii
Maxim, 2015-11-20 14:06:58

How to get path from ControllerNamespace?

Good afternoon. You need to get the path to the controllers folder from the controllerNamespace parameter of the module.

$path = Yii::getAlias($module->controllerNamespace));

The code above returns an alias, as does the code below.
$path = $module->controllerNamespace;
How to get the path to the folder with controllers correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Kudinov, 2015-11-20
@Frostealth

Module::$controllerPath

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question