Ka Extensions for OpenCart 4

This documentation applies to Ka Extensions for OpenCart 4.x only. It is not compatible with OpenCart 3.

Model extends Model
in component
uses TraitSession, TraitModel

AbstractYes

Base model class for models of Ka extensions.

Table of Contents

Properties

Methods

__construct()  : mixed
Creates the Db helper object and calls onLoad().
getLastError()  : mixed
Returns the last error.
getSession()  : mixed
Returns a reference to a value in the session area of the current class; null is created if missing.
onLoad()  : bool
Called at the end of the constructor. Override it to initialize the model.
setSession()  : mixed
Stores a value in the session area of the current class.

Properties

Methods

__construct()

Creates the Db helper object and calls onLoad().

public __construct(mixed $registry) : mixed

$registry — OpenCart registry.

Parameters
$registry : mixed

getLastError()

Returns the last error.

public getLastError() : mixed
Return values
mixed —

Last error.

getSession()

Returns a reference to a value in the session area of the current class; null is created if missing.

protected & getSession(mixed $key) : mixed

$key — value key.

Parameters
$key : mixed
Return values
mixed —

Reference to the value.

onLoad()

Called at the end of the constructor. Override it to initialize the model.

protected onLoad() : bool
Return values
bool

setSession()

Stores a value in the session area of the current class.

protected setSession(mixed $key, mixed $value) : mixed

$key — value key. $value — value.

Parameters
$key : mixed
$value : mixed

        
On this page

Search results