123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- <?php
-
-
-
- require_once(dirname(__FILE__) . '/tag.php');
- require_once(dirname(__FILE__) . '/encoding.php');
-
-
-
- class SimpleByName {
- private $name;
-
-
-
- function __construct($name) {
- $this->name = $name;
- }
-
-
-
- function getName() {
- return $this->name;
- }
-
-
-
- function isMatch($widget) {
- return ($widget->getName() == $this->name);
- }
- }
-
-
- class SimpleByLabel {
- private $label;
-
-
-
- function __construct($label) {
- $this->label = $label;
- }
-
-
-
- function isMatch($widget) {
- if (! method_exists($widget, 'isLabel')) {
- return false;
- }
- return $widget->isLabel($this->label);
- }
- }
-
-
- class SimpleById {
- private $id;
-
-
-
- function __construct($id) {
- $this->id = $id;
- }
-
-
-
- function isMatch($widget) {
- return $widget->isId($this->id);
- }
- }
-
-
- class SimpleByLabelOrName {
- private $label;
-
-
-
- function __construct($label) {
- $this->label = $label;
- }
-
-
-
- function isMatch($widget) {
- if (method_exists($widget, 'isLabel')) {
- if ($widget->isLabel($this->label)) {
- return true;
- }
- }
- return ($widget->getName() == $this->label);
- }
- }
- ?>
|