Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Loader)
- *
- * @ Version : 2.0.0.4
- * @ Author : DeZender
- * @ Release on : 21.10.2015
- * @ Official site : http://DeZender.Net
- *
- */
- namespace Ppb\Service\Table {
- abstract class AbstractServiceTable extends Ppb\Service\AbstractService {
- protected $_insertRows = 1;
- protected $_mainColumn = null;
- /**
- *
- * get number of insert rows
- *
- * @return integer
- */
- public function getInsertRows() {
- return $this->_insertRows;
- }
- public function getMainColumn($columns) {
- return $this->_mainColumn ? ($this->_mainColumn) : ($columns[0]);
- }
- /**
- *
- * set number of insert rows
- *
- * @param integer $insertRows
- * @return \Ppb\Service\Table\AbstractServiceTable
- */
- public function setInsertRows($insertRows) {
- $this->_insertRows = (int)$insertRows;
- return $this;
- }
- /**
- *
- * save data in the table (update if an id exists or insert otherwise)
- *
- * TODO: PROBLEM WITH "max_input_vars" php setting for big arrays of data
- *
- * @param array $data
- * @return \Ppb\Service\Table\AbstractServiceTable
- * @throws \InvalidArgumentException
- */
- public function save($data) {
- if (!isset($data["id"]))
- {
- throw new InvalidArgumentException("The form must use an element with the name 'id'.");
- .....................................................................
- .......................................
- ................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement