Browse Source

remove usage of deprecated ``type()`` method

antograssiot 10 years ago
parent
commit
d33aa5a768
2 changed files with 7 additions and 7 deletions
  1. 4 4
      src/Database/Query.php
  2. 3 3
      src/ORM/Behavior/TreeBehavior.php

+ 4 - 4
src/Database/Query.php

@@ -1430,11 +1430,11 @@ class Query implements ExpressionInterface, IteratorAggregate
     public function set($key, $value = null, $types = [])
     {
         if (empty($this->_parts['set'])) {
-            $this->_parts['set'] = $this->newExpr()->type(',');
+            $this->_parts['set'] = $this->newExpr()->tieWith(',');
         }
 
         if ($this->_parts['set']->isCallable($key)) {
-            $exp = $this->newExpr()->type(',');
+            $exp = $this->newExpr()->tieWith(',');
             $this->_parts['set']->add($key($exp));
             return $this;
         }
@@ -1811,11 +1811,11 @@ class Query implements ExpressionInterface, IteratorAggregate
             $append = $append($this->newExpr(), $this);
         }
 
-        if ($expression->type() === $conjunction) {
+        if ($expression->tieWith() === $conjunction) {
             $expression->add($append, $types);
         } else {
             $expression = $this->newExpr()
-                ->type($conjunction)
+                ->tieWith($conjunction)
                 ->add([$append, $expression], $types);
         }
 

+ 3 - 3
src/ORM/Behavior/TreeBehavior.php

@@ -880,15 +880,15 @@ class TreeBehavior extends Behavior
             $exp = $query->newExpr();
 
             $movement = clone $exp;
-            $movement ->add($field)->add("$shift")->type($dir);
+            $movement ->add($field)->add("$shift")->tieWith($dir);
 
             $inverse = clone $exp;
             $movement = $mark ?
-                $inverse->add($movement)->type('*')->add('-1'):
+                $inverse->add($movement)->tieWith('*')->add('-1'):
                 $movement;
 
             $where = clone $exp;
-            $where->add($field)->add($conditions)->type('');
+            $where->add($field)->add($conditions)->tieWith('');
 
             $query->update()
                 ->set($exp->eq($field, $movement))