コード例 #1
0
 private function isSatisfiedFormat(Format $format, LoggerInterface $logger = null)
 {
     if (empty($this->formats)) {
         return true;
     }
     foreach ($this->formats as $formatId) {
         if ($formatId == $format->getId()) {
             return true;
         }
     }
     if ($logger) {
         $logger->debug("Storage does not meet Preconditions due to format restriction. Was {$format}, should be one of " . implode(',', $this->formats));
     }
     return false;
 }