-
Notifications
You must be signed in to change notification settings - Fork 327
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
Constants defined in kohana/index.php (application) #568
Comments
|
|
|
Class must be static (to be available everywhere) and may include the methods for autoloading classes, constant with file extension.
|
We're trying to move away from static classes. What you see there is just a mock @zombor did, it's not the final solution. Having it as an object provides infinite benefits over having it static and IMHO should stay that way. Passing / injecting the Filesystem object should be something the developer takes care of. |
@kemo 👍 @WinterSilence you should follow the fashion 💅 ... |
a huge milestone... |
What are the advantages of such an option? For example, I want to display in the template(view) list of paths, how to get this object? |
|
@cyrgit You're right, I made a mistake in translation. But then I do not understand how you plan to dynamically use the helpers (Arr, HTML, etc) - I do not see in the project implementation of pattern "service locator" or something similar. For example, I want to display in the template(view) list of paths, how to get this object? Describe at least schematically. |
@WinterSilence think of it as If there is no way to get the object to another object that needs it, something else is wrong - in that case you'd probably be doing it via a DI container / service manager. Filesystem (object) -> App\Kohana\Whatever (object) -> wherever else you need it. And you'll be able to have multiple "filesystems", it doesn't have to always be the "main one" current app is relying on |
And yes, those 'helpers' are in essence procedural function containers (which is ok as long as they have no external dependencies - which they usually don't). |
Then at the beginning to create an environment in which your solution can work, and after that start to create them. If the new environment is absent, then need use the old environment and delay global changes until the next release.
Filesystem have external dependencies? |
@cyrgit I've said that your code is not perfect - read the title |
@cyrgit Why you think that I don't know DI?)) I'm trying to say: each project has its own "face" (style). |
If your opponent has a different point of view, it does not mean that he is not familiar with your.
Answer this question, by the way, I did not see. I did not say anything about the factory. P.s. Builder must use the "lazy" loading and cascade system, once you make a module for Kohana. |
Write abstract http application that execute a Request, launched Controller, returned View displayed paths of Filesystem.
Also cascading filesystem used in config. |
defined('SYSPATH') OR die('No direct script access.');
in class, i18n, message files.Why not use Kohana::VERSION instead SYSPATH?
The text was updated successfully, but these errors were encountered: