| |||||
| Auteur | Sujet : Model View Controller (MVC) - Architecture des applications PHP |
|---|---|
masklinn í dag viðrar vel til loftárása | Reprise du message précédent :
Même en java je peux le faire, c'est dire Exemple en Python:
Et justement, pour des méthodes genre findAll pour lesquelles on a absolument aucun besoin des infos contenues dans une instance, c'est complètement logique d'en faire des classmethods
Mais effectivement, j'avais oublié qu'en PHP, "->" ne peut être utilisé que pour accéder aux membres d'une instance et pas à ceux d'une classe, ça m'aurait mis la puce à l'oreille, j'ai mal joué sur le coup Message cité 1 fois Message édité par masklinn le 29-07-2007 à 15:34:09 --------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
Publicité | Posté le 29-07-2007 à 15:32:25 ![]() ![]() |
FlorentG |
|
masklinn í dag viðrar vel til loftárása |
Après c'est un peu merdique à utiliser (genre on peut pas instancier avec new, il faut appeler newInstance sur l'objet Class récupéré, genre Foo.class.newInstance, et ça renvoie un Object qu'il faut ensuite caster, sans compter qu'on se mange deux checked exceptions à traiter) exemple:
Message édité par masklinn le 29-07-2007 à 15:59:07 --------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
vanadium N° Atomique : 23 | Masklinn > Je jette l'éponge, certains auront toujours raison tandis que d'autres avanceront en ayant compris leurs erreurs. |
supermofo Hello World ! |
--------------- Echange de 3000+ liens PR 3 -> 5, me pm urgent ! |
masklinn í dag viðrar vel til loftárása |
Message cité 1 fois Message édité par masklinn le 29-07-2007 à 17:51:03 --------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
Shinuza This is unexecpected |
--------------- Mains power can kill, and it will hurt the entire time you’re dying from it. |
nORKy Grmmph... | On dirait des gamins...
|
Publicité | Posté le 30-07-2007 à 09:36:07 ![]() ![]() |
FlorentG |
|
Dj YeLL $question = $to_be || !$to_be; |
--------------- Gamertag: CoteBlack YeLL |
omega2 |
|
FlorentG | En PHP5, vaut mieux utiliser la fonction spl_autoload_register, qui permet d'enregistrer des méthodes d'instance |
masklinn í dag viðrar vel til loftárása |
--------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
FlorentG |
gizmo |
|
FlorentG | Avec spl_autoload_register, tu peux en enregistrer plusieurs. Suffit après que tes classes soit préfixées et ça devrait le faire |
omega2 |
masklinn í dag viðrar vel til loftárása |
edit: apparement non Message édité par masklinn le 30-07-2007 à 14:35:15 --------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
Shinuza This is unexecpected | Ptain, au lieu de vouloir faire un clone de java, il devrait peut-être commencer par rajouter finally. --------------- Mains power can kill, and it will hurt the entire time you’re dying from it. |
FlorentG |
|
masklinn í dag viðrar vel til loftárása |
--------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
omega2 | C'est comme en voiture, personne ne respecte le code (de la route), tout le monde fait comme il veut quand il veut. Message cité 1 fois Message édité par omega2 le 30-07-2007 à 14:55:48 |
masklinn í dag viðrar vel til loftárása |
--------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
Dj YeLL $question = $to_be || !$to_be; |
--------------- Gamertag: CoteBlack YeLL |
ratibus |
gizmo |
|
masklinn í dag viðrar vel til loftárása |
--------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
ratibus |
|
FlorentG |
|
masklinn í dag viðrar vel til loftárása |
--------------- I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing? |
Dj YeLL $question = $to_be || !$to_be; |
Ben oué mais c'est surtout que pour un tricycle t'as pas besoin de permis Message édité par Dj YeLL le 30-07-2007 à 15:36:20 --------------- Gamertag: CoteBlack YeLL |
omega2 |
|
FlorentG | Je les utilise aussi |
FlorentG | Le plus dérangeant maintenant, c'est que ces cons n'ont même pas pensé à tout passer en exceptions...
|
omega2 | Ho non! Trop géniale cette bidouille. |
FlorentG |
|
Shinuza This is unexecpected |
PLEASE YOU FUCKING STAB ME IN THE EYES WITH A RUSTED KNIFE --------------- Mains power can kill, and it will hurt the entire time you’re dying from it. |
FlorentG | J'avais fais cette bidouille au début, mais maintenant je l'ai enlevée. Celui qui a mal tapé son nom de classe va se faire foutre tout simplement avec une belle erreur fatale cryptique |
AlphaZone | Comment t'as fait alors ? EDIT : Oubliez c'que j'ai dit. J'avais pas fait attention au message plus haut... C'est le soleil du Portugal qui me fait raconter que des conneries. Message édité par AlphaZone le 30-07-2007 à 18:09:48 --------------- "Nous avons tous nos machines du temps. Celles qui nous ramènent en arrière sont les souvenirs, celles qui nous projettent en avant sont les rêves." |
Publicité | Posté le ![]() ![]() |

| Sujets relatifs | |
|---|---|
| Comment créer une architecture propre et fonctionelle... | [Débutant] Webdesigner a besoin d'aide pour PHP |
| script PHP style explorateur windows | PHP et MS SQL |
| [PHP] envoi d'images qui se dimentionne et s'ajoute direct sur 1page | Afficher le temps utilisé pour générer une page PHP |
| [PHP] connexion bdd différente selon page locale ou sur serveur ? | Afficher une image générée par un script PHP dans un PDF ? |
| Utilisation d'une variable en Flash depuis PHP | Erreur de forum PHP |
| Plus de sujets relatifs à : Model View Controller (MVC) - Architecture des applications PHP | |





