Defines a callback to get the data for the mapped column component.

@param callable $dataCallback

@return ColumnMappingDefiner
488211
public function computed(callable $dataCallback) : ColumnMappingDefiner
    {
        return new ColumnMappingDefiner(
            function (IColumn $column) use ($dataCallback) {
                $this->column($column);
                $this->componentIdCallableMap[$column->getComponentId()] = $dataCallback;
            },
            function ($componentId) use ($dataCallback) {
                $this->componentIdCallableMap[$componentId] = $dataCallback;
            }
        );
    }
1164820
public function allCallback(Closure $callback, $columns = ['*'])
    {
        /** @var EloquentBuilder $result */
        $result = $callback( $this->query() );

        $this->checkValidCustomCallback($result);

        return $result->get($columns);
    }
274794
public function when($condition, callable $trueCallback, callable $falseCallback = null)
    {
        if ($condition) {
            call_user_func($trueCallback, $this);
        } else {
            is_callable($falseCallback) && call_user_func($falseCallback, $this);
        }
        return $this;
    }
1144696
public function map(callable $callback): CollectionInterface
    {
        $collection = clone $this;
        \array_map($callback, $collection->data);

        return $collection;
    }
956006
public function map ($callback)
	{
		if(!is_callable($callback)) {
			throw new \InvalidArgumentException('Invalid (not callable) callback given');
		}

		$result = new self();

		for ($i = 0; $i < $this->count(); $i++) {
			$value = $callback($this->storage[$i]);

			if (null !== $value) {
				$result->push($value);
			}
		}

		return $result;
	}
307878
public function setHandler($handlerName, $handlerCallback)
    {
        $this->checkHandlerName($handlerName);

        if (!is_callable($handlerCallback))
        {
            throw new RuntimeException("Handler callback must be callable");
        }

        $this->handlers[$handlerName] = $handlerCallback;

        return $this;
    }
555849
public function map(callable $callback) {
		$that = clone $this;
		foreach ($that->getIterator() as $index => $item) {
			$that->offsetSet($index, $callback($item));
		}
		return $that;
	}
477491
public static function createCallback(string $name, callable $callback): NormalizationFieldMappingBuilderInterface
    {
        $self = new self($name);
        $self->fieldNormalizer = new CallbackFieldNormalizer($callback);

        return $self;
    }
1289316
private function callFunction($callback, $data)
    {
        $exp = explode('@', $callback);

        if (method_exists($instance = new $exp[0](), $exp[1])) {
            return call_user_func_array([$instance, $exp[1]], [$data]);
        }
    }
4669
public function widgets(callable $widgetCallback = null)
    {
        $widgets = $this->widgets;

        $gridStack = $this->gridStack() ?: [];
        $parsedGridStack = [];

        array_walk($gridStack, function ($item) use (&$parsedGridStack) {
            $parsedGridStack[$item['id']] = $item;
        });

        // Load gridStack from user preferences
        $user = $this->adminUser();
        $userGridStack = json_decode($user->preferences(), true)['grid_stack'] ?: [];
        $parsedUserGridStack = [];

        array_walk($userGridStack, function ($item) use (&$parsedUserGridStack) {
            $parsedUserGridStack[$item['id']] = $item;
        });

        $widgetCallback = isset($widgetCallback) ? $widgetCallback : $this->widgetCallback;
        foreach ($widgets as $widget) {
            if (isset($widget['permissions']) && $this instanceof AuthAwareInterface) {
                $widget->setActive($this->hasPermissions($widget['permissions']));
            }

            if (!!count($parsedUserGridStack)) {
                if (isset($parsedUserGridStack[$widget->ident()])) {
                    $widget->setData([
                        'grid_stack' => $parsedUserGridStack[$widget->ident()]
                    ]);
                }
            } else {
                if (isset($parsedGridStack[$widget->ident()])) {
                    $gridStack  = array_replace_recursive(
                        $parsedGridStack[$widget->ident()],
                        $widget['grid_stack'] ?: []
                    );

                    $widget->setData([
                        'grid_stack' => $gridStack
                    ]);
                }
            }

            $gridStackDeco = new GridStackWidgetDecorator($widget);
            $widget['grid_stack'] = $gridStackDeco->gridStack();

            if (!$widget->active()) {
                continue;
            }

            if ($widgetCallback) {
                $widgetCallback($widget);
            }

            $GLOBALS['widget_template'] = $widget->template();

            yield $widget;

            $GLOBALS['widget_template'] = '';
        }
    }
195830
public function getCallbackObject($callback)
    {
        foreach ($this->callbacks as $object) {
            if ($this->callbacks[$object] === $callback) {
                return $object;
            }
        }
    }
1189696
public function map(callable $callback)
    {
        $result = array();

        foreach ($this->nodes as $index => $node) {
            $return_value = \call_user_func($callback, $node, $index);

            if ($return_value === null) {
                continue;
            } elseif (\is_array($return_value)) {
                $result = \array_merge($result, $return_value);
            } else {
                $result[] = $return_value;
            }
        }

        return $result;
    }
385386
public function callback($primaryCallbackURL)
    {
        if (is_string($primaryCallbackURL)) {
            $this->setPrimaryCallbackURL($primaryCallbackURL)
                ->setSecondaryCallbackURL($primaryCallbackURL);
        }

        return $this;
    }
346606
protected function getCallback($callback)
	{
		if ( ! is_null($callback)) return $callback;

		$me = $this;

		return function($line) use ($me) { $me->display($line); };
	}
503934
protected function getCallback($callback, array $parameters)
    {
        if ($callback instanceof Closure) {
            return $this->createCallableCallback($callback, $parameters);
        } elseif (is_string($callback)) {
            return $this->createStringCallback($callback, $parameters);
        } else {
            return;
        }
    }
102140
public function getLinkTypeColumnCallback($columnName)
    {

        // query whether or not a callback mapping is available
        if (isset($this->linkTypeAttributeColumnToCallbackMapping[$columnName])) {
            // load it from the array with the mappings
            list (, $callbackName) = $this->linkTypeAttributeColumnToCallbackMapping[$columnName];
            // prepare and return the callback
            return array($this, $callbackName);
        }

        // return the default callback
        return array($this, 'explode');
    }
1286540
private static function _callDispatcher($dispatcherCallback) {
        $dispatcherCallback = $dispatcherCallback[0] !== '\\' ? __NAMESPACE__ . '\\' . $dispatcherCallback : $dispatcherCallback;

        if (!is_callable($dispatcherCallback)) {
            throw new \Exception('Routing dispacher [' . $dispatcherCallback . '] cannot be called.', 500);
        }

        return call_user_func_array($dispatcherCallback, [
            self::$_uri, self::$_config
        ]);
    }