FusionDirectory
|
this class stores static methods used to parse templates LDAP data More...
Static Public Member Functions | |
static | fetch ($dn) |
Fetch a template from LDAP and returns its attributes and dependencies information. | |
static | fieldsFromLDAP (array $template_attrs) |
Translate template attrs into $attrs as if taken from LDAP. | |
static | fieldsToLDAP (array $template_attrs, array $attrs) |
Translate $attrs into template attrs. | |
static | checkFields ($attrs) |
Check template fields. More... | |
static | parseMask (string $mask, array $attrs) |
Parse a mask (without surrounding %) using $attrs attributes and apply modifiers. More... | |
static | neededAttrs (array &$attrs, array $flatdepends) |
Return attrs needed before applying template. More... | |
static | parseArray (array $attrs, array $specialAttrs, $target=NULL) |
Parse template masks in an array. More... | |
static | parseString (string $string, array $attrs, $escapeMethod=NULL, string $unique=NULL, string $target=NULL) |
Parse template masks in a single string. More... | |
static | listFields ($string) |
Parse template masks in a single string and list the fields it needs. More... | |
Static Protected Member Functions | |
static | iteratePossibleValues (string $rule, array $variables, $escapeMethod=NULL) |
Generator that yields possible template mask values. More... | |
static | applyModifier (string $m, array $args, $str) |
Apply a modifier. More... | |
static | flatDepends (&$cache, &$errors, $depends, $key, array $forbidden=[]) |
Flattens dependencies (if a depends of b which depends of c then a depends of c) | |
static | attributesDependencies (array $attrs) |
Computes dependencies between attributes: which attributes must be filled in order to compute each attribute value. | |
static | sortAttributes (array $attrs, array $flatdepends) |
Sort attrs depending of dependencies. | |
this class stores static methods used to parse templates LDAP data
Definition at line 28 of file class_templateHandling.inc.
|
staticprotected |
Apply a modifier.
string | $m | the modifier |
array | $args | the parameters |
mixed | $str | the string or array to apply the modifier on |
Definition at line 555 of file class_templateHandling.inc.
|
static |
Check template fields.
Returns errors if there are recursive dependencies. Might check more things later
Definition at line 116 of file class_templateHandling.inc.
|
staticprotected |
Generator that yields possible template mask values.
string | $rule | The mask |
array | $variables | The possible values for each mask with its position and length |
callable | $escapeMethod | Method to call to escape mask result |
Definition at line 280 of file class_templateHandling.inc.
|
static |
Parse template masks in a single string and list the fields it needs.
Definition at line 306 of file class_templateHandling.inc.
References Lock\addOrFail(), CONFIGRDN, Lock\deleteByObject(), objects\open(), and strict_uid_mode().
|
static |
Return attrs needed before applying template.
Definition at line 169 of file class_templateHandling.inc.
Referenced by template\reset().
|
static |
Parse template masks in an array.
array | $attrs | The attributes in LDAP format |
array | $specialAttrs | Some additional fake attributes which can be used in masks |
string | $target | Dn of an object to ignore in the unicity check |
Definition at line 196 of file class_templateHandling.inc.
|
static |
Parse a mask (without surrounding %) using $attrs attributes and apply modifiers.
Definition at line 126 of file class_templateHandling.inc.
|
static |
Parse template masks in a single string.
string | $string | The mask |
array | $attrs | The attributes in LDAP format |
callable | $escapeMethod | Method to call to escape mask result |
string | $unique | Name of the LDAP attribute to check unicity on, if any |
string | $target | Dn of an object to ignore in the unicity check |
Definition at line 223 of file class_templateHandling.inc.
References class_available().
Referenced by simplePlugin\callHook().