Loop through the stored data.

@param Closure $callable
337790
public function loopThrough(Closure $callable)
    {
        $reference = $this->getReference();

        if (is_null($reference)) {
            $reference = $this->object;
        }

        $this->loop($reference, $callable);
    }
938181
public function traverseOrders(callable $callable)
    {
        foreach ($this->orders() as $expr) {
            /**
             * @param  OrderInterface           $expr The iterated order expression object.
             * @param  OrderCollectionInterface $this The context of the traversal.
             * @return void
             */
            $callable($expr, $this);
            if ($expr instanceof OrderCollectionInterface) {
                $expr->traverseOrders($callable);
            }
        }

        return $this;
    }
975105
private function getParametersInOrder(callable $callable): array
    {
        if (null === $this->parametersCache) {
            $this->parametersCache = $this->listParameters($callable);
        }

        return $this->parametersCache;
    }
747877
public function first($callable = null)
    {
        if ($callable !== null) {
            $result = $this->statement->fetch(PDO::FETCH_ASSOC);
            $this->statement->closeCursor();
            if (is_array($result)) {
                $result = call_user_func_array($callable, $result);
            }
        } else {
            $result = $this->statement->fetch();
            $this->statement->closeCursor();
        }

        return $result;
    }
1036306
public function transaction(callable $callable)
    {
        $this->beginTransaction();

        try {
            call_user_func_array($callable, [$this]);

            $this->commit();

            return $this;
        } catch (\Exception $e) {
            $this->rollBack();

            throw $e;
        }
    }
736823
public function each($callable, $where = null, $orderby = null, $onpage = null, $page = null)
  {
    $q = $this->getManager()
      ->getQueryBuilder()
      ->select($this->getTable())
      ->where($where)
      ->orderby($orderby)
      ->page($page, $onpage);

    $st = $this->getManager()->query($q);

    while($obj = $this->fetchObject($st)) {
      call_user_func_array($callable, array($obj));
    }

    return $this;
  }
747362
public function containsCallable(callable $callable)
	{
		foreach ($this->routes as $method) {
			foreach ($method as $entry)
			{
				if ($entry->callable === $callable) {
					return true;
				}
			}
		}

		return false;
	}
213016
public function forEachNamed($name, callable $callable)
    {
        Types::assert(['string' => [$name]]);

        $name = strtolower($name);

        if (isset($this->headers[$name]))
        {
            foreach ($this->headers[$name] as $header)
            {
                $callable($header);
            }
        }
    }
626167
public function map(callable $fn) : self
    {
        $validate = $fn instanceof Closure;

        $b = [];

        foreach ($this->a as $row) {
            $b[] = array_map($fn, $row);
        }

        return new self($b, $validate);
    }
734552
protected function callableWithRoute(callable $callable)/*# : bool */
    {
        /* @var EventCapableAbstract $route */
        $route = $this->result->getRoute();
        $param = ['result' => $this->result];
        if ($route->trigger(Route::EVENT_BEFORE_HANDLER, $param)) {
            call_user_func($callable, $this->result);
            $route->trigger(Route::EVENT_AFTER_HANDLER, $param);
            return true;
        }
        $this->result->setHandler(null);
        return false;
    }
1120854
static function makeReflectFromCallable(callable $callable)
    {
        if ( $callable instanceof ipInvokableCallback )
            $callable = $callable->getCallable();

        if ( is_array($callable) )
            // [className_orObject, 'method_name']
            $reflection = new \ReflectionMethod($callable[0], $callable[1]);

        if ( is_string($callable) ) {
            if ( strpos($callable, '::') )
                // 'classname::method'
                $reflection = new \ReflectionMethod($callable);
            else
                // 'function_name'
                $reflection = new \ReflectionFunction($callable);
        }

        if ( method_exists($callable, '__invoke') ) {
            // Closure and Invokable
            if ($callable instanceof \Closure)
                $reflection = new \ReflectionFunction($callable);
            else
                $reflection = new \ReflectionMethod($callable, '__invoke');
        }

        if (! isset($reflection) )
            throw new \ReflectionException;

        return $reflection;
    }
1112081
protected function performStringCallable($callable)
    {
        if ( ! preg_match('#^(?<class>[\\a-z0-9_]+)@(?<method>[a-z0-9_]+)$#i', $callable, $matches)) {
            throw new \UnexpectedValueException("Unable to process callable string '{$callable}'");
        }

        $instance = app($matches['class']);

        $result = $instance->{$matches['method']}($this);

        return $result === null ? true : (bool) $result;
    }
1313517
public static function array_all( array $result, callable $callable ) {
    foreach ( $result as $value ) {
      $check = $callable($value);
      if (!$check) {
        return $check;
      }
    }
    return true;
  }
1275156
public function search(callable $callable)
    {
        foreach ($this as $key => $row) {
            if (call_user_func_array($callable, [$row, $key])) {
                return $row;
            }
        }

        return null;
    }
420063
public function delete($table, callable $callable = null)
    {
        $this->connect($table);
        $delete = new Delete($this);

        return $callable($delete);
    }
850921
function each(callable $closure) {
        foreach($this->data as $key => $val) {
            $feed = $closure($val, $key);
            if($feed === false) {
                break;
            }
        }
        
        return $this;
    }
978602
public function each(callable $callback)
    {
        foreach ($this->collection as $key => $value) {
            $callback($value, $key);
        }
    }