Changeset 939

Show
Ignore:
Timestamp:
05/20/08 18:33:29 (7 months ago)
Author:
laurentj
Message:

ticket #523: Added enhanced service handling (dependency injection) in jClasses. p=Christophe Thiriot

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/build/manifests/jelix-lib.mn

    r934 r939  
    309309  jAppManager.class.php 
    310310  jClasses.class.php 
     311  jBinding.class.php 
    311312  jCmdUtils.class.php 
    312313  jCrypt.class.php 
  • trunk/build/manifests/jelix-lib.mn

    r934 r939  
    309309  jAppManager.class.php 
    310310  jClasses.class.php 
     311  jBinding.class.php 
    311312  jCmdUtils.class.php 
    312313  jCrypt.class.php 
  • trunk/build/manifests/jelix-lib.mn

    r934 r939  
    309309  jAppManager.class.php 
    310310  jClasses.class.php 
     311  jBinding.class.php 
    311312  jCmdUtils.class.php 
    312313  jCrypt.class.php 
  • trunk/build/manifests/jelix-lib.mn

    r934 r939  
    309309  jAppManager.class.php 
    310310  jClasses.class.php 
     311  jBinding.class.php 
    311312  jCmdUtils.class.php 
    312313  jCrypt.class.php 
  • trunk/build/manifests/testapp.mn

    r895 r939  
    11cd testapp 
     2 
    23  project.xml 
    34  .htaccess 
     
    8788  foo.class.php 
    8889  foo.iface.php 
     90  bind.class.php 
    8991cd testapp/modules/jelix_tests/locales/ 
    9092  test_A.properties 
     
    174176  utils.jdatetime.html_cli.php 
    175177  utils.jinifilemodifier.html_cli.php 
     178  utils.jclasses.html_cli.php 
    176179 
    177180cd testapp/var 
  • trunk/build/manifests/testapp.mn

    r895 r939  
    11cd testapp 
     2 
    23  project.xml 
    34  .htaccess 
     
    8788  foo.class.php 
    8889  foo.iface.php 
     90  bind.class.php 
    8991cd testapp/modules/jelix_tests/locales/ 
    9092  test_A.properties 
     
    174176  utils.jdatetime.html_cli.php 
    175177  utils.jinifilemodifier.html_cli.php 
     178  utils.jclasses.html_cli.php 
    176179 
    177180cd testapp/var 
  • trunk/build/manifests/testapp.mn

    r895 r939  
    11cd testapp 
     2 
    23  project.xml 
    34  .htaccess 
     
    8788  foo.class.php 
    8889  foo.iface.php 
     90  bind.class.php 
    8991cd testapp/modules/jelix_tests/locales/ 
    9092  test_A.properties 
     
    174176  utils.jdatetime.html_cli.php 
    175177  utils.jinifilemodifier.html_cli.php 
     178  utils.jclasses.html_cli.php 
    176179 
    177180cd testapp/var 
  • trunk/build/manifests/testapp.mn

    r895 r939  
    11cd testapp 
     2 
    23  project.xml 
    34  .htaccess 
     
    8788  foo.class.php 
    8889  foo.iface.php 
     90  bind.class.php 
    8991cd testapp/modules/jelix_tests/locales/ 
    9092  test_A.properties 
     
    174176  utils.jdatetime.html_cli.php 
    175177  utils.jinifilemodifier.html_cli.php 
     178  utils.jclasses.html_cli.php 
    176179 
    177180cd testapp/var 
  • trunk/lib/jelix/core-modules/jelix/locales/en_EN/errors.ISO-8859-1.properties

    r842 r939  
    111111acl.action.right.needed = (371) The user is not allowed to access to this page 
    112112 
     113#---- bindings 
     114bindings.nobinding = (380) Binding for %s not defined 
     115 
    113116#---- datetime 
    114117datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_EN/errors.ISO-8859-1.properties

    r842 r939  
    111111acl.action.right.needed = (371) The user is not allowed to access to this page 
    112112 
     113#---- bindings 
     114bindings.nobinding = (380) Binding for %s not defined 
     115 
    113116#---- datetime 
    114117datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_EN/errors.ISO-8859-1.properties

    r842 r939  
    111111acl.action.right.needed = (371) The user is not allowed to access to this page 
    112112 
     113#---- bindings 
     114bindings.nobinding = (380) Binding for %s not defined 
     115 
    113116#---- datetime 
    114117datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_EN/errors.ISO-8859-1.properties

    r842 r939  
    111111acl.action.right.needed = (371) The user is not allowed to access to this page 
    112112 
     113#---- bindings 
     114bindings.nobinding = (380) Binding for %s not defined 
     115 
    113116#---- datetime 
    114117datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_EN/errors.ISO-8859-15.properties

    r842 r939  
    110110acl.action.right.needed = (371) The user is not allowed to access to this page 
    111111 
     112#---- bindings 
     113bindings.nobinding = (380) Binding for %s not defined 
     114 
    112115#---- datetime 
    113116datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_EN/errors.ISO-8859-15.properties

    r842 r939  
    110110acl.action.right.needed = (371) The user is not allowed to access to this page 
    111111 
     112#---- bindings 
     113bindings.nobinding = (380) Binding for %s not defined 
     114 
    112115#---- datetime 
    113116datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_EN/errors.ISO-8859-15.properties

    r842 r939  
    110110acl.action.right.needed = (371) The user is not allowed to access to this page 
    111111 
     112#---- bindings 
     113bindings.nobinding = (380) Binding for %s not defined 
     114 
    112115#---- datetime 
    113116datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_EN/errors.ISO-8859-15.properties

    r842 r939  
    110110acl.action.right.needed = (371) The user is not allowed to access to this page 
    111111 
     112#---- bindings 
     113bindings.nobinding = (380) Binding for %s not defined 
     114 
    112115#---- datetime 
    113116datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_EN/errors.UTF-8.properties

    r842 r939  
    111111acl.action.right.needed = (371) The user is not allowed to access to this page 
    112112 
     113#---- bindings 
     114bindings.nobinding = (380) Binding for %s not defined 
     115 
    113116#---- datetime 
    114117datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_EN/errors.UTF-8.properties

    r842 r939  
    111111acl.action.right.needed = (371) The user is not allowed to access to this page 
    112112 
     113#---- bindings 
     114bindings.nobinding = (380) Binding for %s not defined 
     115 
    113116#---- datetime 
    114117datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_EN/errors.UTF-8.properties

    r842 r939  
    111111acl.action.right.needed = (371) The user is not allowed to access to this page 
    112112 
     113#---- bindings 
     114bindings.nobinding = (380) Binding for %s not defined 
     115 
    113116#---- datetime 
    114117datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_EN/errors.UTF-8.properties

    r842 r939  
    111111acl.action.right.needed = (371) The user is not allowed to access to this page 
    112112 
     113#---- bindings 
     114bindings.nobinding = (380) Binding for %s not defined 
     115 
    113116#---- datetime 
    114117datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_US/errors.ISO-8859-1.properties

    r842 r939  
    110110acl.action.right.needed = (371) The user is not allowed to access to this page 
    111111 
     112#---- bindings 
     113bindings.nobinding = (380) Binding for %s not defined 
     114 
    112115#---- datetime 
    113116datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_US/errors.ISO-8859-1.properties

    r842 r939  
    110110acl.action.right.needed = (371) The user is not allowed to access to this page 
    111111 
     112#---- bindings 
     113bindings.nobinding = (380) Binding for %s not defined 
     114 
    112115#---- datetime 
    113116datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_US/errors.ISO-8859-1.properties

    r842 r939  
    110110acl.action.right.needed = (371) The user is not allowed to access to this page 
    111111 
     112#---- bindings 
     113bindings.nobinding = (380) Binding for %s not defined 
     114 
    112115#---- datetime 
    113116datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_US/errors.ISO-8859-1.properties

    r842 r939  
    110110acl.action.right.needed = (371) The user is not allowed to access to this page 
    111111 
     112#---- bindings 
     113bindings.nobinding = (380) Binding for %s not defined 
     114 
    112115#---- datetime 
    113116datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_US/errors.ISO-8859-15.properties

    r842 r939  
    110110acl.action.right.needed = (371) The user is not allowed to access to this page 
    111111 
     112#---- bindings 
     113bindings.nobinding = (380) Binding for %s not defined 
     114 
    112115#---- datetime 
    113116datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_US/errors.ISO-8859-15.properties

    r842 r939  
    110110acl.action.right.needed = (371) The user is not allowed to access to this page 
    111111 
     112#---- bindings 
     113bindings.nobinding = (380) Binding for %s not defined 
     114 
    112115#---- datetime 
    113116datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_US/errors.ISO-8859-15.properties

    r842 r939  
    110110acl.action.right.needed = (371) The user is not allowed to access to this page 
    111111 
     112#---- bindings 
     113bindings.nobinding = (380) Binding for %s not defined 
     114 
    112115#---- datetime 
    113116datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_US/errors.ISO-8859-15.properties

    r842 r939  
    110110acl.action.right.needed = (371) The user is not allowed to access to this page 
    111111 
     112#---- bindings 
     113bindings.nobinding = (380) Binding for %s not defined 
     114 
    112115#---- datetime 
    113116datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_US/errors.UTF-8.properties

    r842 r939  
    111111acl.action.right.needed = (371) The user is not allowed to access to this page 
    112112 
     113#---- bindings 
     114bindings.nobinding = (380) Binding for %s not defined 
     115 
    113116#---- datetime 
    114117datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_US/errors.UTF-8.properties

    r842 r939  
    111111acl.action.right.needed = (371) The user is not allowed to access to this page 
    112112 
     113#---- bindings 
     114bindings.nobinding = (380) Binding for %s not defined 
     115 
    113116#---- datetime 
    114117datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_US/errors.UTF-8.properties

    r842 r939  
    111111acl.action.right.needed = (371) The user is not allowed to access to this page 
    112112 
     113#---- bindings 
     114bindings.nobinding = (380) Binding for %s not defined 
     115 
    113116#---- datetime 
    114117datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/en_US/errors.UTF-8.properties

    r842 r939  
    111111acl.action.right.needed = (371) The user is not allowed to access to this page 
    112112 
     113#---- bindings 
     114bindings.nobinding = (380) Binding for %s not defined 
     115 
    113116#---- datetime 
    114117datetime.invalid = (400)jDateTime: invalid date/time (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/fr_FR/errors.ISO-8859-1.properties

    r842 r939  
    104104acl.driver.notfound = (370) Driver %s pour jAcl non trouv�cl.action.right.needed = (371) L'utilisateur n'a pas les droits pour cette action 
    105105 
     106#---- bindings 
     107bindings.nobinding = (380) Le binding pour %s n'est pas d�ni 
     108 
    106109#---- datetime 
    107110datetime.invalid = (400)jDateTime: date/heure invalide (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/fr_FR/errors.ISO-8859-1.properties

    r842 r939  
    104104acl.driver.notfound = (370) Driver %s pour jAcl non trouv�cl.action.right.needed = (371) L'utilisateur n'a pas les droits pour cette action 
    105105 
     106#---- bindings 
     107bindings.nobinding = (380) Le binding pour %s n'est pas d�ni 
     108 
    106109#---- datetime 
    107110datetime.invalid = (400)jDateTime: date/heure invalide (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/fr_FR/errors.ISO-8859-1.properties

    r842 r939  
    104104acl.driver.notfound = (370) Driver %s pour jAcl non trouv�cl.action.right.needed = (371) L'utilisateur n'a pas les droits pour cette action 
    105105 
     106#---- bindings 
     107bindings.nobinding = (380) Le binding pour %s n'est pas d�ni 
     108 
    106109#---- datetime 
    107110datetime.invalid = (400)jDateTime: date/heure invalide (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/fr_FR/errors.ISO-8859-1.properties

    r842 r939  
    104104acl.driver.notfound = (370) Driver %s pour jAcl non trouv�cl.action.right.needed = (371) L'utilisateur n'a pas les droits pour cette action 
    105105 
     106#---- bindings 
     107bindings.nobinding = (380) Le binding pour %s n'est pas d�ni 
     108 
    106109#---- datetime 
    107110datetime.invalid = (400)jDateTime: date/heure invalide (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/fr_FR/errors.ISO-8859-15.properties

    r842 r939  
    104104acl.driver.notfound = (370) Driver %s pour jAcl non trouv�cl.action.right.needed = (371) L'utilisateur n'a pas les droits pour cette action 
    105105 
     106#---- bindings 
     107bindings.nobinding = (380) Le binding pour %s n'est pas d�ni 
     108 
    106109#---- datetime 
    107110datetime.invalid = (400)jDateTime: date/heure invalide (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/fr_FR/errors.ISO-8859-15.properties

    r842 r939  
    104104acl.driver.notfound = (370) Driver %s pour jAcl non trouv�cl.action.right.needed = (371) L'utilisateur n'a pas les droits pour cette action 
    105105 
     106#---- bindings 
     107bindings.nobinding = (380) Le binding pour %s n'est pas d�ni 
     108 
    106109#---- datetime 
    107110datetime.invalid = (400)jDateTime: date/heure invalide (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/fr_FR/errors.ISO-8859-15.properties

    r842 r939  
    104104acl.driver.notfound = (370) Driver %s pour jAcl non trouv�cl.action.right.needed = (371) L'utilisateur n'a pas les droits pour cette action 
    105105 
     106#---- bindings 
     107bindings.nobinding = (380) Le binding pour %s n'est pas d�ni 
     108 
    106109#---- datetime 
    107110datetime.invalid = (400)jDateTime: date/heure invalide (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/fr_FR/errors.ISO-8859-15.properties

    r842 r939  
    104104acl.driver.notfound = (370) Driver %s pour jAcl non trouv�cl.action.right.needed = (371) L'utilisateur n'a pas les droits pour cette action 
    105105 
     106#---- bindings 
     107bindings.nobinding = (380) Le binding pour %s n'est pas d�ni 
     108 
    106109#---- datetime 
    107110datetime.invalid = (400)jDateTime: date/heure invalide (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/fr_FR/errors.UTF-8.properties

    r842 r939  
    110110acl.action.right.needed = (371) L'utilisateur n'a pas les droits pour cette action 
    111111 
     112#---- bindings 
     113bindings.nobinding = (380) Le binding pour %s n'est pas défini 
     114 
    112115#---- datetime 
    113116datetime.invalid = (400)jDateTime: date/heure invalide (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/fr_FR/errors.UTF-8.properties

    r842 r939  
    110110acl.action.right.needed = (371) L'utilisateur n'a pas les droits pour cette action 
    111111 
     112#---- bindings 
     113bindings.nobinding = (380) Le binding pour %s n'est pas défini 
     114 
    112115#---- datetime 
    113116datetime.invalid = (400)jDateTime: date/heure invalide (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/fr_FR/errors.UTF-8.properties

    r842 r939  
    110110acl.action.right.needed = (371) L'utilisateur n'a pas les droits pour cette action 
    111111 
     112#---- bindings 
     113bindings.nobinding = (380) Le binding pour %s n'est pas défini 
     114 
    112115#---- datetime 
    113116datetime.invalid = (400)jDateTime: date/heure invalide (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core-modules/jelix/locales/fr_FR/errors.UTF-8.properties

    r842 r939  
    110110acl.action.right.needed = (371) L'utilisateur n'a pas les droits pour cette action 
    111111 
     112#---- bindings 
     113bindings.nobinding = (380) Le binding pour %s n'est pas défini 
     114 
    112115#---- datetime 
    113116datetime.invalid = (400)jDateTime: date/heure invalide (%d-%d-%d %d:%d:%d) 
  • trunk/lib/jelix/core/jSelector.class.php

    r887 r939  
    1515* @contributor Thibault PIRONT < nuKs > 
    1616* @contributor Julien Issler 
     17* @contributor Christophe Thiriot 
    1718* @copyright   2005-2007 Laurent Jouanneau, 2007 Loic Mathaud, 2007 Rahal 
    1819* @copyright   2007 Thibault PIRONT 
    19 * @copyright   2008 Julien Issler 
     20* @copyright   2008 Julien Issler, 2008 Christophe Thiriot 
    2021* @link        http://www.jelix.org 
    2122* @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    3536     * @return jISelector the corresponding selector 
    3637     */ 
    37     static public function create ($selstr){ 
    38         if(preg_match("/^([a-z]{3,5})\:([\w~\/\.]+)$/", $selstr, $m)){ 
     38    static public function create ($selstr, $defaulttype=false) { 
     39        if (is_string($defaulttype) && strpos($selstr, ':') === false) { 
     40            $selstr = "$defaulttype:$selstr"; 
     41        } 
     42 
     43        if(preg_match("/^([a-z]{3,5})\:([\w~\/\.]+)$/", $selstr, $m)) { 
    3944            $cname='jSelector'.$m[1]; 
    40             if(class_exists($cname))
     45            if(class_exists($cname))
    4146                $sel = new $cname($m[2]); 
    4247                return $sel; 
  • trunk/lib/jelix/core/jSelector.class.php

    r887 r939  
    1515* @contributor Thibault PIRONT < nuKs > 
    1616* @contributor Julien Issler 
     17* @contributor Christophe Thiriot 
    1718* @copyright   2005-2007 Laurent Jouanneau, 2007 Loic Mathaud, 2007 Rahal 
    1819* @copyright   2007 Thibault PIRONT 
    19 * @copyright   2008 Julien Issler 
     20* @copyright   2008 Julien Issler, 2008 Christophe Thiriot 
    2021* @link        http://www.jelix.org 
    2122* @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    3536     * @return jISelector the corresponding selector 
    3637     */ 
    37     static public function create ($selstr){ 
    38         if(preg_match("/^([a-z]{3,5})\:([\w~\/\.]+)$/", $selstr, $m)){ 
     38    static public function create ($selstr, $defaulttype=false) { 
     39        if (is_string($defaulttype) && strpos($selstr, ':') === false) { 
     40            $selstr = "$defaulttype:$selstr"; 
     41        } 
     42 
     43        if(preg_match("/^([a-z]{3,5})\:([\w~\/\.]+)$/", $selstr, $m)) { 
    3944            $cname='jSelector'.$m[1]; 
    40             if(class_exists($cname))
     45            if(class_exists($cname))
    4146                $sel = new $cname($m[2]); 
    4247                return $sel; 
  • trunk/lib/jelix/core/jSelector.class.php

    r887 r939  
    1515* @contributor Thibault PIRONT < nuKs > 
    1616* @contributor Julien Issler 
     17* @contributor Christophe Thiriot 
    1718* @copyright   2005-2007 Laurent Jouanneau, 2007 Loic Mathaud, 2007 Rahal 
    1819* @copyright   2007 Thibault PIRONT 
    19 * @copyright   2008 Julien Issler 
     20* @copyright   2008 Julien Issler, 2008 Christophe Thiriot 
    2021* @link        http://www.jelix.org 
    2122* @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    3536     * @return jISelector the corresponding selector 
    3637     */ 
    37     static public function create ($selstr){ 
    38         if(preg_match("/^([a-z]{3,5})\:([\w~\/\.]+)$/", $selstr, $m)){ 
     38    static public function create ($selstr, $defaulttype=false) { 
     39        if (is_string($defaulttype) && strpos($selstr, ':') === false) { 
     40            $selstr = "$defaulttype:$selstr"; 
     41        } 
     42 
     43        if(preg_match("/^([a-z]{3,5})\:([\w~\/\.]+)$/", $selstr, $m)) { 
    3944            $cname='jSelector'.$m[1]; 
    40             if(class_exists($cname))
     45            if(class_exists($cname))
    4146                $sel = new $cname($m[2]); 
    4247                return $sel; 
  • trunk/lib/jelix/core/jSelector.class.php

    r887 r939  
    1515* @contributor Thibault PIRONT < nuKs > 
    1616* @contributor Julien Issler 
     17* @contributor Christophe Thiriot 
    1718* @copyright   2005-2007 Laurent Jouanneau, 2007 Loic Mathaud, 2007 Rahal 
    1819* @copyright   2007 Thibault PIRONT 
    19 * @copyright   2008 Julien Issler 
     20* @copyright   2008 Julien Issler, 2008 Christophe Thiriot 
    2021* @link        http://www.jelix.org 
    2122* @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    3536     * @return jISelector the corresponding selector 
    3637     */ 
    37     static public function create ($selstr){ 
    38         if(preg_match("/^([a-z]{3,5})\:([\w~\/\.]+)$/", $selstr, $m)){ 
     38    static public function create ($selstr, $defaulttype=false) { 
     39        if (is_string($defaulttype) && strpos($selstr, ':') === false) { 
     40            $selstr = "$defaulttype:$selstr"; 
     41        } 
     42 
     43        if(preg_match("/^([a-z]{3,5})\:([\w~\/\.]+)$/", $selstr, $m)) { 
    3944            $cname='jSelector'.$m[1]; 
    40             if(class_exists($cname))
     45            if(class_exists($cname))
    4146                $sel = new $cname($m[2]); 
    4247                return $sel; 
  • trunk/lib/jelix/CREDITS

    r921 r939  
    6666 - bug fixes on PDO support in jDb 
    6767 - fixed minor bugs 
     68 - Added enhanced service handling (dependency injection) in jClasses (#523) 
    6869 - implemen