Advertisement
Guest User

Untitled

a guest
Oct 1st, 2014
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.15 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: silentium
  5.  * Date: 9/23/14
  6.  * Time: 4:42 PM
  7.  */
  8.  
  9. class MongoWriteBatch {
  10.     /* Константы */
  11.     const COMMAND_INSERT = 1;
  12.     const COMMAND_UPDATE = 2;
  13.     const COMMAND_DELETE = 3;
  14.     /* Методы */
  15.  
  16.     protected function __construct(MongoCollection $collection, $batch_type = MongoWriteBatch::COMMAND_INSERT, $write_options = []) {}
  17.  
  18.     /**
  19.      * @param array $item
  20.      * @return bool
  21.      */
  22.     public function add(array $item) {}
  23.  
  24.     /**
  25.      * @param array $write_options
  26.      * @return array
  27.      */
  28.     public function execute(array $write_options) {}
  29. }
  30.  
  31. class MongoInsertBatch extends MongoWriteBatch {
  32.     /* Методы */
  33.     public function __construct(MongoCollection $collection, array $write_options = []) {}
  34. }
  35.  
  36.  
  37. class MongoUpdateBatch extends MongoWriteBatch {
  38.     /* Методы */
  39.     public function __construct(MongoCollection $collection, array $write_options = []) {}
  40. }
  41.  
  42.  
  43. class MongoDeleteBatch extends MongoWriteBatch {
  44.     /* Методы */
  45.     public function __construct(MongoCollection $collection, array $write_options = []) {}
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement