Filter
[ class tree: Filter ] [ index: Filter ] [ all elements ]

Class: Formagic_Filter_Replace

Source Location: /Filter/Replace.php

Class Overview


Accepts a key-value array of replacements, the key beeing the value to be replaced, the value beeing the replacement.


Author(s):

  • Florian Sonnenburg

Version:

  • $Id: Replace.php 126 2011-05-18 18:41:58Z meweasle $

Copyright:

  • Copyright (c) 2009 Florian Sonnenburg

Implements interfaces:

Variables

Methods



Class Details

[line 37]
Accepts a key-value array of replacements, the key beeing the value to be replaced, the value beeing the replacement.



Tags:

author:  Florian Sonnenburg
version:  $Id: Replace.php 126 2011-05-18 18:41:58Z meweasle $
copyright:  Copyright (c) 2009 Florian Sonnenburg


[ Top ]


Class Variables

$_replacements =

[line 44]

Array containing the replacements



Tags:

access:  protected

Type:   array


[ Top ]



Class Methods


constructor __construct [line 51]

Formagic_Filter_Replace __construct( $replacements)

Constructor



Tags:

access:  public


Parameters:

array   $replacements   Find-Replace-Array

[ Top ]

method filter [line 64]

mixed filter( mixed $value)

Replaces strings according to the replacements array.

Uses the PHP function strtr() for replacing.




Tags:

return:  The filtered value
access:  public



Implementation of:
Formagic_Filter_Interface::filter()
Filter implementation.

Parameters:

mixed   $value   The vaue to be filtered

[ Top ]


Documentation generated on Sun, 22 May 2011 22:40:21 +0200 by phpDocumentor 1.4.3