MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
persistentoperand.class
Ir para a documentação deste ficheiro.
1<?php
3{
4 public $criteria;
5 public $operand;
6 public $type;
7
8 public function __construct($criteria, $operand)
9 {
10 $this->criteria = $criteria;
11 $this->operand = $operand;
12 }
13
14 public function getSql()
15 {
16 return '';
17 }
18
19 public function getSqlWhere()
20 {
21 return $this->getSql();
22 }
23}
24
26{
27 public function __construct($criteria, $operand)
28 {
29 parent::__construct($criteria, $operand);
30 $this->type = 'null';
31 }
32}
33
35{
36 public function __construct($criteria, $operand)
37 {
38 parent::__construct($criteria, $operand);
39 $this->type = 'value';
40 }
41
42 public function getSql()
43 {
44 return "$this->operand";
45 }
46}
47
49{
51 public $alias = '';
52
53 public function __construct($criteria, $operand, $name)
54 {
55 parent::__construct($criteria, $operand);
56 $this->type = 'attributemap';
57 if ($p = strpos($name,'.')) $this->alias = substr($name,0, $p);
58 $this->attributeMap = $operand;
59 }
60
61 public function getSql()
62 {
63 return $this->attributeMap->getColumnMap()->getColumnName($this->alias, FALSE);
64 }
65
66 public function getSqlOrder()
67 {
68 return $this->attributeMap->getColumnMap()->getFullyQualifiedName($this->alias);
69 }
70
71 public function getSqlWhere()
72 {
73 return $this->attributeMap->getColumnMap()->getColumnWhereName($this->alias);
74 }
75}
76
78{
79 public function __construct($criteria, $operand)
80 {
81 parent::__construct($criteria, $operand);
82 $this->type = 'array';
83 }
84
85 public function getSql()
86 {
87 $sql = "(";
88 $i = 0;
89 foreach($this->operand as $o)
90 {
91 $sql .= ($i++ > 0) ? ", " : "";
92 $sql .= "'$o'";
93 }
94 $sql .= ")";
95 return $sql;
96 }
97}
98
100{
102 {
103 parent::__construct($criteria, $operand);
104 $this->type = 'criteria';
105 }
106
107 public function getSql()
108 {
109 $sql = $this->operand->getSqlStatement();
110 $sql->SetDb($this->operand->getManager()->getConnection($this->operand->getClassMap()->getDatabase()));
111 return "(" . $sql->Select() . ")";
112 }
113}
114
116{
118 {
119 parent::__construct($criteria, $operand);
120 $this->type = 'object';
121 }
122
123 public function getSql()
124 {
125 return $this->operand->getSql();
126 }
127}
128
130{
131 public $argument;
133
135 {
136 parent::__construct($criteria, $operand);
137 $this->type = 'public function';
138 if (preg_match("/(?i)\‍(([^,]*)(.*)\‍)/", $this->operand, $matches) || strlen($this->operand) > 0)
139 {
140 $this->argument = $matches[1];
141 $this->argOperand = $criteria->getOperand($this->argument);
142 }
143 else
144 echo "error OperandFunction";
145 }
146
147 public function getSql()
148 {
149 return str_replace($this->argument,$this->argOperand->getSQL(), $this->operand);
150 }
151}
152?>
__construct($criteria, $operand)
__construct($criteria, $operand, $name)
__construct($criteria, $operand)
__construct($criteria, $operand)
__construct($criteria, $operand)
__construct($criteria, $operand)
__construct($criteria, $operand)
__construct($criteria, $operand)