public function getFormatConverters()
 {
     $this->assertEmpty($this->registry->getFormatConverters());
     $name = 'test';
     $converter = $this->createFormatConverter();
     $this->registry->addFormatConverter($name, $converter);
     $this->assertEquals([$name => $converter], $this->registry->getFormatConverters());
 }
コード例 #2
0
 /**
  * @param string $type
  * @param string|null $dateType
  * @param string|null $timeType
  * @param string|null $locale
  * @return string
  */
 public function getDateTimeFormat($type, $dateType = null, $timeType = null, $locale = null)
 {
     return $this->converterRegistry->getFormatConverter($type)->getDateTimeFormat($dateType, $timeType, $locale);
 }