Ticket #1448 (closed new feature: fixed)

Opened 15 months ago

Last modified 14 months ago

Permettre l'utilisation de __call dans les controlleurs.

Reported by: flav Owned by: flav
Priority: normal Milestone: Jelix 1.4
Component: jelix:controllers Version: 1.3.1
Severity: normal Keywords:
Cc: Php version:
Hosting Provider: Blocked By:
Documentation needed: no Blocking:

Description

allow to use

__call

method in controllers.

Ceci peut servir à pas mal de choses. Evidemment on peut toujours jongler avec la réécriture d'url personnalisée, mais pour un moindre coup (moins d'une ligne à modifier), cette solution offre des avantages de souplesses et de clareté en ce qui concerne la conception de la couche contrôlleurs (par exemple, on peut faire un système de squelette à la SPIP...)

Dans /lib/jelix/core/jCoordinator.class.php ligne 142, remplacer :

method_exists($ctrl, $selector->method)

par :

is_callable(array($ctrl, $selector->method))

Attachments

patch.txt Download (0.7 KB) - added by flav 15 months ago.

Change History

Changed 15 months ago by flav

Changed 15 months ago by flav

  • component changed from jelix to jelix:controllers

Changed 15 months ago by laurentj

  • owner set to flav
  • status changed from new to assigned
  • milestone set to Jelix 1.4

Un petit pull request sur le master ? ;-)

Changed 15 months ago by flav

Ouais, en fait désolé, mais le pull request, je le sens pas encore... :/

Changed 14 months ago by foxmask

Pull Request pour le compte de Flav :  https://github.com/jelix/jelix/pull/47

Changed 14 months ago by laurentj

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.