Esempio n. 1
0
 /**
  * returns the current ad
  * @return Model_Ad
  */
 public static function current()
 {
     //we don't have so let's retrieve
     if (self::$_current === NULL) {
         self::$_current = new self();
         if (strtolower(Request::current()->controller() == 'Ad') and strtolower(Request::current()->action()) == 'view' and Request::current()->param('seotitle') !== NULL) {
             self::$_current = self::$_current->where('seotitle', '=', Request::current()->param('seotitle'))->limit(1)->cached()->find();
         }
     }
     return self::$_current;
 }