XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
JoinTable.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 
12 class JoinTable extends Table
13 {
14 
20 
26 
36  {
37  parent::__construct($name, $alias);
38  $this->join_type = $join_type;
39  $this->conditions = $conditions;
40  }
41 
42  function toString($with_value = true)
43  {
44  $part = $this->join_type . ' ' . $this->name;
45  $part .= $this->alias ? ' as ' . $this->alias : '';
46  $part .= ' on ';
47  foreach($this->conditions as $conditionGroup)
48  {
49  $part .= $conditionGroup->toString($with_value);
50  }
51  return $part;
52  }
53 
54  function isJoinTable()
55  {
56  return true;
57  }
58 
59  function getArguments()
60  {
61  $args = array();
62  foreach($this->conditions as $conditionGroup)
63  {
64  $args = array_merge($args, $conditionGroup->getArguments());
65  }
66  return $args;
67  }
68 
69 }
70 /* End of file JoinTable.class.php */
71 /* Location: ./classes/db/queryparts/table/JoinTable.class.php */
__construct($name, $alias, $join_type, $conditions)
$args
Definition: ko.install.php:185
toString($with_value=true)