1: | <?php |
2: | namespace Sphp\tools { |
3: | /** |
4: | * Description of TempFile |
5: | * |
6: | * @author Sartaj Singh |
7: | */ |
8: | class TempFile { |
9: | public $data = ""; |
10: | public $filePath = ""; |
11: | public $fileDir = ""; |
12: | public $compList = array(); |
13: | public $name = ""; |
14: | public $webapp = null; |
15: | public $parentapp = null; |
16: | public $metadata = array(); |
17: | public $blncodebehind = false; |
18: | public $blncodefront = false; |
19: | public $blnshowFront = true; |
20: | public $webapppath = ""; |
21: | public $sjspath = ""; |
22: | public $appname = ""; |
23: | public $appfilepath = ""; |
24: | public $HTMLParser = null; |
25: | public $tempFileTag = ""; |
26: | public $tempFileTagE = ""; |
27: | public $prefixName = ""; |
28: | public $intPHPLevel = 3; |
29: | /** |
30: | * Advance Function |
31: | * Set File Path of TempFile |
32: | * @param string $filePath |
33: | */ |
34: | public function setFilePath($filePath) {} |
35: | /** |
36: | * Advance Function |
37: | * Bind with back-end type Application or front-end type application. |
38: | * Remember BasicApp is front-end application type which |
39: | * can manage more then one temp file or run without any temp file like in case of API. |
40: | * Back-end application like WebApp always requires TempFile |
41: | * for run. Like PSP Application is a back-end application type. |
42: | * @param \Sphp\tools\WebApp $webapp |
43: | */ |
44: | public function setWebapp($webapp) {} |
45: | /** |
46: | * Advance Function |
47: | * Set bound application file path |
48: | * @param string $webapppath |
49: | */ |
50: | public function setWebapppath($webapppath) {} |
51: | /** |
52: | * Advance Function |
53: | * Set TempFile can bind with back-end application type |
54: | * @param boolean $blncodebehind True mean, bound with back-end application |
55: | */ |
56: | public function setBlncodebehind($blncodebehind) {} |
57: | /** |
58: | * Advance Function |
59: | * Set TempFile can bind with front-end application type |
60: | * @param boolean $blncodebehind True mean, bound with back-end application |
61: | */ |
62: | public function setBlncodefront($blncodefront) {} |
63: | /** |
64: | * Advance Function |
65: | * Set Parent App Name |
66: | * @param string $appname |
67: | */ |
68: | public function setAppname($appname) {} |
69: | /** |
70: | * Advance Function |
71: | * Add component object in TempFile |
72: | * @param string $key component name or id in HTML code |
73: | * @param \Sphp\tools\Control $obj |
74: | */ |
75: | public function setComponent($key, $obj) {} |
76: | /** |
77: | * Add TempFile as JS Variable to store the JS Objects of components. |
78: | * name of tempfile is used as variable name in JS |
79: | */ |
80: | public function addAsJSVar() {} |
81: | /** |
82: | * Advance Function |
83: | * Register TempFile with SphpApi |
84: | */ |
85: | public function registerTempFile() {} |
86: | /** |
87: | * |
88: | * Advance Function |
89: | * @param string $TempFilePath File path of TempFile Or Direct code as string |
90: | * @param boolean $blnStringData Optional Default=false, If true then $TempFilePath= string code |
91: | * @param \Sphp\tools\BasicApp $backfileobj Optional Default=null, bind application with TempFile |
92: | * @param string $use_sjs_file Optional Default=false true mean use sjs file bind with temp file |
93: | * @param \Sphp\tools\BasicApp $parentappobj Optional Default=null, Parent App of TempFile |
94: | */ |
95: | public function getFile($TempFilePath, $blnStringData = false, $backfileobj = null, $use_sjs_file = false, $parentappobj = null) {} |
96: | /** |
97: | * Advance Function |
98: | * App Event handler trigger by application. |
99: | */ |
100: | public function onAppEvent() {} |
101: | /** |
102: | * Advance Function |
103: | * Process TempFile |
104: | * also run and render back-end application if any |
105: | */ |
106: | public function run() {} |
107: | /** |
108: | * Advance Function |
109: | * echo TempFile data |
110: | */ |
111: | public function render() {} |
112: | /** |
113: | * Advance Function |
114: | * Process TempFile |
115: | */ |
116: | public function runit() {} |
117: | /** |
118: | * Advance Function |
119: | * echo TempFile data |
120: | */ |
121: | public function renderit() {} |
122: | /** |
123: | * Get Generated HTML data. Data available after run. This function help-full if you are not using render |
124: | * @return string |
125: | */ |
126: | public function getData() {} |
127: | /** |
128: | * File Path of TempFile |
129: | * @return string |
130: | */ |
131: | public function getFilePath() {} |
132: | /** |
133: | * Get Name(id) of temp file |
134: | * @return string |
135: | */ |
136: | public function getName() {} |
137: | /** |
138: | * Get Parent App or Bind App with temp file. It return bound app if TempFile bound with app |
139: | * @return \Sphp\tools\BasicApp |
140: | */ |
141: | public function getBindApp() {} |
142: | /** |
143: | * Get Application that is bound with temp file |
144: | * @return \Sphp\tools\WebApp |
145: | */ |
146: | public function getWebapp() {} |
147: | /** |
148: | * Get App Path which is bound with this temp file |
149: | * @return string |
150: | */ |
151: | public function getWebapppath() {} |
152: | /** |
153: | * Get SJS File Path which is bound with this temp file |
154: | * @return string |
155: | */ |
156: | public function getSjspath() {} |
157: | /** |
158: | * Get Parent App Name |
159: | * @return string |
160: | */ |
161: | public function getAppname() {} |
162: | /** |
163: | * Disable PHP execution set $intPHPLevel=0, Default it is on 3. |
164: | * Enable php execution in temp file. 0= no php execution, |
165: | * 1 = only controls attribute, |
166: | * 2 = php in all tags, 3 = all tags + pass global variables |
167: | */ |
168: | public function disablePHP($level=0) {} |
169: | /** |
170: | * Set SJS file path |
171: | * @param string $webapppath |
172: | */ |
173: | public function setSjspath($sjspath) {} |
174: | /** |
175: | * Enable rendering for temp file |
176: | * @param boolean $blnshowFront |
177: | */ |
178: | public function setBlnshowFront($blnshowFront) {} |
179: | /** |
180: | * Check if TempFile can render |
181: | * @return boolean |
182: | */ |
183: | public function getBlnshowFront() {} |
184: | /** |
185: | * Check if TempFile is bound with any front-end application type |
186: | * @return boolean |
187: | */ |
188: | public function getBlncodefront() {} |
189: | /** |
190: | * Check if TempFile is bound with any back-end application type |
191: | * @return boolean |
192: | */ |
193: | public function getBlncodebehind() {} |
194: | /** |
195: | * |
196: | * @param string $TempFilePath File path of TempFile Or Direct code as string |
197: | * @param boolean $blnStringData Optional Default=false, If true then $TempFilePath= string code |
198: | * @param \Sphp\tools\BasicApp $backfileobj Optional Default=null, bind application with TempFile |
199: | * @param \Sphp\tools\BasicApp $parentappobj Optional Default=null, Parent App of TempFile |
200: | * @param boolean $dhtml Optional Default=false, if true then use different template engine |
201: | * @param string $prefixNameadd Optional Default='', prefix for component id |
202: | */ |
203: | /** |
204: | * Add Meta Data attached to TempFile |
205: | * @param string $key |
206: | * @param string|array $value |
207: | */ |
208: | public function addMetaData($key, $value) {} |
209: | /** |
210: | * Read Meta Data attached with TempFile |
211: | * @param string $key |
212: | * @return string|array |
213: | */ |
214: | public function getMetaData($key) {} |
215: | /** |
216: | * Get Component Object |
217: | * @param string $name |
218: | * @return \Sphp\tools\Control |
219: | */ |
220: | /** |
221: | * Check if Component Exist in TempFile |
222: | * @param string $key component name or id in HTML code |
223: | * @return boolean |
224: | */ |
225: | public function isComponent($key) {} |
226: | /** |
227: | * Get Component |
228: | * @param string $key component name or id in HTML code |
229: | * @return \Sphp\tools\Control |
230: | */ |
231: | public function getComponent($key) {} |
232: | /** |
233: | * Get Component if exist |
234: | * @param string $key component name or id in HTML code |
235: | * @return \Sphp\tools\Control|null |
236: | */ |
237: | public function getComponentSafe($key) {} |
238: | /** |
239: | * Generate HTML for Component Object |
240: | * $tempobj = new Sphp\tools\TempFile("apps/forms/temp1.front"); |
241: | * $div1 = $tempobj->getComponent('div1'); |
242: | * echo $tempobj->parseComponent($div1); |
243: | * @param \Sphp\tools\Control $obj |
244: | * @param boolean $innerHTML Optional Default=false, |
245: | * if true then it will not generate component tag in html |
246: | * @return string |
247: | */ |
248: | public function parseComponent($obj,$innerHTML = false) {} |
249: | /** |
250: | * Wrap All Children of Component as Node Object. |
251: | * $tempobj = new Sphp\tools\TempFile("apps/forms/temp1.front"); |
252: | * $div1 = $tempobj->getComponent('div1'); |
253: | * $node1 = $tempobj->getChildrenWrapper($div1); |
254: | * echo $tempobj->parseComponentChildren($node1); |
255: | * @param \Sphp\tools\Control $obj |
256: | * @return Sphp\tools\NodeTag |
257: | */ |
258: | public function getChildrenWrapper($compobj) {} |
259: | /** |
260: | * Generate HTML for Component Children |
261: | * @param \Sphp\tools\NodeTag $obj |
262: | * @return string |
263: | */ |
264: | public function parseComponentChildren($obj) {} |
265: | } |
266: | class TempFileChild extends TempFile { |
267: | } |
268: | class TempFileComp extends TempFile { |
269: | } |
270: | } |
271: |