source: cpc/trunk/project/lib/model/doctrine/Alerte.class.php @ 1427

Last change on this file since 1427 was 1427, checked in by teymour, 11 years ago

Interface de gestion des alertes

File size: 793 bytes
Line 
1<?php
2
3/**
4 * Alerte
5 *
6 * This class has been auto-generated by the Doctrine ORM Framework
7 *
8 * @package    cpc
9 * @subpackage model
10 * @author     Your name here
11 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
12 */
13class Alerte extends BaseAlerte
14{
15  public function generateVerif() {
16    $v = md5(rand(1, 999999999999));
17    $this->_set('verif', $v);
18    return $v;
19  }
20  public function getTitre() {
21    if (!$this->_get('titre'))
22      return "Recherche correspondant aux mots clés « ".$this->query." »";
23    return $this->_get('titre');
24  }
25
26  public function save(Doctrine_Connection $c = null) {
27    if (!$this->last_mail)
28      $this->last_mail = date('Y-m-d H:i:s');
29    if (!$this->verif)
30      $this->generateVerif();
31    return parent::save($c);
32  }
33}
Note: See TracBrowser for help on using the repository browser.