2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Abstract class for the I/O transformations plugins
8 if (! defined('PHPMYADMIN')) {
12 /* It extends the transformations plugin class */
13 require_once 'TransformationsPlugin.class.php';
16 * Provides a common interface that will have to be implemented
17 * by all of the Input/Output transformations plugins.
21 abstract class IOTransformationsPlugin
extends TransformationsPlugin
24 // specifies whether transformation was successful or not
25 protected $success = true;
27 // to store the error message in case of failed transformations
28 protected $error = '';
31 * Returns the html for input field to override default textarea.
32 * Note: Return empty string if default textarea is required.
34 * @param array $column column details
35 * @param int $row_id row number
36 * @param string $column_name_appendix the name attribute
37 * @param array $options transformation options
38 * @param string $value Current field value
39 * @param string $text_dir text direction
40 * @param int $tabindex tab index
41 * @param int $tabindex_for_value offset for the values tabindex
42 * @param int $idindex id index
44 * @return string the html for input field
46 public function getInputHtml(
47 $column, $row_id, $column_name_appendix, $options, $value, $text_dir,
48 $tabindex, $tabindex_for_value, $idindex
54 * Returns the array of scripts (filename) required for plugin
55 * initialization and handling
57 * @return array javascripts to be included
59 public function getScripts()
65 * Returns the error message
67 * @return string error
69 public function getError()
75 * Returns the success status
79 public function isSuccess()
81 return $this->success
;
85 * Resets the object properties
89 public function reset()
91 $this->success
= true;