You are here

class Entity in Plug 7

Same name in this branch
  1. 7 lib/Symfony/validator/Symfony/Component/Validator/Tests/Fixtures/Entity.php \Symfony\Component\Validator\Tests\Fixtures\Entity
  2. 7 lib/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/_files/annotation/TestClass.php \Doctrine\Entity

@Symfony\Component\Validator\Tests\Fixtures\ConstraintA @Assert\GroupSequence({"Foo", "Entity"}) @Assert\Callback({"Symfony\Component\Validator\Tests\Fixtures\CallbackClass", "callback"})

Hierarchy

Expanded class hierarchy of Entity

7 files declare their use of Entity
Abstract2Dot5ApiTest.php in lib/Symfony/validator/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php
AbstractLegacyApiTest.php in lib/Symfony/validator/Symfony/Component/Validator/Tests/Validator/AbstractLegacyApiTest.php
AbstractValidatorTest.php in lib/Symfony/validator/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php
ExpressionValidatorTest.php in lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/ExpressionValidatorTest.php
GetterMetadataTest.php in lib/Symfony/validator/Symfony/Component/Validator/Tests/Mapping/GetterMetadataTest.php

... See full list

19 string references to 'Entity'
Abstract2Dot5ApiTest::testGroupSequenceIncludesReferences in lib/Symfony/validator/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php
AbstractValidatorTest::testPropagateDefaultGroupToReferenceWhenReplacingDefaultGroup in lib/Symfony/validator/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php
AbstractValidatorTest::testReplaceDefaultGroupByGroupSequenceArray in lib/Symfony/validator/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php
AbstractValidatorTest::testReplaceDefaultGroupByGroupSequenceObject in lib/Symfony/validator/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php
AbstractValidatorTest::testReplaceDefaultGroupWithArrayFromGroupSequenceProvider in lib/Symfony/validator/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php

... See full list

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/Fixtures/Entity.php, line 22

Namespace

Symfony\Component\Validator\Tests\Fixtures
View source
class Entity extends EntityParent implements EntityInterface {

  /**
   * @Assert\NotNull
   * @Assert\Range(min=3)
   * @Assert\All({@Assert\NotNull, @Assert\Range(min=3)}),
   * @Assert\All(constraints={@Assert\NotNull, @Assert\Range(min=3)})
   * @Assert\Collection(fields={
   *   "foo" = {@Assert\NotNull, @Assert\Range(min=3)},
   *   "bar" = @Assert\Range(min=5)
   * })
   * @Assert\Choice(choices={"A", "B"}, message="Must be one of %choices%")
   */
  public $firstName;
  protected $lastName;
  public $reference;
  public $reference2;
  private $internal;
  public $data = 'Overridden data';
  public $initialized = false;
  public function __construct($internal = null) {
    $this->internal = $internal;
  }
  public function getInternal() {
    return $this->internal . ' from getter';
  }
  public function setLastName($lastName) {
    $this->lastName = $lastName;
  }

  /**
   * @Assert\NotNull
   */
  public function getLastName() {
    return $this->lastName;
  }

  /**
   * @Assert\IsTrue
   */
  public function isValid() {
    return 'valid';
  }

  /**
   * @Assert\IsTrue
   */
  public function hasPermissions() {
    return 'permissions';
  }
  public function getData() {
    return 'Overridden data';
  }

  /**
   * @Assert\Callback
   */
  public function validateMe(ExecutionContextInterface $context) {
  }

  /**
   * @Assert\Callback
   */
  public static function validateMeStatic($object, ExecutionContextInterface $context) {
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Entity::$data public property Overrides EntityParent::$data
Entity::$firstName public property @Assert\NotNull @Assert\Range(min=3) @Assert\All({@Assert\NotNull, @Assert\Range(min=3)}), @Assert\All(constraints={@Assert\NotNull, @Assert\Range(min=3)}) @Assert\Collection(fields={ "foo" = {@Assert\NotNull,… Overrides EntityParent::$firstName
Entity::$initialized public property
Entity::$internal private property Overrides EntityParent::$internal
Entity::$lastName protected property
Entity::$reference public property
Entity::$reference2 public property
Entity::getData public function Overrides EntityParent::getData
Entity::getInternal public function
Entity::getLastName public function @Assert\NotNull
Entity::hasPermissions public function @Assert\IsTrue
Entity::isValid public function @Assert\IsTrue
Entity::setLastName public function
Entity::validateMe public function @Assert\Callback
Entity::validateMeStatic public static function @Assert\Callback
Entity::__construct public function
EntityParent::$other protected property @NotNull