You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- <?php
-
- /**
- *
- * ============================================================================
- * * 版权所有 蜘蛛出行 * *
- * 网站地址: http://www.zhizhuchuxing.com
- * ----------------------------------------------------------------------------
- * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
- * 使用;不允许对程序代码以任何形式任何目的的再发布。
- * ============================================================================
- * Author By: 娄梦宁
- * PhpStorm AroundController.php
- * Create By 2016/11/10 13:23 $
- */
- namespace Trip\Controller;
-
- use Trip\Service\TripService;
-
- class TripController
- {
- private $service;
-
- /**
- * Function Description:获取service
- * Function Name: getService
- *
- * @return TripService
- *
- * @author 娄梦宁
- */
- public function getService(){
- if($this->service == '') {
- $this->service = new TripService();
- }
- return $this->service;
- }
-
-
- /**
- * Function Description:所有初始化数据
- * Function Name: indexAction
- *
- * @return string
- *
- * @author 娄梦宁
- */
- public function indexAction(){
- //获取所有数据
- $reComList=$this->getService()->getAll();
- return json_encode($reComList);
- }
-
- }
|