Example #1
0
 /**
  * @param string $query
  * @param int $offset
  * @param int $perPage
  * @param array $config
  * @return Pimcore_Google_Cse
  */
 public function search($query, $offset = 0, $perPage = 10, $config = array())
 {
     $list = new self();
     $list->setConfig($config);
     $list->setOffset($offset);
     $list->setPerPage($perPage);
     $list->setQuery($query);
     return $list;
 }
Example #2
0
File: Cse.php Project: sfie/pimcore
 /**
  * @param $query
  * @param int $offset
  * @param int $perPage
  * @param array $config
  * @param null $facet
  * @return Cse
  */
 public static function search($query, $offset = 0, $perPage = 10, array $config = array(), $facet = null)
 {
     $list = new self();
     $list->setConfig($config);
     $list->setOffset($offset);
     $list->setPerPage($perPage);
     $list->setQuery($query);
     if (!empty($facet)) {
         $list->setQuery($list->getQuery() . " more:" . $facet);
     }
     return $list;
 }
Example #3
0
 /**
  * 获取已经播放过的节目列表
  *
  * @param int $page
  *
  * @return
  */
 public static function getRecentlyPlayedAlbumSheets($page = 1)
 {
     $that = new self();
     $that->setPerPage(self::$page);
     return $that->where('broadcast_at', '<', date('Y-m-d H:i:s'))->orderBy('broadcast_at', 'desc')->skip(($page - 1) * $that->getPerPage())->take($that->getPerPage())->get();
 }