public function prepareWhere($whereObject)
    {
        $where = null;
        $params = [];
        if (!empty($whereObject)) {
            $arr = [];

            /** @var \Dframe\Database\Chunk\ChunkInterface $chunk */
            foreach ($whereObject as $chunk) {
                list($wSQL, $wParams) = $chunk->build();
                $arr[] = $wSQL;
                foreach ($wParams as $k => $v) {
                    $params[] = $v;
                }
            }
            $this->setWhere = ' WHERE ' . implode(' AND ', $arr);

            if (is_array($this->setParams) and !empty($this->setParams)) {
                $this->setParams = array_merge($this->setParams, $params);
            } else {
                $this->setParams = $params;
            }
        } else {
            $this->setWhere = null;
            //$this->setParams = [];
        }

        //if (!empty($order))
        //    $this->prepareOrder($order, $sort);
        //

        return $this;
    }
public function prepareWhere($whereObject)
    {
        $where = null;
        $params = [];
        if (!empty($whereObject)) {
            $arr = [];

            /** @var \Dframe\Database\Chunk\ChunkInterface $chunk */
            foreach ($whereObject as $chunk) {
                list($wSQL, $wParams) = $chunk->build();
                $arr[] = $wSQL;
                foreach ($wParams as $k => $v) {
                    $params[] = $v;
                }
            }
            $this->setWhere = ' WHERE ' . implode(' AND ', $arr);

            if (is_array($this->setParams) and !empty($this->setParams)) {
                $this->setParams = array_merge($this->setParams, $params);
            } else {
                $this->setParams = $params;
            }
        } else {
            $this->setWhere = null;
            //$this->setParams = [];
        }

        //if (!empty($order))
        //    $this->prepareOrder($order, $sort);
        //

        return $this;
    }
public function prepareWhere ( $ whereObject ) { $ where = null ; $ params = [ ] ; if ( ! empty ( $ whereObject ) ) { $ arr = [ ] ; /** @var \Dframe\Database\Chunk\ChunkInterface $chunk */ foreach ( $ whereObject as $ chunk ) { list ( $ wSQL , $ wParams ) = $ chunk -> build ( ) ; $ arr [ ] = $ wSQL ; foreach ( $ wParams as $ k => $ v ) { $ params [ ] = $ v ; } } $ this -> setWhere = ' WHERE ' . implode ( ' AND ' , $ arr ) ; if ( is_array ( $ this -> setParams ) and ! empty ( $ this -> setParams ) ) { $ this -> setParams = array_merge ( $ this -> setParams , $ params ) ; } else { $ this -> setParams = $ params ; } } else { $ this -> setWhere = null ; //$this->setParams = []; } //if (!empty($order)) //    $this->prepareOrder($order, $sort); // return $ this ; }
PrepareWhere function.

@param array

@return Database
PrepareWhere function .