diff options
Diffstat (limited to 'codebase/Dhtmlx/Connector/Event/EventInterface.php')
-rw-r--r-- | codebase/Dhtmlx/Connector/Event/EventInterface.php | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/codebase/Dhtmlx/Connector/Event/EventInterface.php b/codebase/Dhtmlx/Connector/Event/EventInterface.php new file mode 100644 index 0000000..645d89b --- /dev/null +++ b/codebase/Dhtmlx/Connector/Event/EventInterface.php @@ -0,0 +1,37 @@ +<?php +namespace DHTMLX\Connector\Event; + +class EventInterface{ + protected $request; ////!< DataRequestConfig instance + public $rules=array(); //!< array of sorting rules + + /*! constructor + creates a new interface based on existing request + @param request + DataRequestConfig object + */ + public function __construct($request){ + $this->request = $request; + } + + /*! remove all elements from collection + */ + public function clear(){ + array_splice($rules,0); + } + /*! get index by name + + @param name + name of field + @return + index of named field + */ + public function index($name){ + $len = sizeof($this->rules); + for ($i=0; $i < $len; $i++) { + if ($this->rules[$i]["name"]==$name) + return $i; + } + return false; + } +} |