1<?php
2/**
3 * Definition of Interface iElementCSSMatchable
4 *
5 * The goal of the interface is to define functions which
6 * are required by the CSS import helper plugin (class
7 * helper_plugin_odt_cssimport, cssimport.php). To be more precise
8 * these functions are required by the class css_selector to do the
9 * matching with a given element.
10 *
11 * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
12 * @author     LarsDW223
13 */
14
15/**
16 * Interface iElementCSSMatchable
17 *
18 * To prevent clashes with other interfaces function names all functions
19 * are prefixed with iECSSM_.
20 *
21 * @package CSS\iElementCSSMatchable
22 */
23interface iElementCSSMatchable
24{
25    // Return the element's name as string.
26    public function iECSSM_getName();
27
28    // Return the element's attribute's as an array with
29    // key-value pairs:
30    // key = attribute-name,
31    // value = attribute-value (without '"');
32    public function iECSSM_getAttributes();
33
34    // Return the element's parent.
35    public function iECSSM_getParent();
36
37    // Return the element's immediately preceding sibling
38    public function iECSSM_getPrecedingSibling();
39
40    // Does the element belong to the given pseudo class?
41    // (e.g. 'visited', 'first-child')
42    public function iECSSM_has_pseudo_class($class);
43
44    // Does the element belong to the given pseudo element?
45    // (e.g. 'first-letter', 'before')
46    public function iECSSM_has_pseudo_element($element);
47}
48