/** * 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; }
/** * Constructor of Query Builder. * * @param ActiveRecord $ar */ public function __construct($ar = null) { if ($ar instanceof ActiveRecord) { $this->setActiveRecord($ar); } self::$query = $this; }