Iterator



( ZN >= 5.4.5 )

PHP is an iterator, XIteratora means of assembling classes. Repeaters have been designed with a purpose to provide common use on many areas. For example, in a sequence or index operation, there are many kinds of functions such as catching the data to obtain sequential values. 

 

 

# Methods


xıterat is __call ()

 

 

# __Call ( ZN >= 5.4.5 )


xıterat is is used to invoke iterator classes.

X Classes
append appendıterat is
caching cachingıterat is
callbackfilt is callbackfilterıterat is
directory DirectoryIterator
empty emptyıterat is
filesystem filesystemıterat is
filter filterıterat is
globin globıterat is
infinite ınfiniteıterat is
limit limitıterat is
multiple multipleıterat is
NOREWIND norewindıterat is
parent parentıterat is
regEx regexıterat is
recursivearray  recursivearrayıterat is
recursivecaching recursivecachingıterat is
recursivecallbackfilt is recursivecallbackfilterıterat is
recursivedirectory RecursiveDirectoryIterator is
recursivefilt is recursivefilterıterat is
recursiveıterat is recursiveıteratorıterat is
recursiveregex recursiveregexıterat is
recursivetre to recursivetreeıterat is

Parameters

Mixed $ Parameters ... Sequential parameters.
return xıterat is

uses

$iterator = Iterate::array(['a', 'b', 'c']);

$iterator->next();
$iterator->next();

echo $iterator->current();
c
$iterator = Iterate::directory('Internal');

$iterator->next();
$iterator->next();

echo $iterator->current();
.htaccess
$files = Iterate::filesystem('Projects');

foreach( $files as $file )
{
    \Output::writeLine( $file->getFilename() );
}
.htaccess
Backend
Frontend