当前位置: 首页>>代码示例>>PHP>>正文


PHP Schedule::GetScheduledPlaylists方法代码示例

本文整理汇总了PHP中Schedule::GetScheduledPlaylists方法的典型用法代码示例。如果您正苦于以下问题:PHP Schedule::GetScheduledPlaylists方法的具体用法?PHP Schedule::GetScheduledPlaylists怎么用?PHP Schedule::GetScheduledPlaylists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Schedule的用法示例。


在下文中一共展示了Schedule::GetScheduledPlaylists方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: PushScheduleFinal

 /**
  * Push the current schedule to RabbitMQ, to be picked up by Pypo.
  * Will push the schedule in the range from 24 hours ago to 24 hours
  * in the future.
  */
 public static function PushScheduleFinal()
 {
     global $CC_CONFIG;
     if (RabbitMq::$doPush) {
         $conn = new AMQPConnection($CC_CONFIG["rabbitmq"]["host"], $CC_CONFIG["rabbitmq"]["port"], $CC_CONFIG["rabbitmq"]["user"], $CC_CONFIG["rabbitmq"]["password"]);
         $channel = $conn->channel();
         $channel->access_request($CC_CONFIG["rabbitmq"]["vhost"], false, false, true, true);
         $EXCHANGE = 'airtime-schedule';
         $channel->exchange_declare($EXCHANGE, 'direct', false, true);
         $data = json_encode(Schedule::GetScheduledPlaylists());
         $msg = new AMQPMessage($data, array('content_type' => 'text/plain'));
         $channel->basic_publish($msg, $EXCHANGE);
         $channel->close();
         $conn->close();
         self::SendMessageToShowRecorder("update_schedule");
     }
 }
开发者ID:romansavrulin,项目名称:Airtime,代码行数:22,代码来源:RabbitMq.php

示例2: scheduleAction

 public function scheduleAction()
 {
     global $CC_CONFIG;
     // disable the view and the layout
     $this->view->layout()->disableLayout();
     $this->_helper->viewRenderer->setNoRender(true);
     $api_key = $this->_getParam('api_key');
     if (!in_array($api_key, $CC_CONFIG["apiKey"])) {
         header('HTTP/1.0 401 Unauthorized');
         print 'You are not allowed to access this resource. ';
         exit;
     }
     PEAR::setErrorHandling(PEAR_ERROR_RETURN);
     $result = Schedule::GetScheduledPlaylists();
     echo json_encode($result);
 }
开发者ID:romansavrulin,项目名称:Airtime,代码行数:16,代码来源:ApiController.php


注:本文中的Schedule::GetScheduledPlaylists方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。