Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter 4 Pre-Alpha 1: $viewPath - make it multiple
#1

CodeIgniter 4 Pre-Alpha 1
class CodeIgniter\View\View

The constructor contains the parameter string $viewPath=null. This means that only one path to be scanned for a searched view is allowed.

I think that more flexibility will be achieved if the class is capable to scan several directories until it finds a matching view. So the parameter $viewPath could be an array. Also, additional methods addPath() and prependPath() could be added.
Reply
#2

Originally, my thought was that by being able to specify a "namespace" with it, you wouldn't need multiple path support. I can see how it might be handy, though, so I guess I'm on the fence about this one at the moment. We'll see what others say before making any changes.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB