Insert data into table

@param  callable $callback
189843
private function insertData($callback = null): void
    {
        $this->expression->evaluateExpressions(
            $this->configEntities[$this->entity]['pre_actions']
        );

        for ($rowNum = 1; $rowNum <= $this->limit; $rowNum++) {
            // Call the right method according to the mode
            $this->{$this->insertMode[$this->mode]}($rowNum);

            if (!is_null($callback)) {
                $callback($rowNum);
            }
        }

        // Run a final method if defined
        if ($this->mode === 'batch') {
            $this->loadDataInBatch('insert');
        }

        $this->expression->evaluateExpressions(
            $this->configEntities[$this->entity]['post_actions']
        );
    }
437233
public function set(string $name, callable $callback): void
    {
        $this->services[$name] = function ($c) use ($callback) {
            static $object;

            if ($object === null) {
                $object = $callback($c);
            }

            return $object;
        };
    }
911382
public static function insert($eventName = NULL, $callback = NULL, $priority = NULL)
    { 
        if( $callback === NULL || is_int($callback) )
        {
            $priority  = $callback;
            $callback  = $eventName;
            $eventName = Properties::$startListenerName;
        }
        else
        {
            Properties::$startListenerName = $eventName;
        }

        $callback = self::callback($callback);
            
        if( ! is_callable($callback) )
        {
            throw new InvalidCallbackMethodException;
        }

        if( isset(Properties::$listeners[$eventName]) )
        {
            Properties::$listeners[$eventName][0][] = $priority;
			Properties::$listeners[$eventName][1][] = $callback;
        }
        else
        {
            Properties::$listeners[$eventName] = [[$priority], [$callback]];
        }
    }
22492
public function setEditableValueCallback($callback)
    {
        $this->isEditable() ?: $this->setEditable();
        $this->editableValueCallback = $callback;

        return $this;
    }
213117
public function addOnFulfilled(callable $callback): void
    {
        if ($this->getState() === Promise::PENDING) {
            $this->onFulfilled[] = $callback;
        } elseif ($this->getState() === Promise::FULFILLED) {
            $response = call_user_func($callback, $this->responseBuilder->getResponse());
            if ($response instanceof ResponseInterface) {
                $this->responseBuilder->setResponse($response);
            }
        }
    }
627658
public function bind(string $name, callable $callback): self
    {
        $this->bindings[$name] = $callback;
        return $this;
    }
1263794
static public function fromArrayCallback(array $data, callable $callback) {
		$ret = new FormOptions();
		foreach ( $data as $item ){
			list($value, $text) = $callback($item);
			$ret->add($value, $text);
		}
		return $ret;
	}
123184
public function attach($event, $callback) {
        $events = is_array($event) ? $event : array($event);
        $listeners = $this->getOption(self::OPTION_LISTENERS);
        foreach ($events as $event) {
            $eventObject = is_object($event) ? $event : new GenericEvent($event);
            if (!isset($listeners[$eventObject->getName()])) {
                $listeners[$eventObject->getName()] = array();
            }

            if (!in_array($callback, $listeners[$eventObject->getName()], true)) {
                $listeners[$eventObject->getName()][] = $callback;
            }
        }
        $this->setOption(self::OPTION_LISTENERS, $listeners);
    }
422861
public function setEditableCallback($callback)
    {
        $this->isEditable() ?: $this->setEditable();
        $this->editableCallback = $callback;

        return $this;
    }
62385
public function values(callable $callback, iterable $values): void
    {
        $listOfValues = ResolvedValuesList::make();

        foreach ($values as $key => $value) {
            $input = $this->resolve($value);
            $listOfValues->set($key, $input);
        }

        if ($listOfValues->isEmpty()) {
            return;
        }

        call_user_func($callback, $listOfValues->getValues());
    }
250231
public function setUserCallback (callable $callback)
	{
		//$this->usercallback = $callback;

		if (count ($this->usercallback) > 0)
			throw new InvalidParameter ("A usercallback was already set. Use addUserCallback to add multiple callbacks");

		$this->addUserCallback ('default', $callback);

		return $this;
	}
791099
public function wrap_callback(callable $callback, array $args=[]) {
		ob_start();
		foreach (self::$override_args as $key => $val)
			$args[$key] = $val;
		$callback($args);
		self::$body_raw = ob_get_clean();
		self::$body = json_decode(self::$body_raw, true);
		if (self::$body) {
			self::$errno = self::$body['errno'];
			self::$data = self::$body['data'];
		} else {
			self::$errno = 0;
			self::$data = [];
		}
	}
471744
public function addLogger(callable $callback)
    {
        if (!is_callable($callback)) {
            throw LoggerException::forInvalidCallback();
        }

        if ($callback instanceof Closure) {
            $callback = $callback->bindTo($this, get_class($this));
        }

        $this->loggers[] = $callback;

        return $this;
    }
804147
public static function listen(string $event, callable $callback) {
		if (!isset(self::$events[$event])) {
			self::$events[$event] = [];
		}
		self::$events[$event][] = $callback;
	}
32382
public function send($callback)
    {
        $this->mysqlAsynPool->query($callback, $this->bindId, $this->sql, $this->getContext());
    }
813568
public function attachCallback($callback, $type = self::JOB_COMPLETE)
    {
        if (!is_callable($callback)) {
            throw new Exception('Invalid callback specified');
        }
        if (!isset($this->callback[$type])) {
            throw new Exception('Invalid callback type specified.');
        }
        $this->callback[$type][] = $callback;
    }
317809
protected function onInsert(callable $callback, $entityClass = null)
    {
        $this->checkIfInitialized();

        return $this->processEntities($this->uow->getScheduledEntityInsertions(), self::OPERATION_INSERT, $callback, $entityClass);
    }