Gumbo_Converter

Gumbo_Factory
   |
   --Gumbo_Converter

Converter Class

This class is responsible for loading the appropriate Converter object. The name given must be a Gumbo_Interface_Converter, otherwise the returned value will be the Blank Converter. The Blank Converter simply returns the data given. If the name given is not a class, the Factory will attempt to search for a Gumbo_Converter_* class. Since the Factory will always return a Converter object, the information can be gathered as:

 $data = $fact->factory ("Array", ... )->convert ($data_array, "composite");

Author(s): Michael Luster <mluster79@yahoo.com>
License:New BSD License
Copyright:Copyright (c) 2007, iBayou, Michael Luster
Link:http://sourceforge.net/projects/phpgumbo
Version:0.0.1

Inherited Methods

Class Methods

public static string addslashes ( string $txt ) [line 144]

Adds slashes to the string

Parameter(s):

  • (string) $txt

[ Top ]
public static string br2nl ( string $txt, [string $eol] ) [line 106]

Converts HTML line breaks into new line characters

Parameter(s):

  • (string) $txt
  • (string) $eol :: End of Line characters (default PHP_EOL)

[ Top ]
public static string htmldecode ( string $txt, [int $quote_style], [string $charset] ) [line 132]

Converts the HTML entities, including single-double quotes, into a characters

Parameter(s):

  • (string) $txt
  • (int) $quote_style :: ENT_COMPAT, ENT_QUOTES, ENT_NOQUOTES
  • (string) $charset :: character set

[ Top ]
public static string htmlencode ( string $txt, [int $quote_style], [string $charset] ) [line 120]

Converts the characters into HTML entities, including single-double quotes

Parameter(s):

  • (string) $txt
  • (int) $quote_style :: ENT_COMPAT, ENT_QUOTES, ENT_NOQUOTES
  • (string) $charset :: character set

[ Top ]
public static string nl2br ( string $txt ) [line 95]

Converts new line characters into HTML line breaks

Parameter(s):

  • (string) $txt
  • uses:  Gumbo_Converter_Factory

[ Top ]
public static string stripslashes ( string $txt ) [line 154]

Strips slashes to the string

Parameter(s):

  • (string) $txt

[ Top ]
public Gumbo_Interface_Converter factory ( [string|int $name], [mixed $args] ) [line 57]

Returns an instantiated object (accept Constructor arguments)

Parameter(s):

  • (string|int) $name :: name of Class or key string
  • (mixed) $args :: additional arguments
Overrides
Gumbo_Factory::factory()

[ Top ]