Abstract Class modTag

Description

Abstract class representing a pseudo-element that can be parsed.

  • abstract:

Located in /model/modx/modparser.class.php (line 471)


	
			
Direct descendents
Class Description
 class modFieldTag Tag representing a modResource field from the current MODx resource.
 class modPlaceholderTag Represents placeholder tags.
 class modLinkTag Represents link tags.
 class modLexiconTag Represents Lexicon tags, for localized strings.
Variable Summary
 mixed $modx
 mixed $name
 mixed $properties
 mixed $_cacheable
 mixed $_content
 mixed $_fields
 mixed $_filters
 mixed $_output
 mixed $_processed
 mixed $_properties
 mixed $_result
 mixed $_tag
 mixed $_token
Method Summary
 modTag __construct (modX &$modx)
 void cache ()
 void filterInput ()
 void filterOutput ()
 mixed get (string $k)
 string getContent ([ $options = array()])
 modInputFilter|null &getInputFilter ()
 modOutputFilter|null &getOutputFilter ()
 array getProperties ([array|string $properties = null])
 void getTag ()
 string getToken ()
 boolean isCacheable ()
 mixed process ([array|string $properties = null], [string $content = null])
 void set (string $k, mixed $v)
 void setCacheable ([boolean $cacheable = true])
 void setContent ( $content, [ $options = array()])
 boolean setProperties (array|string $properties, [boolean $merge = false])
 void setTag (string $tag)
 void setToken (string $token)
Variables
mixed $modx = null (line 472)
  • access: public
mixed $name (line 473)
  • access: public
mixed $properties (line 474)
  • access: public
mixed $_cacheable = true (line 487)
  • access: public
mixed $_content = null (line 475)
  • access: public
mixed $_fields = array(
'name' => '',
'properties' => ''
)
(line 483)
  • access: public
mixed $_filters = array('input' => null, 'output' => null) (line 488)
  • access: public
mixed $_output = '' (line 476)
  • access: public
mixed $_processed = false (line 480)
  • access: public
mixed $_properties = array() (line 479)
  • access: public
mixed $_propertyString = '' (line 478)
  • access: public
mixed $_result = true (line 477)
  • access: public
mixed $_tag = '' (line 481)
  • access: public
mixed $_token = '' (line 482)
  • access: public
Methods
Constructor __construct (line 490)
modTag __construct (modX &$modx)

Redefined in descendants as:
cache (line 533)

Cache the element into the elementCache by tag signature.

void cache ()
filterInput (line 666)

Apply an input filter to a tag.

This is called by default in modTag::process() after the tag properties have been parsed.

void filterInput ()
filterOutput (line 682)

Apply an output filter to a tag.

Call this method in your {modTag::process()} implementation when it is appropriate, typically once all processing has been completed, but before any caching takes place.

void filterOutput ()
get (line 503)

Generic getter method for modTag attributes.

  • return: The value of the field or null if it is not set.
  • see: xPDOObject::get()
  • access: public
mixed get (string $k)
  • string $k: The field key.
getContent (line 697)

Get the raw source content of the tag element.

  • return: The raw source content for the element.
  • access: public
string getContent ([ $options = array()])
  • array $options: An array of options implementations can use to accept language, revision identifiers, or other information to alter the behavior of the method.

Redefined in descendants as:
getInputFilter (line 625)

Get an input filter instance configured for this Element.

  • return: An input filter instance (or null if one cannot be loaded).
  • access: public
modInputFilter|null &getInputFilter ()
getOutputFilter (line 644)

Get an output filter instance configured for this Element.

  • return: An output filter instance (or null if one cannot be loaded).
  • access: public
modOutputFilter|null &getOutputFilter ()
getProperties (line 722)

Get the properties for this element instance for processing.

  • return: A simple array of properties ready to use for processing.
  • access: public
array getProperties ([array|string $properties = null])
  • array|string $properties: An array or string of properties to apply.
getTag (line 569)

Gets a tag representation of the modTag instance.

  • access: public
void getTag ()
getToken (line 544)

Returns the current token for the tag

  • return: The token for the tag
  • access: public
string getToken ()
isCacheable (line 789)

Indicates if the element is cacheable.

  • return: True if the element can be stored to or retrieved from the element cache.
  • access: public
boolean isCacheable ()

Redefined in descendants as:
process (line 605)

Process the tag and return the result.

mixed process ([array|string $properties = null], [string $content = null])
  • array|string $properties: An array of properties or a formatted property string.
  • string $content: Optional content to use for the element processing.

Redefined in descendants as:
set (line 523)

Generic setter method for modTag attributes.

void set (string $k, mixed $v)
  • string $k: The field key.
  • mixed $v: The value to assign to the field.
setCacheable (line 799)

Sets the runtime cacheability of the element.

  • access: public
void setCacheable ([boolean $cacheable = true])
  • boolean $cacheable: Indicates the value to set for cacheability of this element.

Redefined in descendants as:
setContent (line 711)

Set the raw source content for the tag element.

  • access: public
void setContent ( $content, [ $options = array()])
  • $content
  • array $options
setProperties (line 738)

Set default properties for this element instance.

  • return: true if the properties are set.
  • access: public
boolean setProperties (array|string $properties, [boolean $merge = false])
  • array|string $properties: A property array or property string.
  • boolean $merge: Indicates if properties should be merged with existing ones.
setTag (line 562)

Setter method for the tag class var.

  • access: public
void setTag (string $tag)
  • string $tag: The tag to use for this element.
setToken (line 553)

Setter method for the token class var.

  • access: public
void setToken (string $token)
  • string $token: The token to use for this element tag.

Documentation generated on Fri, 17 Jun 2011 10:03:43 -0600 by phpDocumentor 1.4.3