Class: atkMetaCompiler
Source Location: /meta/compiler/class.atkmetacompiler.inc
Class atkMetaCompiler
Method Summary
| static
atkMetaCompiler
|
get() |
Returns an instance of the meta compiler with the given class. If no class is specified the default meta compiler is used determined using the $config_meta_compiler variable. |
| string |
compile() |
Compile meta policy. Returns the node code for the given meta policy. |
| void |
_compileAttribute() |
Compiles the attribute with the given name using the given data. |
| string |
_getFlagsString() |
Generates an flags string for a given flags value. |
| bool |
_isIncluded() |
Checks if a certain attribute should be included or not. Checks both the include and exclude lists. If the attribute is not part of the table itself it will always be included (e.g. manually added relations etc.) |
Methods
static int compareAttributes(
array
$attr1, array
$attr2
)
|
|
Compare the order of two attributes.
Parameters:
|
array |
$attr1: |
attribute data |
|
array |
$attr2: |
attribute data |
API Tags:
| Return: | comparision value |
| Access: | public |
Returns an instance of the meta compiler with the given class. If no class is specified the default meta compiler is used determined using the $config_meta_compiler variable.
Parameters:
|
string |
$class: |
full ATK compiler class path |
API Tags:
| Return: | meta compiler |
| Access: | public |
Compile meta policy. Returns the node code for the given meta policy.
Parameters:
API Tags:
| Return: | meta policy |
| Access: | public |
void _compileAttribute(
atkMetaPolicy
$policy, string
$name, array
$data, string
3
)
|
|
Compiles the attribute with the given name using the given data.
Parameters:
|
atkMetaPolicy |
$policy: |
meta policy |
|
string |
$name: |
attribute name |
|
array |
$data: |
attribute compile data |
|
string |
3: |
attribute code |
API Tags:
Compile attributes.
Parameters:
API Tags:
| Return: | code |
| Access: | protected |
Compile node base.
Parameters:
API Tags:
| Return: | code |
| Access: | protected |
string _getAttributeFlagsString(
int
$flags
)
|
|
Generates an attributes flags string for a given flags value.
Parameters:
API Tags:
| Return: | flags string |
| Access: | protected |
string _getFlagsString(
int
$flags, string
$prefix, [array
$specificExcludes = array()], [array
$constExcludes = array()]
)
|
|
Generates an flags string for a given flags value.
Parameters:
|
int |
$flags: |
flags |
|
string |
$prefix: |
flags prefix |
|
array |
$specificExcludes: |
values of customizable flags which can differ for subclasses |
|
array |
$constExcludes: |
constant names of constants that should be excluded |
API Tags:
| Return: | flags string |
| Access: | protected |
string _getNodeFlagsString(
int
$flags
)
|
|
Generates a node flags string for a given flags value.
Parameters:
API Tags:
| Return: | flags string |
| Access: | protected |
Checks if a certain attribute should be included or not. Checks both the include and exclude lists. If the attribute is not part of the table itself it will always be included (e.g. manually added relations etc.)
Parameters:
API Tags:
| Return: | attribute included? |
| Access: | protected |