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

search for in the

ReflectionClass::isSubclassOf> <ReflectionClass::isInternal
[edit] Last updated: Fri, 23 Mar 2012

view this page in

ReflectionClass::isIterateable

(PHP 5)

ReflectionClass::isIterateableSınıf yinelenebilir mi diye bakar

Açıklama

public bool ReflectionClass::isIterateable ( void )

Sınıf yinelenebiliyorsa TRUE döner.

Değiştirgeler

Bu işlevin değiştirgesi yoktur.

Dönen Değerler

Başarı durumunda TRUE, başarısızlık durumunda FALSE döner.

Örnekler

Örnek 1 - ReflectionClass::isIterateable() örneği

<?php

class IteratorClass implements Iterator {
    public function 
__construct() { }
    public function 
key() { }
    public function 
current() { }
    function 
next()    { }
    function 
valid() { }
    function 
rewind() { }
}
class 
DerivedClass extends IteratorClass { }
class 
NonIterator { }

function 
dump_iterateable($class) {
    
$reflection = new ReflectionClass($class);
    
var_dump($reflection->isIterateable());
}

$classes = array("ArrayObject""IteratorClass""DerivedClass""NonIterator");

foreach (
$classes as $class) {
    echo 
"$class yinelenebiliyor mu? ";
    
dump_iterateable($class);
}
?>

Yukarıdaki örneğin çıktısı:

ArrayObject yinelenebiliyor mu? bool(true)
IteratorClass yinelenebiliyor mu? bool(true)
DerivedClass yinelenebiliyor mu? bool(true)
NonIterator yinelenebiliyor mu? bool(false)

Ayrıca Bakınız



add a note add a note User Contributed Notes ReflectionClass::isIterateable
There are no user contributed notes for this page.

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