diff --git a/src/Zone.php b/src/Zone.php index 13d8593..af6ddfd 100644 --- a/src/Zone.php +++ b/src/Zone.php @@ -117,6 +117,7 @@ public function get(?string $recordType = null): ResourceSet */ public function find(string $resourceRecordName, ?string $recordType = null): ResourceSet { + $resourceRecordName = $resourceRecordName === '@' ? $this->zone : $resourceRecordName; $records = $this->get($recordType); $foundResources = new ResourceSet($this); @@ -124,6 +125,7 @@ public function find(string $resourceRecordName, ?string $recordType = null): Re foreach ($records as $record) { if ( $record->getName() === $resourceRecordName + || $record->getName() === $resourceRecordName.'.' || $record->getName() === sprintf('%s.%s', $resourceRecordName, $this->zone) ) { $foundResources->addResource($record);