public function insert($collectionName, array $data, array $options = []) {
		$collection = $this->getCollection($collectionName);
		
		if ($this->_profilerEnabled) {
			$message = 'db.' . $collectionName . '.insert(' . json_encode($data) . ');';
			$event   = $this->getProfiler()->startInsert($message);
		}

		$result  = $collection->insert($data, $options);
		$success = (bool) $result['ok'];
		
		if ($this->_profilerEnabled) {
			$success
				? $event->stopSuccess()
				: $event->stopError();
		}
		
		return $success;
	}
public function insert($collectionName, array $data, array $options = []) {
		$collection = $this->getCollection($collectionName);
		
		if ($this->_profilerEnabled) {
			$message = 'db.' . $collectionName . '.insert(' . json_encode($data) . ');';
			$event   = $this->getProfiler()->startInsert($message);
		}

		$result  = $collection->insert($data, $options);
		$success = (bool) $result['ok'];
		
		if ($this->_profilerEnabled) {
			$success
				? $event->stopSuccess()
				: $event->stopError();
		}
		
		return $success;
	}
public function insert ( $ collectionName , array $ data , array $ options = [ ] ) { $ collection = $ this -> getCollection ( $ collectionName ) ; if ( $ this -> _profilerEnabled ) { $ message = 'db.' . $ collectionName . '.insert(' . json_encode ( $ data ) . ');' ; $ event = $ this -> getProfiler ( ) -> startInsert ( $ message ) ; } $ result = $ collection -> insert ( $ data , $ options ) ; $ success = ( bool ) $ result [ 'ok' ] ; if ( $ this -> _profilerEnabled ) { $ success ? $ event -> stopSuccess ( ) : $ event -> stopError ( ) ; } return $ success ; }
Insert the data into the collection

@param  string $collectionName
@param  array  $data
@param  array  $options
@return bool
Insert the data into the collection