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
11 matches
Mail list logo