Server IP : 213.176.29.180 / Your IP : 3.145.101.119 Web Server : Apache System : Linux 213.176.29.180.hostiran.name 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64 User : webtaragh ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/webtaragh/public_html/wp-admin/../whmcs/vendor/illuminate/container/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php namespace Illuminate\Container; use Countable; use IteratorAggregate; class RewindableGenerator implements Countable, IteratorAggregate { /** * The generator callback. * * @var callable */ protected $generator; /** * The number of tagged services. * * @var callable|int */ protected $count; /** * Create a new generator instance. * * @param callable $generator * @param callable|int $count * @return void */ public function __construct(callable $generator, $count) { $this->count = $count; $this->generator = $generator; } /** * Get an iterator from the generator. * * @return mixed */ public function getIterator() { return ($this->generator)(); } /** * Get the total number of tagged services. * * @return int */ public function count() { if (is_callable($count = $this->count)) { $this->count = $count(); } return $this->count; } }