Skip to content

Models

Allow to get mapped classes without using magic methods

Properties

instances

Store an array of instances

public array $instances

Methods

__construct

public __construct(?array $mapping = null): mixed

Parameters:

Parameter Type Description
$mapping ?array

getInstances

Get an array of mapped models

public getInstances(): array

setInstance

Set the instance for a class

public setInstance(string $class, \Zemit\Mvc\Model $instance): void

Parameters:

Parameter Type Description
$class string
$instance \Zemit\Mvc\Model

unsetInstance

Remove an existing class

public unsetInstance(string $map): void

Parameters:

Parameter Type Description
$map string

getInstance

Return an instance of a specified class implementing Model interface

public getInstance(string $class): \Zemit\Mvc\Model

Parameters:

Parameter Type Description
$class string The fully qualified class name

Return Value:

An instance of the specified class


getBackup

Return an instance of \Zemit\Models\Interfaces\BackupInterface

public getBackup(): \Zemit\Models\Interfaces\BackupInterface

getAudit

Return an instance of \Zemit\Models\Interfaces\AuditInterface

public getAudit(): \Zemit\Models\Interfaces\AuditInterface

getAuditDetail

Return an instance of \Zemit\Models\Interfaces\AuditDetailInterface

public getAuditDetail(): \Zemit\Models\Interfaces\AuditDetailInterface

getLog

Return an instance of \Zemit\Models\Interfaces\LogInterface

public getLog(): \Zemit\Models\Interfaces\LogInterface

getEmail

Return an instance of \Zemit\Models\Interfaces\EmailInterface

public getEmail(): \Zemit\Models\Interfaces\EmailInterface

getJob

Return an instance of \Zemit\Models\Interfaces\JobInterface

public getJob(): \Zemit\Models\Interfaces\JobInterface

getFile

Return an instance of \Zemit\Models\Interfaces\FileInterface

public getFile(): \Zemit\Models\Interfaces\FileInterface

getSession

Return an instance of \Zemit\Models\Interfaces\SessionInterface

public getSession(): \Zemit\Models\Interfaces\SessionInterface

getFlag

Return an instance of \Zemit\Models\Interfaces\FlagInterface

public getFlag(): \Zemit\Models\Interfaces\FlagInterface

getSetting

Return an instance of \Zemit\Models\Interfaces\SettingInterface

public getSetting(): \Zemit\Models\Interfaces\SettingInterface

getLang

Return an instance of \Zemit\Models\Interfaces\LangInterface

public getLang(): \Zemit\Models\Interfaces\LangInterface

getTranslate

Return an instance of \Zemit\Models\Interfaces\TranslateInterface

public getTranslate(): \Zemit\Models\Interfaces\TranslateInterface

getTranslateField

Return an instance of \Zemit\Models\Interfaces\TranslateFieldInterface

public getTranslateField(): \Zemit\Models\Interfaces\TranslateFieldInterface

getTranslateTable

Return an instance of \Zemit\Models\Interfaces\TranslateTableInterface

public getTranslateTable(): \Zemit\Models\Interfaces\TranslateTableInterface

getWorkspace

Return an instance of \Zemit\Models\Interfaces\WorkspaceInterface

public getWorkspace(): \Zemit\Models\Interfaces\WorkspaceInterface

getWorkspaceLang

Return an instance of \Zemit\Models\Interfaces\WorkspaceInterface

public getWorkspaceLang(): \Zemit\Models\Interfaces\WorkspaceLangInterface

getPage

Return an instance of \Zemit\Models\Interfaces\PageInterface

public getPage(): \Zemit\Models\Interfaces\PageInterface

getPost

Return an instance of \Zemit\Models\Interfaces\PostInterface

public getPost(): \Zemit\Models\Interfaces\PostInterface

getTemplate

Return an instance of \Zemit\Models\Interfaces\TemplateInterface

public getTemplate(): \Zemit\Models\Interfaces\TemplateInterface

getTable

