This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/tests/Symfony/Tests/Component/Validator/Fixtures/Entity.php

51 lines
1.2 KiB
PHP

<?php
namespace Symfony\Tests\Component\Validator\Fixtures;
require_once __DIR__.'/EntityParent.php';
require_once __DIR__.'/EntityInterface.php';
/**
* @Symfony\Tests\Component\Validator\Fixtures\ConstraintA
* @validation:GroupSequence({"Foo", "Entity"})
*/
class Entity extends EntityParent implements EntityInterface
{
/**
* @validation:NotNull
* @validation:Min(3)
* @validation:Set({
* @validation:All({@validation:NotNull, @validation:Min(3)}),
* @validation:All(constraints={@validation:NotNull, @validation:Min(3)})
* })
* @validation:Collection(fields={
* "foo" = {@validation:NotNull, @validation:Min(3)},
* "bar" = @validation:Min(5)
* })
* @validation:Choice(choices={"A", "B"}, message="Must be one of %choices%")
*/
protected $firstName;
protected $lastName;
public $reference;
private $internal;
public function __construct($internal = null)
{
$this->internal = $internal;
}
public function getInternal()
{
return $this->internal . ' from getter';
}
/**
* @validation:NotNull
*/
public function getLastName()
{
return $this->lastName;
}
}