FusionDirectory
 All Data Structures Files Functions Variables
Static Public Member Functions | Static Protected Member Functions
templateHandling Class Reference

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 ($mask, array $attrs)
 Parse a mask (without surrounding %) using $attrs attributes, apply modifiers and returns an array containing possible results.
 
static neededAttrs (array &$attrs, array $flatdepends)
 Return attrs needed before applying template. More...
 
static parseArray (array $attrs)
 Parse template masks in an array. More...
 
static parseString ($string, array $attrs, $escapeMethod=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 applyModifier ($m, array $args, $str)
 Apply a modifier. More...
 
static flatDepends (&$cache, &$errors, $depends, $key, array $forbidden=array())
 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.
 

Detailed Description

this class stores static methods used to parse templates LDAP data

Definition at line 28 of file class_templateHandling.inc.

Member Function Documentation

static applyModifier (   $m,
array  $args,
  $str 
)
staticprotected

Apply a modifier.

Parameters
string$mthe modifier
array$argsthe parameters
mixed$strthe string or array to apply the modifier on
Returns
array an array of possible values

Definition at line 382 of file class_templateHandling.inc.

static checkFields (   $attrs)
static

Check template fields.

Returns errors if there are recursive dependencies. Might check more things later

Definition at line 112 of file class_templateHandling.inc.

Referenced by simplePlugin\save().

static listFields (   $string)
static

Parse template masks in a single string and list the fields it needs.

Returns
array An array with the names of the fields used in the string pattern

Definition at line 234 of file class_templateHandling.inc.

static neededAttrs ( array &  $attrs,
array  $flatdepends 
)
static

Return attrs needed before applying template.

Returns
array An array of attributes which are needed by the template

Definition at line 167 of file class_templateHandling.inc.

Referenced by template\reset().

static parseArray ( array  $attrs)
static

Parse template masks in an array.

Returns
array An array with the final values of attributes

Definition at line 190 of file class_templateHandling.inc.

static parseString (   $string,
array  $attrs,
  $escapeMethod = NULL 
)
static

Parse template masks in a single string.

Returns
string the string with patterns replaced by their values

Definition at line 211 of file class_templateHandling.inc.

Referenced by simplePlugin\callHook().


The documentation for this class was generated from the following file: