RE: [PHP-DEV] a way to fix the import issue

2007-10-04 Thread Dmitry Stogov
mitry Stogov > Cc: 'Stanislav Malyshev'; 'php-dev'; 'Benjamin Schulz' > Subject: Re: [PHP-DEV] a way to fix the import issue > > > Dmitry Stogov wrote: > > In your example : > > > > > namespace Foo; > > import Blah::Exception; > &g

Re: [PHP-DEV] a way to fix the import issue

2007-10-04 Thread Gregory Beaver
Dmitry Stogov wrote: > In your example : > > namespace Foo; > import Blah::Exception; > $a = new Exception; > ?> > > "new Exception" refer to "Blah::Exception" and will fail if such class > doesn't exists. > > "import Blah::Exception" creates an alias with short name "Exception" only > for curr

Re: [PHP-DEV] a way to fix the import issue

2007-10-04 Thread Gregory Beaver
Dmitry Stogov wrote: > In your example : > > namespace Foo; > import Blah::Exception; > $a = new Exception; > ?> > > "new Exception" refer to "Blah::Exception" and will fail if such class > doesn't exists. > > "import Blah::Exception" creates an alias with short name "Exception" only > for curr

RE: [PHP-DEV] a way to fix the import issue

2007-10-04 Thread Dmitry Stogov
") May be I didn't understood the question. :) Thanks. Dmitry. > -Original Message- > From: Stanislav Malyshev [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 04, 2007 12:50 AM > To: Greg Beaver; Dmitry Stogov > Cc: php-dev; Benjamin Schulz > Subject: Re:

Re: [PHP-DEV] a way to fix the import issue

2007-10-03 Thread Stanislav Malyshev
should in fact be implicitly importing Blah::Exception as if it were Foo::Exception, rather than as ::Exception. In other words, I would actually expect the above code to be equivalent to: No, not really. It's equivalent to: There's no class named Foo::Exception and import does not create