protected function _subBuilder(Closure $callback)
    {
        // store build attr
        $store = $this->_storeBuildAttr();

        /**************** begin sub query build ****************/
            // empty attribute
            $this->_resetBuildAttr();
            // call sub query callback
            call_user_func($callback, $this);
            // get sub query build attr
            $sub_attr = [];

            $this->_buildQuery();

            foreach ($this->_buildAttrs as $buildAttr) {
                $sub_attr[$buildAttr] = $this->$buildAttr;
            }
        /**************** end sub query build ****************/

        // restore attribute
        $this->_reStoreBuildAttr($store);

        return $sub_attr;
    }
protected function _subBuilder(Closure $callback)
    {
        // store build attr
        $store = $this->_storeBuildAttr();

        /**************** begin sub query build ****************/
            // empty attribute
            $this->_resetBuildAttr();
            // call sub query callback
            call_user_func($callback, $this);
            // get sub query build attr
            $sub_attr = [];

            $this->_buildQuery();

            foreach ($this->_buildAttrs as $buildAttr) {
                $sub_attr[$buildAttr] = $this->$buildAttr;
            }
        /**************** end sub query build ****************/

        // restore attribute
        $this->_reStoreBuildAttr($store);

        return $sub_attr;
    }
protected function _subBuilder ( Closure $ callback ) { // store build attr $ store = $ this -> _storeBuildAttr ( ) ; /**************** begin sub query build ****************/ // empty attribute $ this -> _resetBuildAttr ( ) ; // call sub query callback call_user_func ( $ callback , $ this ) ; // get sub query build attr $ sub_attr = [ ] ; $ this -> _buildQuery ( ) ; foreach ( $ this -> _buildAttrs as $ buildAttr ) { $ sub_attr [ $ buildAttr ] = $ this -> $ buildAttr ; } /**************** end sub query build ****************/ // restore attribute $ this -> _reStoreBuildAttr ( $ store ) ; return $ sub_attr ; }
do sub build

@param  \Closure $callback
@return  array
@throws  \InvalidArgumentException
@throws  \PDOException
do sub build