/** * @throws \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException * @return void */ public function cleanupCommand() { $entriesToCleanUp = $this->entryRepository->findEntriesToCleanUp($this->configuration->get(System\Configuration::CONF_SECONDS_TILL_RESET), $this->configuration->get(System\Configuration::CONF_MAX_FAILURES), $this->configuration->get(System\Configuration::CONF_RESTRICTION_TIME)); foreach ($entriesToCleanUp as $entryToCleanUp) { $this->entryRepository->remove($entryToCleanUp); } $this->persistenceManager->persistAll(); }
/** * @return \Aoe\FeloginBruteforceProtection\Domain\Model\Entry|NULL */ public function getEntry() { if (false === isset($this->entry)) { $entry = $this->entryRepository->findOneByIdentifier($this->getClientIdentifier()); if ($entry instanceof \Aoe\FeloginBruteforceProtection\Domain\Model\Entry) { $this->entry = $entry; if ($this->isOutdated($entry)) { $this->removeEntry(); } } } return $this->entry; }