root/trunk/src/main/php/net/stubbles/websites/stubPageElement.php

Revision 1231, 2.1 kB (checked in by mikey, 4 months ago)

continued refactoring #119: replaced package dots in net::stubbles::websites

Line 
1 <?php
2 /**
3  * Interface for a page element.s
4  *
5  * @author      Frank Kleine <mikey@stubbles.net>
6  * @package     stubbles
7  * @subpackage  websites
8  */
9 stubClassLoader::load('net::stubbles::ipo::request::stubRequest',
10                       'net::stubbles::ipo::session::stubSession',
11                       'net::stubbles::ipo::response::stubBaseResponse'
12 );
13 /**
14  * Interface for a page element.
15  *
16  * @package     stubbles
17  * @subpackage  websites
18  */
19 interface stubPageElement extends stubObject
20 {
21     /**
22      * set the name of the element
23      *
24      * @param  string  $name
25      */
26     public function setName($name);
27
28     /**
29      * returns the name of the element
30      *
31      * @return  string
32      */
33     public function getName();
34
35     /**
36      * returns a list of required class names
37      *
38      * @return  array<string>
39      */
40     public function getRequiredClassNames();
41
42     /**
43      * initializes the page element
44      *
45      * @param   stubRequest   $request   the request data
46      * @param   stubSession   $session   current session
47      * @param   stubResponse  $response  contains response data
48      * @param   array         $context   optional  additional context data
49      * @return  bool
50      */
51     public function init(stubRequest $request, stubSession $session, stubResponse $response, array $context = array());
52
53     /**
54      * checks whether the page element is available or not
55      *
56      * @return  bool
57      */
58     public function isAvailable();
59
60     /**
61      * checks whether page element is cachable or not
62      *
63      * @return  bool
64      */
65     public function isCachable();
66
67     /**
68      * returns a list of variables that have an influence on caching
69      *
70      * @return  array<string,scalar>
71      */
72     public function getCacheVars();
73
74     /**
75      * returns a list of files used to create the content
76      *
77      * @return  array<string>
78      */
79     public function getUsedFiles();
80
81     /**
82      * processes the page element
83      *
84      * Please note that an element should catch all exceptions and wrap them
85      * into the response!
86      *
87      * @return  mixed  content for page element
88      */
89     public function process();
90 }
91 ?>
Note: See TracBrowser for help on using the browser.