Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[Validator] added a Metadata factory that can be used with ValidatorI…

…nterface::validateValue()
  • Loading branch information...
commit 9f84ee11f1a7ae8adfeaaaf4d6382de94aa50fca 1 parent 47cb866
Fabien Potencier fabpot authored

Showing 1 changed file with 25 additions and 0 deletions. Show diff stats Hide diff stats

  1. +25 0 Mapping/BlackholeMetadataFactory.php
25 Mapping/BlackholeMetadataFactory.php
... ... @@ -0,0 +1,25 @@
  1 +<?php
  2 +
  3 +/*
  4 + * This file is part of the Symfony package.
  5 + *
  6 + * (c) Fabien Potencier <fabien@symfony.com>
  7 + *
  8 + * For the full copyright and license information, please view the LICENSE
  9 + * file that was distributed with this source code.
  10 + */
  11 +
  12 +namespace Symfony\Component\Validator\Mapping;
  13 +
  14 +/**
  15 + * Simple implementation of ClassMetadataFactoryInterface that can be used when using ValidatorInterface::validateValue().
  16 + *
  17 + * @author Fabien Potencier <fabien@symfony.com>
  18 + */
  19 +class BlackholeMetadataFactory implements ClassMetadataFactoryInterface
  20 +{
  21 + public function getClassMetadata($class)
  22 + {
  23 + throw new \LogicException('BlackholeClassMetadataFactory only works with ValidatorInterface::validateValue().');
  24 + }
  25 +}

0 comments on commit 9f84ee1

Please sign in to comment.
Something went wrong with that request. Please try again.