I have downloaded last Mono source code (http://www.mono-project.com/,
version 2.0.1), the open source version of one of the most complex and
mature framework in the world, the .NET framework.
Framework is written using namespaces (as opposite to current version of
Zend). And I have analysed s
> Zend_Acl ==> Zend_Acl_Resource_Interface, Zend_Acl_Role_Interface,
> Zend_Acl_Role_Registry, Zend_Acl_Assert_Registry...
>
> Regard, Stan Vassilev
Stan, ZF doesn't use namespaces yet. This is not namespaced code.
Namespaced code requires different convention
(http://framework.zend.com/wiki/d
> > Why? I have developed framework using PHP namespaces and studied Zend
> > Framework source codes and result is: if we use the new resolution
rules
> > (1), than in nearly all cases developers must prefix class names
with \,
> > only in few cases prefix is not required. Why? Because usually
David Grudl wrote:
> Try to answer the question: what is the $obj instance of?
>
> namespace foo;
> $obj = $factory->loadClass('bar\class');
bar\class
dynamic class names are always FQN.
Greg
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/uns
Why? I have developed framework using PHP namespaces and studied Zend
Framework source codes and result is: if we use the new resolution rules
(1), than in nearly all cases developers must prefix class names with \,
only in few cases prefix is not required. Why? Because usually classes in
more
Are you aware of __NAMESPACE__? Also, if you are using a lot of
external namespace names, you might consider simply defining constants:
namespace foo\bar\baz;
const ns = __NAMESPACE__;
then you can simply do
use foo\bar\baz; $name = baz\ns;
I don't see a huge pressing need for nameof since t
"Stan Vassilev | FM" wrote:
> For me the only way to make it clear to both humans and parsers alike is
> the filepath semantics, in all places, including use. It's not perfect,
> there's no completely problem-free solution, but "prepend \ for absolute
> path" is able to become muscle memory, while
Stan Vassilev | FM wrote:
>> Hi Marcin,
>>
>> Stan also requested this, so it should be considered as a possibility.
>>
>> Personally, I would rather not introduce this land mine. It requires
>> the user to do an implicit prepending of namespace name ("foo") to "bar"
>> in the use statement as wel
Hi Marcin,
Stan also requested this, so it should be considered as a possibility.
Personally, I would rather not introduce this land mine. It requires
the user to do an implicit prepending of namespace name ("foo") to "bar"
in the use statement as well as a translation of "A", which could fast
Or Zend Framework source code. There is no class extending class from
subpackage (class Zend_View extends Zend_View_Abstract is not
subpackage, viz
http://framework.zend.com/wiki/display/ZFPROP/Naming+conventions+for+2.0+-+Matthew+Ratzloff).
*
> *In PHP nothing bubbles, hence this doesn't work.
I understand this new behaviour is same as using "relative paths", but
there is a common best practise to not make dependencies form topper
namespaces to deeper ones.
So it is rare to have class Company\Software\Base extending
Company\Software\Web\Forms\Control (i.e. Base extends Web\Forms\Contr
Lukas Kahwe Smith wrote:
>
> On 04.11.2008, at 18:43, Ryan Panning wrote:
>
>> Just to make my post clear, I'm in favor of this approach for
>> non-qualified calls in a namespace.
>>
>> 1. global
>> 2. autoload
>> 3. fail
>
>
> A couple of us (Hannes, Stas, Derick, Matt Wilson and I) were just
- people expect direct access to the vast number of php functions/
constants
Do you know rule 1 in #phpc? This is one of those cases.
People want :: and not backslash.
People want global stuff to resolve in their namespace (how does this make
any sense? the very idea of a namespace is to avoid
Here are some reasons why we felt that functions/constants should
fallback:
- most namespace users will be using classes and not functions
This is a self-fulfilling prophecy, the more you open a gap between classes
and functions, the more people will stick with the richer functionality
since
Here is a reason why we would limit this to international functions only:
- <@Stas> but note that global user-space fallback for function means
run-time resolution (which may be ok, but slower - no caching resolution
in bytecode cache)
Hi,
Not true: you can't resolve it at compile time wit
On 04.11.2008, at 18:43, Ryan Panning wrote:
Just to make my post clear, I'm in favor of this approach for non-
qualified calls in a namespace.
1. global
2. autoload
3. fail
A couple of us (Hannes, Stas, Derick, Matt Wilson and I) were just
chatting on IRC and we all favor the following:
16 matches
Mail list logo