XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
GroupsTag.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 
11 class GroupsTag
12 {
13 
18  var $groups;
19 
25  function __construct($xml_groups)
26  {
27  $this->groups = array();
28 
29  if($xml_groups)
30  {
31  if(!is_array($xml_groups))
32  {
33  $xml_groups = array($xml_groups);
34  }
35 
36  $dbParser = &DB::getParser();
37  for($i = 0; $i < count($xml_groups); $i++)
38  {
39  $group = $xml_groups[$i];
40  $column = trim($group->attrs->column);
41  if(!$column)
42  {
43  continue;
44  }
45 
46  $column = $dbParser->parseExpression($column);
47  $this->groups[] = $column;
48  }
49  }
50  }
51 
52  function toString()
53  {
54  $output = 'array(' . PHP_EOL;
55  foreach($this->groups as $group)
56  {
57  $output .= "'" . $group . "' ,";
58  }
59  $output = substr($output, 0, -1);
60  $output .= ')';
61  return $output;
62  }
63 
64 }
65 /* End of file GroupsTag.class.php */
66 /* Location: ./classes/xml/xmlquery/tags/group/GroupsTag.class.php */
__construct($xml_groups)
$output
Definition: ko.install.php:193
getParser($force=FALSE)
Definition: DB.class.php:1345