public function pushEachSlice($field, $slice) { $slice = (int) $slice; if (!isset($this->operators['$push'][$field]['$each'])) { throw new Exception('Field ' . $field . ' must be pushed wit $each modifier'); } $this->operators['$push'][$field]['$slice'] = $slice; return $this; }