1 | <?php |
||
36 | class Run { |
||
37 | /** |
||
38 | * @var Hamle Current HAMLE instance |
||
39 | */ |
||
40 | static protected $hamle; |
||
41 | static protected $hamleList = array(); |
||
42 | |||
43 | /** |
||
44 | * Add a hamle instance to the stack |
||
45 | * @param Hamle $hamle Hamle Instance |
||
46 | */ |
||
47 | static function addInstance(Hamle $hamle) { |
||
51 | |||
52 | /** |
||
53 | * Remove hamle Instance from the stack |
||
54 | */ |
||
55 | static function popInstance() { |
||
62 | |||
63 | /** |
||
64 | * Execute a hamle String Filter |
||
65 | * @param string $name Name of Filter |
||
66 | * @param string $data Data to pass to filter |
||
67 | * @return string Fitlered data |
||
68 | */ |
||
69 | static function filter($name, $data) { |
||
72 | |||
73 | /** |
||
74 | * Helper for hamle |include command |
||
75 | * @param string $path Path to file to include |
||
76 | * @return string HTML Code |
||
77 | */ |
||
78 | static function includeFile($path) { |
||
81 | |||
82 | /** |
||
83 | * @param $fragment Name of fragment |
||
84 | * @internal Only for use in template system |
||
85 | * @return string String to output where |include #fragment was called |
||
86 | */ |
||
87 | static function includeFragment($fragment) { |
||
90 | |||
91 | /** |
||
92 | * Called from template by $() to find a specific model |
||
93 | * @param array[] $typeTags array of tags with types as key eg ['page'=>[]] or ['product'=>['featured]] |
||
94 | * @param array $sort |
||
95 | * @param int $limit Results Limit |
||
96 | * @param int $offset Offset Results by |
||
97 | * @internal param string $sortBy Field name to sort by |
||
98 | * @return Model |
||
99 | */ |
||
100 | static function modelTypeTags($typeTags, $sort = [], $limit = 0, $offset = 0) { |
||
104 | |||
105 | /** |
||
106 | * Called from template by $() to find a specific model |
||
107 | * @param string $id id to search for |
||
108 | * @param array $sort |
||
109 | * @param int $limit Limit of results |
||
110 | * @param int $offset Results Offset |
||
111 | * @throws RunTime |
||
112 | * @return Model |
||
113 | */ |
||
114 | static function modelId($id, $sort = [], $limit = 0, $offset = 0) { |
||
119 | |||
120 | /** |
||
121 | * Called from template by $() to find a specific model |
||
122 | * @param array[] $typeId Array of types mapped to ids [type1=>[1],type2=>[2]] |
||
123 | * @param int $sortDir Sort Direction defined by hamle::SORT_* |
||
124 | * @param string $sortField Field name to sort by |
||
125 | * @param int $limit Results Limit |
||
126 | * @param int $offset Results Offset |
||
127 | * @internal param string $type type to filter by |
||
128 | * @internal param string $id id to search for |
||
129 | * @return Model |
||
130 | */ |
||
131 | static function modelTypeId($typeId, $sort = [], $limit = 0, $offset = 0) { |
||
134 | |||
135 | |||
136 | } |
||
137 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.