PHP Classes

File: docs/EntityMgr.md

Recommend this page to a friend!
  Classes of Kjell-Inge Gustafsson   PcGen   docs/EntityMgr.md   Download  
File: docs/EntityMgr.md
Role: Auxiliary data
Content type: text/markdown
Description: Auxiliary data
Class: PcGen
Generate PHP code from parameters
Author: By
Last change: 1.1.47
Date: 3 years ago
Size: 2,913 bytes
 

Contents

Class file image Download

[comment]: # (This file is part of PcGen, PHP Code Generation support package. Copyright 2020 Kjell-Inge Gustafsson, kigkonsult, All rights reserved, licence GPL 3.0)

EntityMgr

The `EntityMgr` class manages PHP Entity set

  • used by [AssignClauseMgr] and [ReturnClauseMgr]
  • the Entity set has
    

Note, invoke of function/method is managed by [FcnInvokeMgr]

EntityMgr Methods

Inherited [Common methods]


* ```class``` _string_ one of null, self, $this, 'otherClass', '$class'
   convenient constants found in PcGenInterface 
* ```variable``` _string_ constant/variable/property name
   for CONSTANT use ```EntityMgr::setIsConst()``` below
   variable will be $-prefixed
* ```index```  _int_|_string_ opt array index
* For eol and indents, defaults are used
* Return _static_
* Throws _InvalidArgumentException_

---

  • Return _array_, result code rows (null-bytes removed) no trailing eol
  • Throws _RuntimeException_

* Return _string_ with code rows (extends toArray), each code row with trailing eol
* Throws _RuntimeException_

---

  • Return string

* ```class``` _string_ one of null, self, this, 'otherClass', '$class'
   convenient constants found in PcGenInterface
* Return _static_
* Throws _InvalidArgumentException_

---

  • Return _string_

* ```variable``` _string_ constant/variable/property name
   for CONSTANT use ```EntityMgr::setIsConst()``` below
   variable will be $-prefixed
* Return _static_
* Throws _InvalidArgumentException_

---

  • Return _int|_string_

* ```index```  _int_|_string_ opt array index
* Return _static_
* Throws _InvalidArgumentException_

---

  • Results in uppercase constant
  • 
    
  • Return _static_


* Applicable only when class matches '$class' (i.e. $-prefixed string)
* ```isStatic``` _bool_, (false default) 
* Return _static_


Example : ```EntityMgr::factory( '$class', 'property' )->toString(); ```<br>
Result : ``` $class->property ``` (+eol)

Example : ```EntityMgr::factory( '$class', 'property' )->setIsStatic( true )->toString(); ```<br>
Result : ``` $class::$property ``` (+eol)
---

<small>Return to [README] - [Summary]</small>

[AssignClauseMgr]:AssignClauseMgr.md
[Common methods]:CommonMethods.md
[FcnInvokeMgr]:FcnInvokeMgr.md
[README]:../README.md
[ReturnClauseMgr]:ReturnClauseMgr.md
[Summary]:Summary.md