public function gc($maxlifetime) { $sessions = new \Raptor\Util\ItemList($this->app->getStore()->getManager()->getRepository('systemBundle:RaptorSession')->getGarvage($maxlifetime)); if ($sessions->size() > 0) { foreach ($sessions as $session) { $this->app->getStore()->getManager()->remove($session); } $this->app->getStore()->getManager()->flush(); return true; } else { return true; } }