Ejemplo n.º 1
0
 /**
  * Creates an Category object based on a DB row.
  *
  * @param array $row The DB row containing Category data.
  * @return \MyMovies\Domain\Category
  */
 protected function buildDomainObject($row)
 {
     $cat = new Categorie();
     $cat->setCat_id($row['cat_id']);
     $cat->setCat_name($row['cat_name']);
     return $cat;
 }
Ejemplo n.º 2
0
 function getCategorie($id)
 {
     $result = $this->connector->query("SELECT * FROM categorie WHERE `cat_id` = '{$id}'");
     while ($row = $this->connector->fetchArray($result)) {
         $categorie = new Categorie();
         $categorie->setCat_id($row['cat_id']);
         $categorie->setCat_title($row['cat_title']);
         $categorie->setCat_despription($row['cat_despription']);
         return $categorie;
     }
 }