Mobile.class.php 865 Bytes
<?php
/**
 *  品牌信息
 *
 * @name Service_Mobile
 * @version 1.0 (2013-6-5)
 * @package Service/Mobile
 * @author whb
 * @since 1.0
 */
class Service_Mobile extends Lib_Service
{
	const ROUTER = 'mobile.yohood.mobile';
	private static $_tag = 'tag_yohood_mobile_';
	private static $_key = 'key_yohood_mobile_';
	
	/**
	 * 获取模块
	 * 
	 * @return array
	 */
	public function getModule()
	{
		return self::service(self::ROUTER)->tag(self::$_tag)->fetchAssoc('getModule');
	}
	
	/**
	 * 设置模块状态
	 * 
	 * @param int $id
	 * @param int $status
	 * @return boolan
	 */
	public function setModuleStatus($id, $status)
	{
		$status = self::service(self::ROUTER)->cache(false)->update('setModuleStatus', array('status' => $status, 'id'=> $id))->status();
		if($status)
		{
			self::service(self::ROUTER)->delTags(self::$_tag);
		}
		return $status;
	}
}