Hello,
Je suis d'accord avec Eka!!
Ils l'ont prévu aussi pour PHP 6 et je le code pas trés sexy.
Faire :
include('./utils_left.php');
include('./utils_right.php');
Utils\Left\whichHand(); // outputs "I'm using my left hand!"
Utils\Right\whichHand(); // outputs "I'm using my right hand!"
use Utils\Left;
whichHand(); // outputs "I'm using my left hand!"
use Utils\Right;
whichHand(); // outputs "I'm using my right hand!"
Pour utiliser deux classes avec la même méthode, moi je prefère faire :
include('./UtilsLeft.php');
include('./UtilsRight.php');
UtilsLeft::whichHand(); // outputs "I'm using my left hand!"
UtilsRight::whichHand(); // outputs "I'm using my right hand!"
Et faire des fonctions statiques.
Y a moins de code!
Nairus ;)
Le 16 janvier 2009 12:23, ekameleon <[email protected]> a écrit :
> Hello :)
> Leur manque vraiment les packages... sans cela c'est trop le foutoir je
> trouve :)
>
> eKA+ :)
>
> 2009/1/16 zwetan <[email protected]>
>
>
>> dans la mouture 5.3 ils ont ajoutés des namespaces
>>
>> revu dans le detail ici
>>
>> http://www.ibm.com/developerworks/opensource/library/os-php-5.3new3/index.html?ca=dgr-lnxw07PHP5.3namespaces&S_TACT=105AGX59&S_CMP=grsitelnxw07
>>
>>
>> intéressant
>>
>> zwetan
>>
>>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
Vous avez reçu ce message, car vous êtes abonné au groupe Groupe "FCNG" de
Google Groupes.
Pour transmettre des messages à ce groupe, envoyez un e-mail à
l'adresse [email protected]
Pour résilier votre abonnement à ce groupe, envoyez un e-mail à
l'adresse [email protected]
Pour afficher d'autres options, visitez ce groupe à l'adresse
http://groups.google.com/group/FCNG?hl=fr
-~----------~----~----~----~------~----~------~--~---