Return an instance of \Zemit\Models\Interfaces\TableInterface

public getTable(): \Zemit\Models\Interfaces\TableInterface

getField

Return an instance of \Zemit\Models\Interfaces\FieldInterface

public getField(): \Zemit\Models\Interfaces\FieldInterface

getProfile

Return an instance of \Zemit\Models\Interfaces\ProfileInterface

public getProfile(): \Zemit\Models\Interfaces\ProfileInterface

getOauth2

Return an instance of \Zemit\Models\Interfaces\UserInterface

public getOauth2(): \Zemit\Models\Interfaces\Oauth2Interface

getUser

Return an instance of \Zemit\Models\Interfaces\UserInterface

public getUser(): \Zemit\Models\Interfaces\UserInterface

getUserType

Return an instance of \Zemit\Models\Interfaces\UserTypeInterface

public getUserType(): \Zemit\Models\Interfaces\UserTypeInterface

getUserGroup

Return an instance of \Zemit\Models\Interfaces\UserGroupInterface

public getUserGroup(): \Zemit\Models\Interfaces\UserGroupInterface

getUserRole

Return an instance of \Zemit\Models\Interfaces\UserRoleInterface

public getUserRole(): \Zemit\Models\Interfaces\UserRoleInterface

getUserFeature

Return an instance of \Zemit\Models\Interfaces\UserFeatureInterface

public getUserFeature(): \Zemit\Models\Interfaces\UserFeatureInterface

getRole

Return an instance of \Zemit\Models\Interfaces\RoleInterface

public getRole(): \Zemit\Models\Interfaces\RoleInterface

getRoleRole

Return an instance of \Zemit\Models\Interfaces\RoleRoleInterface

public getRoleRole(): \Zemit\Models\Interfaces\RoleRoleInterface

getRoleFeature

Return an instance of \Zemit\Models\Interfaces\RoleFeatureInterface

public getRoleFeature(): \Zemit\Models\Interfaces\RoleFeatureInterface

getGroup

Return an instance of \Zemit\Models\Interfaces\GroupInterface

public getGroup(): \Zemit\Models\Interfaces\GroupInterface

getGroupRole

Return an instance of \Zemit\Models\Interfaces\GroupRoleInterface

public getGroupRole(): \Zemit\Models\Interfaces\GroupRoleInterface

getGroupType

Return an instance of \Zemit\Models\Interfaces\GroupTypeInterface

public getGroupType(): \Zemit\Models\Interfaces\GroupTypeInterface

getGroupFeature

Return an instance of \Zemit\Models\Interfaces\GroupFeatureInterface

public getGroupFeature(): \Zemit\Models\Interfaces\GroupFeatureInterface

getType

Return an instance of \Zemit\Models\Interfaces\TypeInterface

public getType(): \Zemit\Models\Interfaces\TypeInterface

getFeature

Return an instance of \Zemit\Models\Interfaces\FeatureInterface

public getFeature(): \Zemit\Models\Interfaces\FeatureInterface

Inherited methods

getDI

public getDI(): \Phalcon\Di\DiInterface
  • This method is abstract.

getConfig

Retrieve the config from DI

public getConfig(): \Zemit\Bootstrap\Config

setModelsMap

Set the models mapping or retrieve the mapped models from the config

public setModelsMap(?array $modelsMap = null): void

Parameters:

Parameter Type Description
$modelsMap ?array

getModelsMap

Get an array of mapped models

public getModelsMap(): array

setClassMap

Map a new class

public setClassMap(string $map, string $class): void

Parameters:

Parameter Type Description
$map string
$class string

removeClassMap

Remove an existing class

public removeClassMap(string $map): void

Parameters:

Parameter Type Description
$map string

getClassMap

Return the class mapping

public getClassMap(string $class): string

Parameters:

Parameter Type Description
$class string

getBackupClass

Return the mapped class name of \Zemit\Models\Backup::class

public getBackupClass(): string

getAuditClass

Return the mapped class name of \Zemit\Models\Audit::class

