downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ReflectionMethod::invokeArgs> <ReflectionMethod::getPrototype
[edit] Last updated: Fri, 23 Mar 2012

view this page in

ReflectionMethod::invoke

(PHP 5)

ReflectionMethod::invokeYöntemi çağırır

Açıklama

public mixed ReflectionMethod::invoke ( object $nesne , string $değiştirgeler )

Yansıtılan yöntemi çağırır.

Uyarı

Bu işlev hala belgelendirilmemiştir; sadece değiştirge listesi mevcuttur.

Değiştirgeler

nesne

Çağrılacak nesne.

değiştirgeler

Aktarılacak değiştirge listesi. call_user_func() işlevindeki gibi yeteri sayıda değiştirge aktarabilirsiniz.

Dönen Değerler

Ayrıca Bakınız



add a note add a note User Contributed Notes ReflectionMethod::invoke
templargrey at wp dot pl 21-Jul-2011 01:12
Seems that Reflection doesn`t resolve late static bindings - var_dump will show "string 'a' (length=1)".

<?php
class ParentClass { protected static $a = 'a'; static public function init() { return static::$a; } }
class
ChildClass extends ParentClass { protected static $a = 'b'; }
   
$r = new ReflectionClass('ChildClass');
var_dump($r->getMethod('init')->invoke(null));
?>
rojaro at gmail dot com 10-Feb-2011 01:56
Note: If you want to invoke protected or private methods, you'll first have to make them accessible using the setAccessible() method (see http://php.net/reflectionmethod.setaccessible ).

 
show source | credits | stats | sitemap | contact | advertising | mirror sites