On Jan 20, 2008, at 7:40 AM, leam wrote:
How does the require in:
require 'MyProject/Db/Connection.php';
from http://www.php.net/manual/en/language.namespaces.using.php
know that it's a namespace and not a filepath?
Hi Leam,
It still is a path. It's including the file MyProject/Db/
On Wed, 2008-01-16 at 13:12 -0500, Rob Marscher wrote:
> Jon Baer posted some good links about namespaces in php... but I'm
> surprised no one posted this link:
> http://php.net/manual/en/language.namespaces.php
How does the require in:
require 'MyProject/Db/Connection.php';
from http
On Jan 11, 2008, at 11:23 AM, Jim Hendricks wrote:
How crazy would it be if PHP had namespaces and a namespace
registration.
Jon Baer posted some good links about namespaces in php... but I'm
surprised no one posted this link:
http://php.net/manual/en/language.namespaces.php
At 11:23 AM -0500 1/11/08, Jim Hendricks wrote:
When Palm opened up the platform for 3rd party programming, they
created a registration page for the database type id's. This
allowed for global registration which would eliminate namespace
collissions so long as programmers registered the id's t
Namespaces are supposed to be analogous to folders in the file system.
Folders are how we prevent file name collisions, and namespaces are
how we prevent function/classname collisions. If you have a bunch of
files that might have the same names as an existing file, then you
just create a new fold
UDDI is trying to do the same thing (with limited success, I've only
looked at their Web Services registration)... check out:
http://en.wikipedia.org/wiki/Universal_Description_Discovery_and_Integration
Additionally, if you'd like to release software that won't have a
namespace conflict, purchase
When Palm opened up the platform for 3rd party programming, they created
a registration page for the database type id's. This allowed for global
registration which would eliminate namespace collissions so long as
programmers registered the id's they were using prior to distro.
Don't know how
David Krings wrote:
Thank you for the great explanation. It triggers yet another question:
What to do if two namespaces are identical? Doesn't that end up to be
the same problem? And if one changes the namespace for one, doesn't
that require to change code referencing functions and classes f
Kenneth Downs wrote:
Namespaces are an organizing mechanism, usually associated with classes.
Think: Class::functions as Namespaces::classes
So let's begin with functions. David Krings writes a nifty function
called "ValidateEmail()" and puts in a library. Then Ken Downs writes
the sa
Namespaces are an organizing mechanism, usually associated with classes.
Think: Class::functions as Namespaces::classes
So let's begin with functions. David Krings writes a nifty function
called "ValidateEmail()" and puts in a library. Then Ken Downs writes
the same function in a diffe
Its also good to scan the last php-internals list and grep for
Namespaces discussions as things can automagically change on you :-)
http://marc.info/?l=php-internals&m=118355320225178&w=2
http://marc.info/?l=php-internals&m=119308858512331&w=2
- Jon
On Jan 10, 2008, at 8:07 PM, David Krings w
Kristina Anderson wrote:
I think this has something to do with variable scope? Such as, in ASP
(like VB), if you declare a variable i within a function, it loses
scope after the function executes and you can have another variable i
outside a function which stays in scope (this is NOT necessari
I think this has something to do with variable scope? Such as, in ASP
(like VB), if you declare a variable i within a function, it loses
scope after the function executes and you can have another variable i
outside a function which stays in scope (this is NOT necessarily a
good thing, either).
David Krings wrote:
Hi!
I got sucked into a (probably pointless) discussion about ASP vs. PHP.
One of the arguments against using PHP was that there is only a single
namespace. Uhm, that took the wind out of my sail as I have no clue what
a namespace is and why having only one is really bad.
In a few words, one namespace is a way to organize code into scopes.
By doing this, you prevent collisions when mixing libraries.
One example...
Packages Creole, Doctrine and PEAR_DB. All of them has one class named
Connection (Ok, I know they already differ in names, but this is just
one example
Hi!
I got sucked into a (probably pointless) discussion about ASP vs. PHP. One of
the arguments against using PHP was that there is only a single namespace.
Uhm, that took the wind out of my sail as I have no clue what a namespace is
and why having only one is really bad.
Anyone can explain
16 matches
Mail list logo