public getAuditClass(): string

getAuditDetailClass

Return the mapped class name of \Zemit\Models\AuditDetail::class

public getAuditDetailClass(): string

getLogClass

Return the mapped class name of \Zemit\Models\Log::class

public getLogClass(): string

getEmailClass

Return the mapped class name of \Zemit\Models\Email::class

public getEmailClass(): string

getJobClass

Return the mapped class name of \Zemit\Models\Job::class

public getJobClass(): string

getFileClass

Return the mapped class name of \Zemit\Models\File::class

public getFileClass(): string

getSessionClass

Return the mapped class name of \Zemit\Models\Session::class

public getSessionClass(): string

getFlagClass

Return the mapped class name of \Zemit\Models\Flag::class

public getFlagClass(): string

getSettingClass

Return the mapped class name of \Zemit\Models\Setting::class

public getSettingClass(): string

getLangClass

Return the mapped class name of \Zemit\Models\Lang::class

public getLangClass(): string

getTranslateClass

Return the mapped class name of \Zemit\Models\Translate::class

public getTranslateClass(): string

getTranslateFieldClass

Return the mapped class name of \Zemit\Models\TranslateField::class

public getTranslateFieldClass(): string

getTranslateTableClass

Return the mapped class name of \Zemit\Models\TranslateTable::class

public getTranslateTableClass(): string

getWorkspaceClass

Return the mapped class name of \Zemit\Models\Workspace::class

public getWorkspaceClass(): string

getWorkspaceLangClass

Return the mapped class name of \Zemit\Models\WorkspaceLang::class

public getWorkspaceLangClass(): string

getPageClass

Return the mapped class name of \Zemit\Models\Page::class

public getPageClass(): string

getPostClass

Return the mapped class name of \Zemit\Models\Post::class

public getPostClass(): string

getTemplateClass

Return the mapped class name of \Zemit\Models\Template::class

public getTemplateClass(): string

getTableClass

Return the mapped class name of \Zemit\Models\Table::class

public getTableClass(): string

getFieldClass

Return the mapped class name of \Zemit\Models\Field::class

public getFieldClass(): string

getProfileClass

Return the mapped class name of \Zemit\Models\Profile::class

public getProfileClass(): string

getOauth2Class

Return the mapped class name of \Zemit\Models\Oauth2::class

public getOauth2Class(): string

getUserClass

Return the mapped class name of \Zemit\Models\User::class

public getUserClass(): string

getUserTypeClass

Return the mapped class name of \Zemit\Models\UserType::class

public getUserTypeClass(): string

getUserGroupClass

Return the mapped class name of \Zemit\Models\UserGroup::class

public getUserGroupClass(): string

getUserRoleClass

Return the mapped class name of \Zemit\Models\UserRole::class

public getUserRoleClass(): string

getUserFeatureClass

Return the mapped class name of \Zemit\Models\UserFeature::class

public getUserFeatureClass(): string

getRoleClass

Return the mapped class name of \Zemit\Models\Role::class

public getRoleClass(): string

getRoleRoleClass

Return the mapped class name of \Zemit\Models\RoleRole::class

public getRoleRoleClass(): string

getRoleFeatureClass

Return the mapped class name of \Zemit\Models\RoleFeature::class

public getRoleFeatureClass(): string

getGroupClass

Return the mapped class name of \Zemit\Models\Group::class

public getGroupClass(): string

getGroupRoleClass

Return the mapped class name of \Zemit\Models\GroupRole::class

public getGroupRoleClass(): string

getGroupTypeClass

Return the mapped class name of \Zemit\Models\GroupType::class

public getGroupTypeClass(): string

getGroupFeatureClass

Return the mapped class name of \Zemit\Models\GroupFeature::class

public getGroupFeatureClass(): string

getTypeClass

Return the mapped class name of \Zemit\Models\Type::class

public getTypeClass(): string

getFeatureClass

Return the mapped class name of \Zemit\Models\Feature::class

public getFeatureClass(): string