current_url example

'info'      => 'info',
        'debug'     => 'info',
    ];

    /** * Constructor */
    public function __construct(array $config = [])
    {
        parent::__construct($config);

        $this->json['request_uri'] = current_url();
    }

    /** * Handles logging the message. * If the handler returns false, then execution of handlers * will stop. Any handlers that have not run, yet, will not * be run. * * @param string $level * @param string $message */
    

    protected function ensureGroup(string $group, ?int $perPage = null)
    {
        if (array_key_exists($group$this->groups)) {
            return;
        }

        $this->groups[$group] = [
            'currentUri'   => clone current_url(true),
            'uri'          => clone current_url(true),
            'hasMore'      => false,
            'total'        => null,
            'perPage'      => $perPage ?? $this->config->perPage,
            'pageCount'    => 1,
            'pageSelector' => $group === 'default' ? 'page' : 'page_' . $group,
        ];

        $this->calculateCurrentPage($group);

        if ($_GET) {
            

    function form_open(string $action = '', $attributes = [], array $hidden = []): string
    {
        // If no action is provided then set to the current url         if ($action) {
            $action = current_url(true);
        } // If an action is not a full URL then turn it into one         elseif (strpos($action, '://') === false) {
            // If an action has {locale}             if (strpos($action, '{locale}') !== false) {
                $action = str_replace('{locale}', Services::request()->getLocale()$action);
            }

            $action = site_url($action);
        }

        if (is_array($attributes) && array_key_exists('csrf_id', $attributes)) {
            

class Plugins
{
    /** * Wrap helper function to use as view plugin. * * @return string|URI */
    public static function currentURL()
    {
        return current_url();
    }

    /** * Wrap helper function to use as view plugin. * * @return mixed|string|URI */
    public static function previousURL()
    {
        return previous_url();
    }

    
            $this->pageCache->make($this->request, $this->response);

            // Update the performance metrics             $body = $this->response->getBody();
            if ($body !== null) {
                $output = $this->displayPerformanceMetrics($body);
                $this->response->setBody($output);
            }

            // Save our current URI as the previous URI in the session             // for safer, more accurate use with `previous_url()` helper function.             $this->storePreviousURL(current_url(true));
        }

        unset($uri);

        // Is there a post-system event?         Events::trigger('post_system');

        return $this->response;
    }

    /** * You can load different configurations depending on your * current environment. Setting the environment also influences * things like logging and error reporting. * * This can be set to anything, but default usage is: * * development * testing * production * * @codeCoverageIgnore * * @deprecated 4.4.0 No longer used. Moved to index.php and spark. */

    public function run(float $startTime, float $totalTime, RequestInterface $request, ResponseInterface $response): string
    {
        $data = [];
        // Data items used within the view.         $data['url']             = current_url();
        $data['method']          = strtoupper($request->getMethod());
        $data['isAJAX']          = $request->isAJAX();
        $data['startTime']       = $startTime;
        $data['totalTime']       = $totalTime * 1000;
        $data['totalMemory']     = number_format((memory_get_peak_usage()) / 1024 / 1024, 3);
        $data['segmentDuration'] = $this->roundTo($data['totalTime'] / 7);
        $data['segmentCount']    = (int) ceil($data['totalTime'] / $data['segmentDuration']);
        $data['CI_VERSION']      = CodeIgniter::CI_VERSION;
        $data['collectors']      = [];

        foreach ($this->collectors as $collector) {
            
Home | Imprint | This part of the site doesn't use cookies.