Inheritance: extends Crummy\Phlack\Common\Hash
示例#1
0
文件: Message.php 项目: mcrumm/phlack
 /**
  * {@inheritdoc}
  */
 protected function setDefaultOptions(OptionsResolver $resolver)
 {
     parent::setDefaultOptions($resolver);
     $resolver->setTypesAllowed(['attachments' => '\\Crummy\\Phlack\\Message\\Collection\\AttachmentCollection']);
     $resolver->setNormalizers(['icon_emoji' => function (Options $options, $value) {
         return empty($value) ? $value : sprintf(':%s:', trim($value, ':'));
     }]);
 }
示例#2
0
 /**
  * {@inheritdoc}
  */
 protected function setDefaultOptions(OptionsResolver $resolver)
 {
     parent::setDefaultOptions($resolver);
     $resolver->setTypesAllowed(['fields' => '\\Crummy\\Phlack\\Message\\Collection\\FieldCollection']);
 }