Пример #1
0
 /**
  * @param string $resultString
  * @return Record\SRVRecord
  */
 protected function srvRepositoryFetch($resultString)
 {
     if (!array_key_exists($resultString, $this->recordRepository)) {
         $this->recordRepository[$resultString] = SRVResult::createFromSRVResultString($resultString);
     }
     return $this->recordRepository[$resultString];
 }
 private function filterResult($result)
 {
     $record = SRVResult::createFromSRVResultString($result);
     switch (true) {
         case $this->filterValue($this->portFilter, $record->getPort()):
         case $this->filterValue($this->priorityFilter, $record->getPriority()):
         case $this->filterValue($this->weightFilter, $record->getWeight()):
             return false;
     }
     return $result;
 }