XpressEngine Core
1.11.2
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Pages
classes
xml
xmlquery
tags
navigation
NavigationTag.class.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (C) NAVER <http://www.navercorp.com> */
3
11
class
NavigationTag
12
{
13
18
var
$order
;
19
24
var
$list_count
;
25
30
var
$page_count
;
31
36
var
$page
;
37
42
var
$limit
;
43
49
function
__construct
($xml_navigation)
50
{
51
$this->order = array();
52
if
($xml_navigation)
53
{
54
$order
= $xml_navigation->index;
55
if
(
$order
)
56
{
57
if
(!is_array(
$order
))
58
{
59
$order
= array(
$order
);
60
}
61
foreach
(
$order
as $order_info)
62
{
63
$this->order[] =
new
IndexTag
($order_info);
64
}
65
66
if
($xml_navigation->page && $xml_navigation->page->attrs || $xml_navigation->list_count && $xml_navigation->list_count->attrs)
67
{
68
$this->limit =
new
LimitTag
($xml_navigation);
69
}
70
71
if
($xml_navigation->list_count)
72
{
73
$this->list_count = $xml_navigation->list_count->attrs;
74
}
75
76
if
($xml_navigation->page_count)
77
{
78
$this->page_count = $xml_navigation->page_count->attrs;
79
}
80
81
if
($xml_navigation->page)
82
{
83
$this->
page
= $xml_navigation->page->attrs;
84
}
85
}
86
}
87
}
88
93
function
getOrderByString
()
94
{
95
$output
=
'array('
. PHP_EOL;
96
foreach
($this->order as
$order
)
97
{
98
$output
.= $order->toString() . PHP_EOL .
','
;
99
}
100
$output
= substr(
$output
, 0, -1);
101
$output
.=
')'
;
102
return
$output
;
103
}
104
109
function
getLimitString
()
110
{
111
if
($this->limit)
112
{
113
return
$this->limit->toString();
114
}
115
else
116
{
117
return
""
;
118
}
119
}
120
121
function
getArguments
()
122
{
123
$arguments = array();
124
foreach
($this->order as
$order
)
125
{
126
$arguments = array_merge($order->getArguments(), $arguments);
127
}
128
if
($this->limit)
129
{
130
$arguments = array_merge($this->limit->getArguments(), $arguments);
131
}
132
return
$arguments;
133
}
134
135
}
136
/* End of file NavigationTag.class.php */
137
/* Location: ./classes/xml/xmlquery/tags/navigation/NavigationTag.class.php */
$output
$output
Definition:
ko.install.php:193
NavigationTag\getArguments
getArguments()
Definition:
NavigationTag.class.php:121
page
high class of the module page
Definition:
page.class.php:8
NavigationTag\getLimitString
getLimitString()
Definition:
NavigationTag.class.php:109
NavigationTag\__construct
__construct($xml_navigation)
Definition:
NavigationTag.class.php:49
LimitTag
Definition:
LimitTag.class.php:11
NavigationTag\$order
$order
Definition:
NavigationTag.class.php:18
NavigationTag\$page
$page
Definition:
NavigationTag.class.php:36
NavigationTag\$page_count
$page_count
Definition:
NavigationTag.class.php:30
NavigationTag
Definition:
NavigationTag.class.php:11
IndexTag
Definition:
IndexTag.class.php:11
NavigationTag\$list_count
$list_count
Definition:
NavigationTag.class.php:24
NavigationTag\getOrderByString
getOrderByString()
Definition:
NavigationTag.class.php:93
NavigationTag\$limit
$limit
Definition:
NavigationTag.class.php:42
Generated on Tue Dec 18 2018 17:04:25 for XpressEngine Core by
1.8.5