private static function cargar_categorias($mc, $mysql, $id_metacontenido)
 {
     //java.sql.CallableStatement cstm = $mysql.IniciarStoredProc("{CALL listarcategoriasmetacontenido(?)}");
     $cstm = $mysql->IniciarStoredProc("CALL listarcategoriasmetacontenido(?)");
     $cstm->bindParam(1, $id_metacontenido, \PDO::PARAM_INT);
     //ResultSet rst = cstm.executeQuery();
     $cstm->execute();
     $resultSet = $cstm->fetchAll();
     //Collection<Integer> $categorias = new ArrayList<Integer>();
     $categorias = new ArrayCollection();
     // 			while ($resultSet.next())
     foreach ($resultSet as $row) {
         //int p = MySQLAccess.GetSafeInt($resultSet, 1);
         $p = MySQLAccess::GetSafeInt($row, 0);
         $categorias->add($p);
     }
     // 			rst.close();
     $cstm->closeCursor();
     $cstm = null;
     $mc->categorias = $categorias;
     $mc->categorias_bd = $categorias;
 }
 private function getCategoriasId()
 {
     // 			Collection<Integer> categoriasIds = new ArrayList<Integer>();
     $categoriasIds = new ArrayCollection();
     if (isset($this->categorias)) {
         //for (CategoriaLogica cat: categorias)
         foreach ($this->categorias as $categoriaLogica) {
             $categoriasIds->add($categoriaLogica->getID());
         }
     }
     return $categoriasIds;
 }