PHP 8.2.31
Preview: ConstraintValidator.php Size: 1.61 KB
/home/nshryvcy/himaltourism.com/wp-content/plugins/mailpoet/vendor-prefixed/symfony/validator/ConstraintValidator.php

<?php
namespace MailPoetVendor\Symfony\Component\Validator;
if (!defined('ABSPATH')) exit;
use MailPoetVendor\Symfony\Component\Validator\Context\ExecutionContextInterface;
abstract class ConstraintValidator implements ConstraintValidatorInterface
{
 public const PRETTY_DATE = 1;
 public const OBJECT_TO_STRING = 2;
 protected $context;
 public function initialize(ExecutionContextInterface $context)
 {
 $this->context = $context;
 }
 protected function formatTypeOf($value)
 {
 return \get_debug_type($value);
 }
 protected function formatValue($value, int $format = 0)
 {
 if ($format & self::PRETTY_DATE && $value instanceof \DateTimeInterface) {
 if (\class_exists(\IntlDateFormatter::class)) {
 $formatter = new \IntlDateFormatter(\Locale::getDefault(), \IntlDateFormatter::MEDIUM, \IntlDateFormatter::SHORT, 'UTC');
 return $formatter->format(new \DateTime($value->format('Y-m-d H:i:s.u'), new \DateTimeZone('UTC')));
 }
 return $value->format('Y-m-d H:i:s');
 }
 if (\is_object($value)) {
 if ($format & self::OBJECT_TO_STRING && \method_exists($value, '__toString')) {
 return $value->__toString();
 }
 return 'object';
 }
 if (\is_array($value)) {
 return 'array';
 }
 if (\is_string($value)) {
 return '"' . $value . '"';
 }
 if (\is_resource($value)) {
 return 'resource';
 }
 if (null === $value) {
 return 'null';
 }
 if (\false === $value) {
 return 'false';
 }
 if (\true === $value) {
 return 'true';
 }
 return (string) $value;
 }
 protected function formatValues(array $values, int $format = 0)
 {
 foreach ($values as $key => $value) {
 $values[$key] = $this->formatValue($value, $format);
 }
 return \implode(', ', $values);
 }
}

Directory Contents

Dirs: 8 × Files: 15

Name Size Perms Modified Actions
Command DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
Context DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
Exception DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
Mapping DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
Util DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
Validator DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
Violation DIR
- drwxr-xr-x 2023-04-04 05:35:40
Edit Download
4.49 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
1.61 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
629 B lrw-r--r-- 2023-04-04 05:35:40
Edit Download
195 B lrw-r--r-- 2023-04-04 05:35:40
Edit Download
340 B lrw-r--r-- 2023-04-04 05:35:40
Edit Download
2.25 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
396 B lrw-r--r-- 2023-04-04 05:35:40
Edit Download
2.28 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
474 B lrw-r--r-- 2023-04-04 05:35:40
Edit Download
1.27 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
247 B lrw-r--r-- 2023-04-04 05:35:40
Edit Download
0 B lrw-r--r-- 2023-04-04 05:35:40
Edit Download
177 B lrw-r--r-- 2023-04-04 05:35:40
Edit Download
1.70 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download
9.81 KB lrw-r--r-- 2023-04-04 05:35:40
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).