Version class

access public
package kocuj_internal_lib
inherited_from \KocujIL\V12a\Classes\ComponentObject

 Methods

Constructor

__construct(object $projectObj) : void
Inherited
access public

Parameters

$projectObj

object

\KocujIL\V12a\Classes\Project object for current project

Action for updating version number

actionPluginsLoaded() : void
access public

Get object of class type from component

getComponent(string $type, integer $projectCategory = \KocujIL\V12a\Enums\ProjectCategory::CORE, string $fragment = '') : object
Inherited
access public

Parameters

$type

string

Component type

$projectCategory

integer

Component category; must be one of the following constants from \KocujIL\V12a\Enums\ProjectCategory: CORE (for "core" category), ALL (for "all" category), FRONTEND (for "frontend" category) or BACKEND (for "backend" category) - default: \KocujIL\V12a\Enums\ProjectCategory::CORE

$fragment

string

Component fragment - default: empty

Returns

objectObject of class type from component

Get current version of project

getCurrentVersion() : string
access public

Returns

stringCurrent version of project

Get old version number from database

getOldVersionOptionValue() : array
access public

Returns

arrayOld version number from database

Get old version number for site from database

getOldVersionSiteOptionValue() : array
access public

Returns

arrayOld version number for site from database

Get option name for old version number

getOptionNameOldVersion() : string
Static
access public

Returns

stringOption name for old version number

Get option name for version

getOptionNameVersion() : string
Static
access public

Returns

stringOption name for version

Get object of type \KocujIL\V12a\Classes\Project

getProjectObj() : object
Inherited
access public

Returns

objectObject of type \KocujIL\V12a\Classes\Project

Get object of class type for strings from component

getStrings(string $type, integer $projectCategory = \KocujIL\V12a\Enums\ProjectCategory::CORE) : object
Inherited
access public

Parameters

$type

string

Component type

$projectCategory

integer

Component category; must be one of the following constants from \KocujIL\V12a\Enums\ProjectCategory: CORE (for "core" category), ALL (for "all" category), FRONTEND (for "frontend" category) or BACKEND (for "backend" category) - default: \KocujIL\V12a\Enums\ProjectCategory::CORE

Returns

objectObject of class type for strings from component

Get update callbacks

getUpdateCallbacks() : array
access public

Returns

arrayUpdate callbacks

Get version number from database

getVersionOptionValue() : string
access public

Returns

stringVersion number from database

Get version number for site from database

getVersionSiteOptionValue() : string
access public

Returns

stringVersion number for site from database

Set current version of project

setCurrentVersion($currentVersion) : void
access public

Parameters

$currentVersion

Set update callbacks

setUpdateCallbacks(array|string $updateCallback, array|string $siteUpdateCallback = NULL) : void
access public

Parameters

$updateCallback

arraystring

Callback function or method name for update; can be global function or method from any class

$siteUpdateCallback

arraystring

Callback function or method name for site update; can be global function or method from any class - default: NULL

Update project version

update(boolean|string $version, string $updateCallbackType, integer $metaType) : void
access private

Parameters

$version

booleanstring

Version number or false if cannot be retrieved

$updateCallbackType

string

Update callback type

$metaType

integer

Meta type; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Core\Meta\Type: AUTO (for automatic meta type) or SITE (for site meta type)

 Properties

 

Current version of project

$currentVersion : string

Default

''
access private
 

\KocujIL\V12a\Classes\Project object for current project

$projectObj : object

Default

NULL
access private
 

Update callbacks

$updateCallbacks : array

Default

array()
access private