webservice/library/Application/Model/ExtractionCommandes.php

17 lines
345 B
PHP
Raw Normal View History

2013-11-05 11:18:30 +00:00
<?php
class Application_Model_ExtractionCommandes extends Zend_Db_Table_Abstract
{
protected $_name = 'commandes';
public function insert(array $data)
{
// Ajout d'un timestamp
if (empty($data['dateAdded'])) {
$data['dateAdded'] = date('Y-m-d H:i:s');
}
return parent::insert($data);
}
}