class Isbn

@author The Whole Life To Learn <thewholelifetolearn@gmail.com>

Hierarchy

  • class \Symfony\Component\Validator\Constraint
    • class \Symfony\Component\Validator\Constraints\Isbn

Expanded class hierarchy of Isbn

1 file declares its use of Isbn
IsbnValidatorTest.php in drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Constraints/Isbn.php, line 22

Namespace

Symfony\Component\Validator\Constraints
View source
class Isbn extends Constraint {
  public $isbn10Message = 'This value is not a valid ISBN-10.';
  public $isbn13Message = 'This value is not a valid ISBN-13.';
  public $bothIsbnMessage = 'This value is neither a valid ISBN-10 nor a valid ISBN-13.';
  public $isbn10;
  public $isbn13;
  public function __construct($options = null) {
    if (null !== $options && !is_array($options)) {
      $options = array(
        'isbn10' => $options,
        'isbn13' => $options,
      );
    }
    parent::__construct($options);
    if (null === $this->isbn10 && null === $this->isbn13) {
      throw new MissingOptionsException(sprintf('Either option "isbn10" or "isbn13" must be given for constraint "%s".', __CLASS__), array(
        'isbn10',
        'isbn13',
      ));
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Constraint::$groups public property
Constraint::addImplicitGroupName public function Adds the given group if this constraint is in the Default group
Constraint::CLASS_CONSTRAINT constant Marks a constraint that can be put onto classes
Constraint::DEFAULT_GROUP constant The name of the group given to all constraints with no explicit group
Constraint::getDefaultOption public function Returns the name of the default option 12
Constraint::getRequiredOptions public function Returns the name of the required options 10
Constraint::getTargets public function Returns whether the constraint can be put onto classes, properties or both 7
Constraint::PROPERTY_CONSTRAINT constant Marks a constraint that can be put onto properties
Constraint::validatedBy public function Returns the name of the class that validates this constraint 2
Constraint::__set public function Unsupported operation.
Isbn::$bothIsbnMessage public property
Isbn::$isbn10 public property
Isbn::$isbn10Message public property
Isbn::$isbn13 public property
Isbn::$isbn13Message public property
Isbn::__construct public function Initializes the constraint with options. Overrides Constraint::__construct