✏️ 正在编辑: InvalidCommandException.php
路径:
/home/bpioifn/www/pigmentse/vendor/league/tactician-bundle/Middleware/InvalidCommandException.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php namespace League\Tactician\Bundle\Middleware; use League\Tactician\Exception\Exception; use Symfony\Component\Validator\ConstraintViolationListInterface; class InvalidCommandException extends \Exception implements Exception { /** * @var object */ protected $command; /** * @var ConstraintViolationListInterface */ protected $violations; /** * @param object $command * @param ConstraintViolationListInterface $violations * @return static */ public static function onCommand($command, ConstraintViolationListInterface $violations) { $exception = new static( 'Validation failed for ' . get_class($command) . ' with ' . $violations->count() . ' violation(s).' ); $exception->command = $command; $exception->violations = $violations; return $exception; } /** * @return object */ public function getCommand() { return $this->command; } /** * @return ConstraintViolationListInterface */ public function getViolations() { return $this->violations; } }
💾 保存文件
← 返回文件管理器