lib/db/cortex.php
protected function _mongo_addGroup($opt) {
		if (!$this->grp_stack)
			$this->grp_stack = array('keys'=>array(),'initial'=>array(),'reduce'=>'','finalize'=>'');
		if (isset($opt['keys']))
			$this->grp_stack['keys']+=$opt['keys'];
		if (isset($opt['reduce']))
			$this->grp_stack['reduce'].=$opt['reduce'];
		if (isset($opt['initial']))
			$this->grp_stack['initial']+=$opt['initial'];
		if (isset($opt['finalize']))
			$this->grp_stack['finalize'].=$opt['finalize'];
	}
protected function _mongo_addGroup($opt) {
		if (!$this->grp_stack)
			$this->grp_stack = array('keys'=>array(),'initial'=>array(),'reduce'=>'','finalize'=>'');
		if (isset($opt['keys']))
			$this->grp_stack['keys']+=$opt['keys'];
		if (isset($opt['reduce']))
			$this->grp_stack['reduce'].=$opt['reduce'];
		if (isset($opt['initial']))
			$this->grp_stack['initial']+=$opt['initial'];
		if (isset($opt['finalize']))
			$this->grp_stack['finalize'].=$opt['finalize'];
	}
protected function _mongo_addGroup ( $ opt ) { if ( ! $ this -> grp_stack ) $ this -> grp_stack = array ( 'keys' => array ( ) , 'initial' => array ( ) , 'reduce' => '' , 'finalize' => '' ) ; if ( isset ( $ opt [ 'keys' ] ) ) $ this -> grp_stack [ 'keys' ] += $ opt [ 'keys' ] ; if ( isset ( $ opt [ 'reduce' ] ) ) $ this -> grp_stack [ 'reduce' ] .= $ opt [ 'reduce' ] ; if ( isset ( $ opt [ 'initial' ] ) ) $ this -> grp_stack [ 'initial' ] += $ opt [ 'initial' ] ; if ( isset ( $ opt [ 'finalize' ] ) ) $ this -> grp_stack [ 'finalize' ] .= $ opt [ 'finalize' ] ; }
merge mongo group options array
@param $opt
merge mongo group options array