Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom rule for determining the path to the view file #126

Open
DAGpro opened this issue Sep 6, 2024 · 0 comments
Open

Custom rule for determining the path to the view file #126

DAGpro opened this issue Sep 6, 2024 · 0 comments
Labels
type:feature New feature

Comments

@DAGpro
Copy link

DAGpro commented Sep 6, 2024

Add the ability to customize the view file path definition rule

if (preg_match('/(?:.*controller\\\|.*controllers\\\)([\w\\\]+)controller$/iU', $class, $m) && !empty($m[1])) {
$name = $m[1];
} elseif (preg_match('/(\w+)controller$/iU', $class, $m) && !empty($m[1])) {
$name = $m[1];
} else {
throw new RuntimeException('Cannot detect controller name.');
}

@vjik vjik added the type:feature New feature label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature
Projects
None yet
Development

No branches or pull requests

2 participants