create() public method

Create a new record using the current data.
public create ( )
Ejemplo n.º 1
0
 /**
  * Overload the create method to auto-insert
  * the timestamp if one does not exist
  *
  * @return void
  * @author Sam de Freyssinet
  */
 public function create()
 {
     if (!isset($this->_fields['created'])) {
         return parent::create();
     }
     if ($this->created === NULL) {
         $this->created = time();
     }
     return parent::create();
 }