Ejemplo n.º 1
0
 /**
  * get all settings for battles which have started within the time span from $hours to now, 7 days by default
  * @param int $hours
  * @return \King23\Mongo\MongoResult
  */
 public static function getActiveSettings($hours = 168)
 {
     $ts = 3600 * $hours;
     // lets only refresh the last 3 days for now
     $qry = array("startdate" => array('$gt' => new \MongoDate(time() - $ts)));
     return parent::doFind(__CLASS__, $qry);
 }
Ejemplo n.º 2
0
 public static function find($criteria = array())
 {
     return parent::doFind(__CLASS__, $criteria);
 }
Ejemplo n.º 3
0
 public static function count()
 {
     return parent::doFind(__CLASS__, array())->count();
 }
Ejemplo n.º 4
0
 /**
  * @static
  * @param string $searchword
  * @param int $limit
  * @return \King23\Mongo\MongoResult
  */
 public static function search($searchword, $limit)
 {
     return parent::doFind(__CLASS__, array("_id" => new \MongoRegex('/^' . $searchword . '.*/i')))->limit($limit);
 }
Ejemplo n.º 5
0
 /**
  * returns MongoResult of type EveItem, stripped down to
  * type ID contents.
  * @static
  * @return \King23\Mongo\MongoResult
  */
 public static function getMarketIDs()
 {
     // Only needed when we update, all the market IDs here are stuff that are on the market ingame
     // 2 blueprints 4 ships 9 ship equipment 10 turrets & bays 11 ammo 24 implants & boosters 27 implants
     return parent::doFind(__CLASS__, array("marketGroupID" => array('$gt' => 0)), array("typeID" => 1));
 }