Closed Hywan closed 10 years ago
:+1: It was a python like feature about modules loading but we see that php world don't seem to be ready for that.
Anyway could be a proposal for php itself, we can open a subject on the php ml.
@shouze use
does the exact same things so… However, from
/import
go deeper. We will just replace this construction by the use
keyword, but the code behind will stay since it is very important for Hoa in some places.
I have a question about how format we will implement for use
.
is FQDN or just the package ?
Example with import:
-> import('Dispatcher.Basic')
-> import('Router.Http')
-> import('Locale.Localizer.Coerce');
Use with only package:
use \Hoa\Dispatcher; //new Dispatcher\Basic();
use \Hoa\Router; //new Router\Http();
use \Hoa\Locale; //new Locale\Locale();
Use with FQDN:
use \Hoa\Dispatcher\Basic; //new Basic();
use \Hoa\Router\Http; //new Http();
use \Hoa\Locale; //new Locale();
We are going to declare only the library names I think, no the whole classnames (not necessary).
:+1: is also what I think.
How do you want organise the cleaning file, each person who want clean a library must open new issue or only do PR ?
@Pierozi As you want.
See http://wiki.hoa-project.net/projects:central:todo for the progression.
Hello :-),
As discussed during Apex'14, we are going to drop
from
/import
. This construction is totally optionnal but it seems to be a “brake” for new incomers. Consequently, we are going to drop all of them.Thoughts?