Magrathea PHP 2

CodeCreator extends Singleton
in package

Class for code generations

Table of Contents

Properties

$namespace  : mixed
$structure  : mixed
$instance  : array<string|int, mixed>|null

Methods

__wakeup()  : mixed
GenerateBaseCodeForObject()  : string
Generate Base Code for object
GenerateBaseCodeForObjectControl()  : string
Generate Base Code for object
GenerateCodeForAdmin()  : string
Generate Code for AdminCRUD
GenerateCodeForApi()  : string
Generate Code for MagratheaAPI
GenerateCodeForObject()  : string
Generate Code for object
GenerateCodeForObjectControl()  : string
Generate Code for object
GetCodeCreationData()  : array<string|int, mixed>
Gets the data that will be used to create the code
Instance()  : static|Singleton
Load()  : CodeCreator
Loads basic structure for code creation
MockClass()  : static|Singleton
SetInstance()  : mixed
__clone()  : mixed
__construct()  : mixed
GetCommentAlert()  : string
comment for the header of the file
GetFullControlBaseName()  : string
returns full object control base name with namespace
GetFullObjName()  : string
returns full object name with namespace
GetNamespace()  : string

Properties

$instance

protected static array<string|int, mixed>|null $instance = []

Methods

GenerateBaseCodeForObject()

Generate Base Code for object

public GenerateBaseCodeForObject(string $object, array<string|int, mixed> $data) : string
Parameters
$object : string

object name

$data : array<string|int, mixed>

array with magrathea_conf data for object

Return values
string

code

GenerateBaseCodeForObjectControl()

Generate Base Code for object

public GenerateBaseCodeForObjectControl(string $object, array<string|int, mixed> $data) : string
Parameters
$object : string

object name

$data : array<string|int, mixed>

array with magrathea_conf data for object

Return values
string

code

GenerateCodeForAdmin()

Generate Code for AdminCRUD

public GenerateCodeForAdmin(string $object) : string
Parameters
$object : string

object name

Return values
string

code

GenerateCodeForApi()

Generate Code for MagratheaAPI

public GenerateCodeForApi(string $object) : string
Parameters
$object : string

object name

Return values
string

code

GenerateCodeForObject()

Generate Code for object

public GenerateCodeForObject(string $object) : string
Parameters
$object : string

object name

Return values
string

code

GenerateCodeForObjectControl()

Generate Code for object

public GenerateCodeForObjectControl(string $object) : string
Parameters
$object : string

object name

Return values
string

code

GetCodeCreationData()

Gets the data that will be used to create the code

public GetCodeCreationData() : array<string|int, mixed>
Return values
array<string|int, mixed>

array like [ "success", "data", "errors" ]

SetInstance()

public SetInstance(mixed $inst) : mixed
Parameters
$inst : mixed

__construct()

private final __construct() : mixed

GetCommentAlert()

comment for the header of the file

private GetCommentAlert() : string
Return values
string

GetFullControlBaseName()

returns full object control base name with namespace

private GetFullControlBaseName(mixed $object) : string
Parameters
$object : mixed
Return values
string

GetFullObjName()

returns full object name with namespace

private GetFullObjName(string $obj[, bool $isBase = true ]) : string
Parameters
$obj : string

object name

$isBase : bool = true

is base object we want?

Return values
string

GetNamespace()

private GetNamespace(mixed $object[, mixed $isBase = false ][, mixed $isControl = false ]) : string
Parameters
$object : mixed
$isBase : mixed = false
$isControl : mixed = false
Return values
string

        
On this page

Search results