Project class

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

 Methods

Constructor

__construct(array $components, array $settingsMain, array $settings, array $stringsClasses = array(), array $libClasses = array()) : void
access public
inherited_from \KocujIL\V12a\Classes\ProjectParent::__construct()

Parameters

$components

array

Components to use

$settingsMain

array

Project main settings; project settings have the following fields: "licensename" (string type; name of license, for example, "GPL"), "mainfilename" (string type; main filename in project), "title" (string type; title of project), "type" (int type; type of project; it should be one of the constants from \KocujIL\V12a\Enums\ProjectType), "version" (string type; version of the project); there are also the following fields which can exists or not: "name" (string type; name of the project), "titleoriginal" (string type; original title of project; should not be translated), "url" (string type; URL to website from the project)

$settings

array

Project settings

$stringsClasses

array

Classes list for classes with strings which implement \KocujIL\V12a\Interfaces\Strings interface; if some keys are empty or does not exist, the default classes which returns only empty strings will be used for these keys - default: empty

$libClasses

array

Classes list for Kocuj Internal Lib which has been replaced by child classed; if some keys are empty or does not exist, the default classes will be used for these keys - default: empty

Constructor

__construct(array $components, array $settings, array $stringsClasses = array(), array $additionalProjectsForRequirements = array()) : void
Inherited
access public

Parameters

$components

array

Components to use

$settings

array

Project settings

$stringsClasses

array

Classes list for classes with strings which implement \KocujIL\V12a\Interfaces\Strings interface; if some keys are empty or does not exist, the default classes which returns only empty strings will be used for these keys - default: empty

$additionalProjectsForRequirements

array

Additional projects for checking requirements; each element should be objec of class derived from this class (ProjectParent) and its key should be the name of class derived from this class (ProjectParent) - default: empty

Action for removing all initialization classes

actionRemoveInits() : void
Inherited
access public

Shutdown action

actionShutdown() : void
Inherited
access public

Get object of class type from component

get(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 component errors

getComponentErrors(integer $projectCategory, string $type) : array
Inherited
access public

Parameters

$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)

$type

string

Component type

Returns

arrayComponent errors

Get project main setting with internal name

getMainSettingInternalName() : string
access public

Returns

stringProject main setting with internal name

Get project main setting with license name

getMainSettingLicenseName() : string
access public

Returns

stringProject main setting with license name

Get project main setting with main filename

getMainSettingMainFilename() : string
access public

Returns

stringProject main setting with main filename

Get project main setting with name

getMainSettingName() : string
access public

Returns

stringProject main setting with name

Get project main setting with title

getMainSettingTitle() : string
access public

Returns

stringProject main setting with title

Get project main setting with original title

getMainSettingTitleOriginal() : string
access public

Returns

stringProject main setting with original title

Get project main setting with type

getMainSettingType() : string
access public

Returns

stringProject main setting with type

Get project main setting with URL

getMainSettingUrl() : string
access public

Returns

stringProject main setting with URL

Get project main setting with version

getMainSettingVersion() : string
access public

Returns

stringProject main setting with version

Get project setting with array type

getSettingArray(string $type, string $index = '') : array | string
Inherited
access public

Parameters

$type

string

Data type

$index

string

Data index

Returns

arraystringProject setting

Get project setting with string type

getSettingString(string $type) : string
Inherited
access public

Parameters

$type

string

Data type

Returns

stringProject setting

Get object of class type which implements \KocujIL\V12a\Interfaces\Strings interface

getStringsObj(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 which implements \KocujIL\V12a\Interfaces\Strings interface

Load class for namespace prefix

loadClassForNamespacePrefix(string $namespacePrefix, string $className, integer $projectCategory, string $type, string $fragmentIndex) : boolean
Inherited
access private

Parameters

$namespacePrefix

string

Namespace prefix

$className

string

Class name

$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)

$type

string

Component type

$fragmentIndex

string

Component fragment index

Returns

booleanClass has been loaded (true) or not (false)

 Properties

 

Namespace prefix

$namespacePrefix : string

Default

'\\KocujIL\\V12a'
access protected
inherited_from \KocujIL\V12a\Classes\ProjectParent::namespacePrefix
 

Namespace prefix

$namespacePrefix : string

Default

''
access protected
 

Project components

$components : array

Default

array()
access private
 

Project components errors

$componentsErrors : array

Default

array()
access private
 

Initialization classes to remove

$initsToRemove : array

Default

array()
access private
 

Objects with instances of classes for components

$libComponentsObjects : array

Default

array()
access private
 

Project settings

$settings : array

Default

array()
access private
 

Project main settings

$settingsMain : array

Default

array()
access private
 

Shutdown flag

$shutdown : boolean

Default

false
access private
 

Classes list for classes with strings which implement \KocujIL\V12a\Interfaces\Strings interface

$stringsClassesList : array

Default

array()
access private