/** * 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); }
public static function find($criteria = array()) { return parent::doFind(__CLASS__, $criteria); }
public static function count() { return parent::doFind(__CLASS__, array())->count(); }
/** * @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); }
/** * 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)); }