Example #1
0
 public function setShopWithRow($row)
 {
     $shop = new ShopBean();
     $shop->setShopId($row['id']);
     $shop->setShopName($row['name']);
     $shop->setShopTel($row['tel']);
     $shop->setShopImage($row['image']);
     return $shop;
 }
Example #2
0
<?php

/**
 * Created by PhpStorm.
 * User: nathan
 * Date: 7/6/15
 * Time: 4:20 PM
 */
header("Content-Type:text/json; charset=utf8");
include_once 'shopdao.php';
$shopDao = ShopDao::sharedShopDao();
$result = $shopDao->getAllShops();
$shops = ShopBean::arrayToJson($result, true);
echo '{"shops":' . $shops . '}';
Example #3
0
<?php

header("Content-Type:text/json; charset=utf8");
include_once 'shopbean.php';
include_once 'shopdao.php';
$shopDao = ShopDao::sharedShopDao();
$result = $shopDao->getAllShops();
$shops = ShopBean::arrayToJson($result, false);
echo '{"shops":' . $shops . '}';