CRM_Core_CodeGen_Schema
class CRM_Core_CodeGen_Schema extends CRM_Core_CodeGen_BaseTask
Create SQL files to create and populate a new schema.
Properties
protected CRM_Core_CodeGen_Main | $config | from CRM_Core_CodeGen_BaseTask | |
protected | $tables | from CRM_Core_CodeGen_BaseTask |
Methods
TODO: this is the most rudimentary possible hack. CG config should eventually be made into a first-class object.
Extract a single regex from a file.
Determine if two snippets of PHP code are approximately equivalent.
Perform the task.
No description
No description
No description
No description
No description
No description
Details
at line 13
__construct(CRM_Core_CodeGen_Main $config)
CRM_Core_CodeGen_Schema constructor.
in CRM_Core_CodeGen_BaseTask at line 27
setConfig(object $config)
TODO: this is the most rudimentary possible hack. CG config should eventually be made into a first-class object.
in CRM_Core_CodeGen_BaseTask at line 36
bool
needsUpdate()
in CRM_Core_CodeGen_BaseTask at line 50
static protected string|NULL
extractRegex(string $file, string $regex)
Extract a single regex from a file.
in CRM_Core_CodeGen_BaseTask at line 75
protected bool
isApproxPhpMatch($actual, $expected)
Determine if two snippets of PHP code are approximately equivalent.
This includes exceptions to equivalence for (a) whitespace and (b) the token "GenCodeChecksum".
This is useful for determining if someone has manually mucked with one the files. However, it's not perfect -- because whitespace changes are not detected. Hence, it's good to use in combination with another heuristic.
at line 18
run()
Perform the task.