Activity.class.php 4.11 KB
<?php
class Facade_Activity
{
	/**
	 * 服务
	 */
	private static $service = null;
	/**
	 *
	 * @return Service_News
	 */
	private static function service ()
	{
		if (! isset(self::$service))
		{
			self::$service = new Service_Activity();
		}
		return self::$service;
	}
	
    /**
     * 获取活动详情
     * 
     * @return array
     */
	public static function getActivityInfo()
	{
		return self::service()->getActivityInfo();
	}
	
	/**
	 * 获取活动详情
	 * 
	 * @param int $id
	 * @return array
	 */
	public static function getActivityInfoById($id)
	{
		return self::service()->getActivityInfoById($id);
	}
	
	/**
	 * 设置活动详情
	 *
	 * @param string $title
	 * @param string $content
	 * @param string $client_content
	 * @return int
	 */
	public static function setActivityInfo($title, $content, $client_content)
	{
		return self::service()->setActivityInfo($title, $content, $client_content);
	}
	
	/**
	 * 根据ID设置活动详情
	 *
	 * @param int $id
	 * @param string $title
	 * @param string $content
	 * @param string $client_content
	 * @return array
	 */
	public static function setActivityInfoById($id, $title, $content, $client_content)
	{
		return self::service()->setActivityInfoById($id, $title, $content, $client_content);
	}
	
	/**
	 * 删除活动详情
	 * 
	 * @param string $id
	 * @return boolean
	 */
	public static function delActivityInfo($id)
	{
		return self::service()->delActivityInfo($id);
	}
	
	/**
	 * 获取所有活动计划
	 *
	 * @return array
	 */
	public static function getActivityPlan()
	{
		return self::service()->getActivityPlan();
	}
	
	/**
	 * 根据parent_id获取活动计划
	 *
	 * @param int $parent_id
	 * @return array
	 */
	public static function getActivityPlanByParentId($parent_id)
	{
		return self::service()->getActivityPlanByParentId($parent_id);
	}	
	
	/**
	 * 增加活动计划
	 * 
	 * @param int $parent_id
	 * @param int $title
	 * @param string $content
	 * @param string $pic
	 * @param string $place
	 * @param string $start_time
	 * @param string $end_time
	 * @return int
	 */
	public static function setActivityPlan($parent_id, $title, $content, $pic, $place, $start_time, $end_time)
	{
		return self::service()->setActivityPlan($parent_id, $title, $content, $pic, $place, $start_time, $end_time);
	}
	
	/**
	 * 根据ID更新活动计划
	 *
	 * @param int $id
	 * @param int $parent_id
	 * @param int $title
	 * @param string $content
	 * @param string $pic
	 * @param string $place
	 * @param string $start_time
	 * @param string $end_time
	 * @return int
	 */
	public static function setActivityPlanById($id, $parent_id, $title, $content, $pic, $place, $start_time, $end_time)
	{
		return self::service()->setActivityPlanById($id, $parent_id, $title, $content, $pic, $place, $start_time, $end_time);
	}
	
	/**
	 * 删除活动计划
	 * 
	 * @param int $id
	 * @return boolean
	 */
	public static function delActivityPlan($id)
	{
		return self::service()->delActivityPlan($id);
	}

	/**
	 * 获取所有活动主题
	 *
	 * @return array
	 */
	public static function getActivityTopic()
	{
		return self::service()->getActivityTopic();
	}
	
	/**
	 * 增加活动主题
	 *
	 * @param int $title
	 * @param string $place
	 * @param string $start_time
	 * @param string $end_time
	 * @return int
	 */
	public static function setActivityTopic($title, $place, $start_time, $end_time)
	{
		return self::service()->setActivityTopic($title, $place, $start_time, $end_time);
	}
	
	/**
	 * 根据ID更新活动主题
	 *
	 * @param int $id
	 * @param int $title
	 * @param string $place
	 * @param string $start_time
	 * @param string $end_time
	 * @return int
	 */
	public static function setActivityTopicById($id, $title, $place, $start_time, $end_time)
	{
		return self::service()->setActivityTopicById($id, $title, $place, $start_time, $end_time);
	}
	
	/**
	 * 删除活动主题
	 *
	 * @param int $id
	 * @return boolean
	 */
	public static function delActivityTopic($id)
	{
		return self::service()->delActivityTopic($id);
	}
	
	/**
	 * 获取活动主题
	 *
	 * @param int $id
	 * @return array
	 */
	public static function getActivityTopicId($id)
	{
		return self::service()->getActivityTopicId($id);
	}

}