Exemple #1
0
 /**
  * {@inheritDoc}
  */
 public function delete(StorableInterface $obj, $type)
 {
     $file = $this->getFileName($type, $obj->getStorableData());
     unlink($this->baseDir . DIRECTORY_SEPARATOR . $file);
 }
 /**
  * Insert object
  *
  * @param StorableInterface $obj
  * @param string            $type
  *
  * @return int
  */
 protected function insert(StorableInterface $obj, $type)
 {
     $insertParams = array();
     foreach ($obj->getStorableData() as $name => $value) {
         $insertParams[$name] = $value;
     }
     $this->con->insert($this->tables[$type], $insertParams);
     return $this->con->lastInsertId();
 }