Skip to content
View in the app

A better way to browse. Learn more.

Clicshopping AI, Free generative artificial intelligence e-commerce Open Source , Open Source Store Onlne

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Registry ClicShopping\OM\Registry

Introduction

The registry is an object storage container strictly used to store object instances and access them by reference. It does not allow registered objects to be overwritten unless manually specified to do so.

Adding to the Registry

Objects can be added to the registry using Registry::set().

use ClicShopping\OM\Db;
use ClicShopping\OM\Registry;

$CLICSHOPPING_Db = Db::initialize();

Registry::set('Db', $CLICSHOPPING_Db);

Parameters

Registry::set($key, $value, $force)
Parameter    Value
$key           The name of the object to reference in the registry.
$value           The object to store in the registry.
$force            If this is enabled, overwrite an existing object with a new value. Default: false

Accessing the Registry

An object can be accessed in the registry using Registry::get().

use ClicShopping\OM\Registry;

$CLICSHOPPING_Db = Registry::get('Db');

Parameters

Registry::get($key)
Parameter    Value
$key    The name of the object to access in the registry.

Checking the Registry

An existing object can be checked for in the registry using Registry::exists().

use ClicShopping\OM\Db;
use ClicShopping\OM\Registry;

if (Registry::exists('Db')) {
    $CLICSHOPPING_Db = Registry::get('Db');
} else {
    $CLICSHOPPING_Db = Db::initialize();

    Registry::set('Db', $CLICSHOPPING_Db);
}

Parameters

Registry::exists($key)
Parameter    Value
$key            The name of the object to check in the registry for.

 

Guest
This topic is now closed to further replies.

Important Information

By using this site, you agree to our Terms of Use

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.