src/View/ViewCollection.php
public function addCallback($callback, $data = [], $region = "main", $sort = 0)
    {
        $view = new View();
        $view->set(["callback" => $callback], $data, $sort, "callback");
        $this->views[$region][] = $view;

        return $this;
    }
public function addCallback($callback, $data = [], $region = "main", $sort = 0)
    {
        $view = new View();
        $view->set(["callback" => $callback], $data, $sort, "callback");
        $this->views[$region][] = $view;

        return $this;
    }
Add a callback to be rendered as a view.

@param string $callback function to call to get the content of the view
@param array  $data     variables to make available to the view, default is empty
@param string $region   which region to attach the view
@param int    $sort     which order to display the views

@return $this