Example #1
0
 public static function getNewsByID($IDNews)
 {
     $News = new self();
     $News->fetchRowAndSet("IDNews = '{$IDNews}'");
     $News->Author = Zwe_Model_User::getUserById($News->IDAuthor);
     return $News;
 }
Example #2
0
 public static function getByUrl($Url)
 {
     $TheLuogo = new self();
     try {
         $TheLuogo->fetchRowAndSet("Url = '{$Url}'");
         $TheLuogo = self::get($TheLuogo->IDLocation);
     } catch (Exception $E) {
         $filter = new Zend_Filter_Word_CamelCaseToSeparator();
         $Nome = ucfirst($filter->filter($Url));
         $Data = array('Name' => $Nome, 'Url' => $Url);
         $IDLuogo = $TheLuogo->insert($Data);
         $TheLuogo = self::get($IDLuogo);
     }
     return $TheLuogo;
 }
Example #3
0
 public static function getMessageById($IDMessage)
 {
     $Message = new self();
     return $Message->fetchRowAndSet("IDMessage = '{$IDMessage}'");
 }
Example #4
0
 public static function getUserByEmail($Email)
 {
     $User = new self();
     return $User->fetchRowAndSet("Email = '{$Email}'");
 }
Example #5
0
 public static function getPageByID($IDPage)
 {
     $Page = new self();
     $Page->fetchRowAndSet("IDPage = '{$IDPage}'");
     return self::getRightClass($Page);
 }
Example #6
0
 public static function getAlbumByID($IDAlbum)
 {
     $Album = new self();
     return $Album->fetchRowAndSet("IDPhoto = '{$IDAlbum}' AND Extension IS NULL");
 }
 public static function getType($IDType)
 {
     $Type = new self();
     return $Type->fetchRowAndSet("IDType = '{$IDType}'");
 }