Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php declare(strict_types=1); namespace Drupal\Core\Validation; use Drupal\Core\Depend..
Decoded Output download
<?php
declare(strict_types=1);
namespace Drupal\Core\Validation;
use Drupal\Core\DependencyInjection\ClassResolverInterface;
use Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory;
use Symfony\Component\Validator\Validator\RecursiveValidator;
/**
* A factory for creating Symfony recursive validators.
*/
class BasicRecursiveValidatorFactory {
/**
* Constructs a new RecursiveValidatorFactory.
*
* @param \Drupal\Core\DependencyInjection\ClassResolverInterface $classResolver
* The class resolver.
*/
public function __construct(
protected readonly ClassResolverInterface $classResolver,
) {}
/**
* Creates a new RecursiveValidator.
*
* @return \Symfony\Component\Validator\Validator\RecursiveValidator
* The validator.
*/
public function createValidator(): RecursiveValidator {
return new RecursiveValidator(
new ExecutionContextFactory(new DrupalTranslator()),
new LazyLoadingMetadataFactory(),
new ConstraintValidatorFactory($this->classResolver),
);
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types=1);
namespace Drupal\Core\Validation;
use Drupal\Core\DependencyInjection\ClassResolverInterface;
use Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory;
use Symfony\Component\Validator\Validator\RecursiveValidator;
/**
* A factory for creating Symfony recursive validators.
*/
class BasicRecursiveValidatorFactory {
/**
* Constructs a new RecursiveValidatorFactory.
*
* @param \Drupal\Core\DependencyInjection\ClassResolverInterface $classResolver
* The class resolver.
*/
public function __construct(
protected readonly ClassResolverInterface $classResolver,
) {}
/**
* Creates a new RecursiveValidator.
*
* @return \Symfony\Component\Validator\Validator\RecursiveValidator
* The validator.
*/
public function createValidator(): RecursiveValidator {
return new RecursiveValidator(
new ExecutionContextFactory(new DrupalTranslator()),
new LazyLoadingMetadataFactory(),
new ConstraintValidatorFactory($this->classResolver),
);
}
}
Function Calls
None |
Stats
MD5 | 75096fe4524de68eeb27daf78a88789a |
Eval Count | 0 |
Decode Time | 74 ms |