Ejemplo n.º 1
0
 public function loadMeta(Connection $conn, $tablename)
 {
     self::$conn = $conn;
     self::$tablename = $tablename;
     $metamanager = new MetaManager();
     $data = self::$conn->fetchAll('select * from ' . self::$tablename . ';');
     $donneeTraitee = array();
     foreach ($data as $meta) {
         $donneeTraitee[$meta['name']] = $meta['value'];
     }
     $metamanager->setTitle($donneeTraitee['title']);
     $metamanager->setDescription($donneeTraitee['description']);
     $metamanager->setContentType($donneeTraitee['contentType']);
     $metamanager->setRobots($donneeTraitee['robots']);
     $metamanager->setOgTitle($donneeTraitee['ogTitle']);
     $metamanager->setOgUrl($donneeTraitee['ogUrl']);
     $metamanager->setOgSiteName($donneeTraitee['ogSiteName']);
     $metamanager->setOgDescription($donneeTraitee['ogDescription']);
     return $metamanager;
 }