Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1406 connectés 

  FORUM HardWare.fr
  Programmation
  PHP

  ReflectionMethod::invoke

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

ReflectionMethod::invoke

n°1953906
Profil sup​primé
Posté le 30-12-2009 à 11:51:11  answer
 

salut,  
dans la doc on voit:
http://be.php.net/manual/fr/reflec [...] invoke.php
 
public mixed ReflectionMethod::invoke  ( object $object  , string $args  )
 
mon problème est dans $args
 
ça doit dont etre un string qui comprend tous les args, soit un truc du genre : '1,,,,,0,-1,0'
 
mais quand on fait :
 
$rm->invoke($object,$args);
 
il fait en fait:
 
$object->function('1,,,,,0,-1,0');  [:gnub]  
au lieu de:
$object->function(1,,,,,0,-1,0);
 
C'est un bug ou moi qui fait une bêtise ?
 
 [:cloud_]

mood
Publicité
Posté le 30-12-2009 à 11:51:11  profilanswer
 

n°1953956
Profil sup​primé
Posté le 30-12-2009 à 13:39:34  answer
 

Bon alors en fait il faut utiliser ReflectionMethod::invokeArgs  ( string $object  , array $args  )


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  PHP

  ReflectionMethod::invoke

 

Sujets relatifs
[Résolu] [Java] method invoke avec List<generics>[.net c#] Invoke et BeginInvoke help
Problème de P/Invoke avec Callbackje reviens sur Platform Invoke / appel de DLL unmanaged
Plus de sujets relatifs à : ReflectionMethod::invoke


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR