<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Article\Api\Controller; use ModStart\Core\Input\InputPackage; use ModStart\Core\Input\Response; use ModStart\Module\ModuleBaseController; use Module\Article\Util\ArticleUtil; class ArticleController extends ModuleBaseController { public function get() { goto PpxUM; PpxUM: $WZ8dY = InputPackage::buildFromInput(); goto ZgjKh; ZgjKh: $ULYbu = $WZ8dY->getTrimString('id'); goto V383v; V383v: if (is_numeric($ULYbu)) { $kmRgK = ArticleUtil::get($ULYbu); } else { $kmRgK = ArticleUtil::getByAlias($ULYbu); } goto rXYPi; rXYPi: return Response::generateSuccessData(array('article' => $kmRgK)); goto LmJKB; LmJKB: } }