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

Class: Application_TextConverter

Source Location: /application_classes/textconverter.class.php

Class Overview




Variables

Methods



Class Details

[line 38]


[ Top ]


Class Variables

static $instance =  null

[line 45]

Singleton



Tags:

access:  public

Type:   object


[ Top ]

$base =  null

[line 52]

Reference to base class



Tags:

access:  public

Type:   object


[ Top ]

$_text_converter_list =  null

[line 59]

Text converter list for forms



Tags:

access:  protected

Type:   array


[ Top ]



Class Methods


constructor __construct [line 66]

Application_TextConverter __construct( )

Start instance of base class, load configuration and establish database connection. Please don't call the constructor direcly, use the singleton pattern instead.



Tags:

access:  public


[ Top ]

method addTextConverter [line 92]

int addTextConverter( array $sqlData)

Adds text converter to the text converter table. Takes a field=>value array with text converter data as first argument. Returns insert id.



Tags:

return:  Insert id
throws:  Application_TextConverterException
access:  public


Parameters:

array   $sqlData   Row data

[ Top ]

method applyTextConverter [line 608]

string applyTextConverter( int $id, string $text)

Applies text converter to the given text. Takes the text converter id as first argument, the string with the text to convert as second argument. Returns converted string.



Tags:

return:  Converted text
throws:  Application_TextConverterException
access:  public


Parameters:

int   $id   Text converter id
string   $text   Text to convert

[ Top ]

method countTextConverters [line 342]

array countTextConverters( [array $params = array()])

Method to count the existing text converters. Takes key=>value array with count params as first argument. Returns array.

List of supported params:

No params supported.




Tags:

throws:  Application_TextConverterException
access:  public


Parameters:

array   $params   Count params

[ Top ]

method deleteTextConverter [line 172]

int deleteTextConverter( int $id)

Removes text converter from the text converters table. Takes the text converter id as first argument. Returns amount of affected rows.



Tags:

return:  Amount of affected rows
throws:  Application_TextConverterException
access:  public


Parameters:

int   $id   Text converter id

[ Top ]

method getTextConverterListForForm [line 732]

array getTextConverterListForForm( )

Returns list of text converters for usage in quickform selects.



Tags:

access:  public


[ Top ]

method insertCallback [line 687]

string insertCallback( int $id, string $callback, array $args)

Provides interface between media manager and insert callbacks provided by the text converter plugins. Is required to insert media objects into the pages using the text converter specific syntax.

Takes the text converter id as first argument, the name of the callback function (without the prefix mmInsert) as second argument and the arguments for the callback function in an array as third argument. Returns string.




Tags:

throws:  Application_TextConverterException
access:  public


Parameters:

int   $id   Text converter id
string   $callback   Callback name
array   $args   Callback args

[ Top ]

method selectDefaultTextConverter [line 391]

array selectDefaultTextConverter( )

Selects default text converter. Returns array with the complete text converter information.



Tags:

throws:  Application_TextConverterException
access:  public


[ Top ]

method selectTextConverter [line 210]

array selectTextConverter( int $id)

Selects one text converter. Takes the text converter id as first argument. Returns array with text converter information.



Tags:

throws:  Application_TextConverterException
access:  public


Parameters:

int   $id   Text converter id

[ Top ]

method selectTextConverters [line 268]

array selectTextConverters( [array $params = array()])

Method to select one or more text converters. Takes key=>value array with select params as first argument. Returns array.

List of supported params:

  • start, int, optional: row offset
  • limit, int, optional: amount of rows to return




Tags:

throws:  Application_TextConverterException
access:  public


Parameters:

array   $params   Select params

[ Top ]

method setDefaultTextConverter [line 438]

int setDefaultTextConverter( int $textconverter)

Sets the default text converter to given converter id. Takes the converter id as first argument. Returns amount of affected rows.



Tags:

return:  Affected rows
throws:  Application_TextConverterException
access:  public


Parameters:

int   $textconverter   Text converter id

[ Top ]

method testForUniqueInternalName [line 548]

bool testForUniqueInternalName( string $name, [int $id = null])

Tests given text converter internal name for uniqueness. Takes the text converter internal name as first argument and an optional text converter id as second argument. If the text converter id is given, this text converter won't be considered when checking for uniqueness (useful for updates).

Returns boolean true if text converter name is unique.




Tags:

throws:  Application_TextConverterException
access:  public


Parameters:

string   $name   Text converter internal name
int   $id   Text converter id

[ Top ]

method testForUniqueName [line 486]

bool testForUniqueName( string $name, [int $id = null])

Tests given text converter name for uniqueness. Takes the text converter name as first argument and an optional text converter id as second argument.

If the text converter id is given, this text converter won't be considered when checking for uniqueness (useful for updates). Returns boolean true if text converter name is unique.




Tags:

throws:  Application_TextConverterException
access:  public


Parameters:

string   $name   Text converter name
int   $id   Text converter id

[ Top ]

method textConverterBelongsToCurrentProject [line 761]

int textConverterBelongsToCurrentProject( int $text_converter)

Tests whether given text converter belongs to current project. Takes the text converter id as first argument. Returns bool.



Tags:

return:  bool
throws:  Application_TextConverterException
access:  public


Parameters:

int   $text_converter   Text converter id

[ Top ]

method textConverterBelongsToCurrentUser [line 807]

bool textConverterBelongsToCurrentUser( int $text_converter)

Test whether text converter belongs to current user or not. Takes the text converter id as first argument. Returns bool.



Tags:

throws:  Application_TextConverterException
access:  public


Parameters:

int   $text_converter   Text converter id

[ Top ]

method updateTextConverter [line 129]

int updateTextConverter( int $id, array $sqlData)

Updates text converter. Takes the text converter id as first argument, a field=>value array with the new text converter data as second argument.

Returns amount of affected rows.




Tags:

return:  Affected rows
throws:  Application_TextConverterException
access:  public


Parameters:

int   $id   Text converter id
array   $sqlData   Row data

[ Top ]


Documentation generated on Sun, 08 Jan 2012 17:52:05 +0100 by phpDocumentor 1.4.3