root/trunk/lib/model/Question.php

Revision 18, 0.7 kB (checked in by fabien, 7 years ago)

day 7 modifications

  • Property svn:mime-type set to text/x-php
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1 <?php
2
3 require_once 'model/om/BaseQuestion.php';
4
5
6 /**
7  * Skeleton subclass for representing a row from the 'ask_question' table.
8  *
9  *
10  *
11  * You should add additional methods to this class to meet the
12  * application requirements.  This class will only be generated as
13  * long as it does not already exist in the output directory.
14  *
15  * @package model
16  */   
17 class Question extends BaseQuestion
18 {
19   public function setTitle($v)
20   {
21     parent::setTitle($v);
22
23     $this->setStrippedTitle(myTools::stripText($v));
24   }
25
26   public function getAllInterestedUsers()
27   {   
28     $c = new Criteria();
29     $c->addJoin(UserPeer::ID, InterestPeer::USER_ID, Criteria::LEFT_JOIN);
30     $c->add(InterestPeer::QUESTION_ID, $this->getId());
31
32     return UserPeer::doSelect($c);
33   }
34 }
35
36 ?>
Note: See TracBrowser for help on using the browser.