1: <?php
2: namespace Sphp\kit {
3: class JSServer {
4: public $json = null;
5: public $ajaxrender = false;
6: public $jsonready = false;
7: public $jsonplain = false;
8: /**
9: * Advance function
10: */
11: public function init() {}
12: /**
13: * Enable ajax JS library.
14: */
15: public function getAJAX() {}
16: /**
17: * Read json data from browser post key
18: * @param string $post_data_key
19: * @return json
20: */
21: public function getJSON($post_data_key) {}
22: /**
23: * Advance function to enable JSON response
24: */
25: public function startJSONOutput() {}
26: /**
27: * Advance function
28: */
29: public function sendData($data, $contenttype = "") {}
30: /**
31: * Send string to browser and display in html tag with an $tagid
32: * @param string $tagid <p>
33: * HTML Tag ID where to set html
34: * </p>
35: * @param string $dataar
36: */
37: public function addJSONHTMLBlock($tagid, $dataar) {}
38: /**
39: * Advance Function
40: * Send and Data type to browser
41: * @param string $sact <p>
42: * it may be and process order wise:- jss,js1,html,js,jsp,jsf
43: * </p>
44: * @param type $evtp <p>
45: * It is a key of value like in $sact=html then it is a tag id.
46: * If $sact=jsf then it will be JS function name
47: * </p>
48: * @param mixed $dataar <p>
49: * data need to send browser
50: * </p>
51: */
52: public function addJSONBlock($sact, $evtp, $dataar) {}
53: /**
54: * Call JS Function from Server
55: * @param string $jsfun
56: * @param mixed $dataa
57: */
58: public function callJsFunction($jsfun, $dataa) {}
59: /**
60: * Send Control object inside a HTML Tag
61: * @param \Sphp\tools\Control $obj
62: * @param string $outid <p>
63: * HTML Tag id where to display html of Control
64: * </p>
65: * @param boolean $innerHTML Optional <p>
66: * Default = false:- Not send Inner Controls
67: * true:- mean send all Inner Controls also
68: * </p>
69: */
70: public function addJSONComp($obj, $outid = "outid", $innerHTML = false) {}
71: /**
72: * Send only Inner Controls of Object
73: * @param \Sphp\tools\Control $obj
74: * @param string $outid
75: */
76: public function addJSONCompChildren($obj, $outid = "outid") {}
77: /**
78: * Get Control HTML Output
79: * @param \Sphp\tools\Control $obj
80: * @return string
81: */
82: public function getJSONComp($obj) {}
83: /**
84: * Send TempFile Object to HTML Tag id
85: * @param \Sphp\tools\TempFile $tempobj
86: * @param string $outid <p>
87: * HTML Tag ID where to display HTML of temfile object
88: * </p>
89: */
90: public function addJSONTemp($tempobj, $outid = "outid") {}
91: /**
92: * Send TempFile Object with all file links to HTML Tag id
93: * @param \Sphp\tools\TempFile $tempobj
94: * @param string $outid <p>
95: * HTML Tag ID where to display HTML of temfile object
96: * </p>
97: */
98: public function addJSONTempFull($tempobj, $outid = "outid") {}
99: /**
100: * Send Data as inter process communication
101: * @param string $aname
102: * @param array $structure
103: */
104: public function addJSONIpcBlock($aname, $structure) {}
105: /**
106: * Advance Function *
107: * @param string $type <p>
108: * default is jsonweb. You can create your own custom type also.
109: * </p>
110: */
111: public function setBlockType($type = "jsonweb") {}
112: /**
113: * Send JS Code to browser
114: * @param string $jsdata <p>
115: * JS code as string, send to browser.
116: * </p>
117: * @param string $type <p>
118: * value may be order wise :- jss, jsfl, js, jsp or jsf
119: * jss has highest priority
120: * </p>
121: */
122: public function addJSONJSBlock($jsdata = "", $type = "jsp") {}
123: /**
124: * Send data to getAJAX callback function.
125: * getAJAX('index-test.html',{},true,function(ret){
126: * console.log('server return data' + ret);
127: * });
128: * @param array|string $data
129: */
130: public function addJSONReturnBlock($data) {}
131: /**
132: * Advance Function
133: * Return all response of Server as JSON
134: * @return string
135: */
136: public function getResponse() {}
137: /**
138: * Advance Function
139: * Send all response of Server as JSON to browser.
140: * if application run continiously then you can send intermediate data
141: *
142: */
143: public function flush() {}
144: public function callServer($jsfun, $url, $imgid = "''") {}
145: public function postServer($url, $data = "{}", $imgid = "''", $cache = false, $dataType = "'json'") {}
146: }
147: /**
148: * Description of JQuery
149: *
150: * @author Sartaj Singh
151: */
152: class JQuery {
153: public $jq = null;
154: public function setJSFunctionName($jsfun, $funtype = false) {}
155: public function stripQuot($val) {}
156: public function safeJSString($val) {}
157: public function stripNewLineChar($val) {}
158: public function getJSString($val) {}
159: public function log($msg) {}
160: public function info($msg) {}
161: public function warn($msg) {}
162: public function error($msg) {}
163: public function setEventHandler() {}
164: public function fetchQuery($sql, $timesec = 0) {}
165: public function ajax($fun, $url, $data = "''", $cache = false) {}
166: public function StartTimeLine($aname) {}
167: public function addTimeLineCMD($aname, $at_time, $val) {}
168: public function fun() {}
169: public function funseq() {}
170: public function funargs() {}
171: public function runTimeLine($aname) {}
172: public function Queue($aname) {}
173: public function addQueue($aname, $val) {}
174: public function addFade($id) {}
175: public function addExplode($id) {}
176: public function addBounce($id) {}
177: public function getJQKit() {}
178: public function pngFix() {}
179: public function stringtoargu($strpara) {}
180: public function stringtophpargu($strpara) {}
181: public function phpstring($str) {}
182: }
183: }
184: