mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
chore: rename registerEntity
This commit is contained in:
@@ -81,7 +81,7 @@ class RDAPService
|
|||||||
|
|
||||||
foreach ($res['entities'] as $rdapEntity) {
|
foreach ($res['entities'] as $rdapEntity) {
|
||||||
if (!array_key_exists('handle', $rdapEntity)) continue;
|
if (!array_key_exists('handle', $rdapEntity)) continue;
|
||||||
$entity = $this->processEntity($rdapEntity);
|
$entity = $this->registerEntity($rdapEntity);
|
||||||
|
|
||||||
$this->em->persist($entity);
|
$this->em->persist($entity);
|
||||||
$this->em->flush();
|
$this->em->flush();
|
||||||
@@ -119,7 +119,7 @@ class RDAPService
|
|||||||
|
|
||||||
foreach ($rdapNameserver['entities'] as $rdapEntity) {
|
foreach ($rdapNameserver['entities'] as $rdapEntity) {
|
||||||
if (!array_key_exists('handle', $rdapEntity)) continue;
|
if (!array_key_exists('handle', $rdapEntity)) continue;
|
||||||
$entity = $this->processEntity($rdapEntity);
|
$entity = $this->registerEntity($rdapEntity);
|
||||||
|
|
||||||
$this->em->persist($entity);
|
$this->em->persist($entity);
|
||||||
$this->em->flush();
|
$this->em->flush();
|
||||||
@@ -168,7 +168,7 @@ class RDAPService
|
|||||||
return strtolower(substr($domain, $lastDotPosition + 1));
|
return strtolower(substr($domain, $lastDotPosition + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
private function processEntity(array $rdapEntity): Entity
|
private function registerEntity(array $rdapEntity): Entity
|
||||||
{
|
{
|
||||||
$entity = $this->entityRepository->findOneBy([
|
$entity = $this->entityRepository->findOneBy([
|
||||||
"handle" => $rdapEntity['handle']
|
"handle" => $rdapEntity['handle']
|
||||||
|
|||||||
Reference in New Issue
Block a user