Ejemplo n.º 1
0
 /**
  * You can not instantiate the Query object directly
  *
  * @param ActiveRecord $instance
  */
 public function __construct(ActiveRecord $instance)
 {
     if ($instance instanceof ActiveRecord) {
         $this->setActiveRecord($instance);
     }
     self::$query = $this;
 }
Ejemplo n.º 2
0
 /**
  * Constructor of Query Builder.
  *
  * @param ActiveRecord $ar
  */
 public function __construct($ar = null)
 {
     if ($ar instanceof ActiveRecord) {
         $this->setActiveRecord($ar);
     }
     self::$query = $this;
 }