-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.php
74 lines (61 loc) · 1.89 KB
/
init.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
require_once(__DIR__.DELIMITER_DIR.'/jqueryphpmanager.php');
require_once(__DIR__.'/abstracts/selector/CssSelectorConverter.php');
use Symfony\Component\CssSelector\CssSelectorConverter as CssSelector;
CssSelector::autoload();
JqueryBoxManager::autoload();
$backtrace = debug_backtrace();
$namespaceTokens = isset($backtrace[2]) ? $backtrace[2] : NULL ;
if(isset($namespaceTokens['class'])){
JqueryBoxManager::setNamespace('Loader_'.$namespaceTokens['line'].'_'.$namespaceTokens['class']);
}
self::$classes[self::$caller] = new JqueryBoxManager;
if(!defined('jqmdoc')){
define('jqmdoc','jqueryphp_abstracts_document');
}
if(!defined('jqmel')){
define('jqmel','jqueryphp_abstracts_element');
}
if(!defined('jqmnull')){
define('jqmnull','jqueryphp_abstracts_prevObject');
}
if(!defined('jqmlist')){
define('jqmlist','jqueryphp_abstracts_nodelist');
}
if(!defined('jqmwin')){
define('jqmwin','jqueryphp_abstracts_window');
}
if(!function_exists('jqm')){
function jqm($input,$parent='*'){
if(empty($input))return false;
if(empty($parent))return false;
$doc = new JqueryBoxManager;
return $doc->load($input,$parent);
}
}
if(!function_exists('jqm_ready')){
function jqm_ready($callback){
jQueryBoxManager::ready($callback);
}
}
if(!function_exists('jqm_window')){
function jqm_window($q=NULL,$qtype=NULL,$callback,$data){
return jQueryBoxManager::window($q,$qtype,$callback,$data);
}
}
if(!function_exists('jqm_var')){
function jqm_var($var,&$variable){
return jQueryBoxManager::setVar($var,$variable);
}
}
if(!function_exists('jqm_use')){
function jqm_use($var){
return jQueryBoxManager::getVar($var);
}
}
if(!function_exists('jq')){
function jq($query){
return jQueryBoxManager::document_ready_run($query);
}
}
?>