Walks through the list and calls the closure on each field that can be filled.

@param Closure $closure
357089
public function eachFillable(Closure $closure)
    {
        /** @var FillableField $item */
        foreach ($this->items as $item) {
            if ($item->fillable) {
                $closure($item);
            }
        }
    }
456954
protected function transaction(Closure $closure)
    {
        $this->redis->multi();
        try {
            call_user_func($closure);
            if (!$this->redis->exec()) {
                $this->redis->discard();
            }
        } catch (Exception $e) {
            $this->redis->discard();
        }
    }
701398
public function handle(Closure $closure)
    {
        $this->strict(
            \call_user_func($closure, $this->getMessage(), [$this, 'fail'])
        );

        return $this->toResponse();
    }
301343
public function map(Closure $callback)
    {
        for ($i = 0; $i < 100; ++$i) {
            $segment = $this->path.'/'.sprintf($this->segmentName, $i);

            if (file_exists($segment)) {
                $dictionary = (array) include $segment;
                $callback($dictionary);
            }
        }
    }
346538
public function map(Closure $closure): Collection
    {
        $this->items = array_map($closure, $this->items);
        return $this;
    }
607990
public function callWithDisabledAuth(Closure $closure)
    {
        if ($this->isDisabledAuth()) {
            return call_user_func($closure);
        }

        try {
            $this->disableAuth();

            return call_user_func($closure);
        } finally {
            $this->enableAuth();
        }
    }
586345
protected function _spin($closure)
    {
        $timeout = $this->timeout();
        if ($timeout <= 0) {
            $closure();
        } else {
            Code::spin($closure, $timeout);
        }
    }
958051
public function aggregate(\Closure $closure)
    {
        $builder = new AggregationBuilder($this->query);

        $closure($builder);

        return $this;
    }
170364
public static function group($group, \Closure $closure)
    {
        self::$group = $group;
        call_user_func($closure, self::getInstance());
        self::$group = null;
    }
1075241
public function iterateClosure($Closure, $Glue = false)
    {
        if (!is_callable($Closure) || empty($this->Input)) {
            return;
        }
        if (!$Glue) {
            foreach ($this->Working as &$Segment) {
                $Segment = $Closure($Segment);
            }
            return;
        }
        foreach ($this->Markers as &$Segment) {
            if (isset($Segment[0][0]) && !is_array($Segment[0][0])) {
                $Segment[0][0] = $Closure($Segment[0][0]);
            }
        }
    }
887339
static public function group($closure)
    {
        $backtrace = debug_backtrace();
        //!isset($this) || $backtrace[0]['type'] == '::' || 
        if(self::$instance->prefix == null) {
            exit('Can not be called statically or directly. Use Route::prefix(name)->group(routes-to-be-registered)');
        }
        if($closure instanceof Closure) {
            call_user_func($closure);
        }
        self::$instance->prefix = null;
    }
283709
public function byClosure(Closure $closure)
    {
        $this->controller = new Controller();
        if ($this->hasContainer() && method_exists($this->controller, 'raikiri'))
            $this->controller->setContainer($this->raikiri());

        $this->action = $closure->bindTo($this->controller);
    }
414653
public function tweakApplication(Closure $closure): void
    {
        $closure($this->app);

        static::$server->stash([
            'class' => static::class,
            'tweakApplication' => serialize(SerializableClosure::from($closure)),
        ]);
    }
1202708
private function withPrimaryReadPreference(\Closure $closure)
    {
        $prevReadPref = $this->mongoCollection->getReadPreference();
        $this->mongoCollection->setReadPreference(\MongoClient::RP_PRIMARY);

        try {
            return $closure();
        } finally {
            $prevTags = ! empty($prevReadPref['tagsets']) ? $prevReadPref['tagsets'] : [];
            $this->mongoCollection->setReadPreference($prevReadPref['type'], $prevTags);
        }
    }
796093
public function matchesAny(\Closure $closure): bool
    {
        if (\count($this->getArray(), \COUNT_NORMAL) === 0) {
            return false;
        }

        foreach ($this->getGenerator() as $key => $value) {
            $value = $closure($value, $key);

            if ($value === true) {
                return true;
            }
        }

        return false;
    }
1040539
function filter(callable $closure) {
        $new = array();
        foreach($this->data as $key => $val) {
            $feed = (bool) $closure($val, $key);
            if($feed) {
                $new[$key] = $val;
            }
        }
        
        return (new self($new));
    }
305933
public function filter(\Closure $closure)
    {
        $newInstance = new self();
        $newInstance->setArray(array_filter($this->array, $closure));
        return $newInstance;
    }