@author The Whole Life To Learn <thewholelifetolearn@gmail.com>
Expanded class hierarchy of Isbn
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',
));
}
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Constraint:: |
public | property | ||
Constraint:: |
public | function | Adds the given group if this constraint is in the Default group | |
Constraint:: |
constant | Marks a constraint that can be put onto classes | ||
Constraint:: |
constant | The name of the group given to all constraints with no explicit group | ||
Constraint:: |
public | function | Returns the name of the default option | 12 |
Constraint:: |
public | function | Returns the name of the required options | 10 |
Constraint:: |
public | function | Returns whether the constraint can be put onto classes, properties or both | 7 |
Constraint:: |
constant | Marks a constraint that can be put onto properties | ||
Constraint:: |
public | function | Returns the name of the class that validates this constraint | 2 |
Constraint:: |
public | function | Unsupported operation. | |
Isbn:: |
public | property | ||
Isbn:: |
public | property | ||
Isbn:: |
public | property | ||
Isbn:: |
public | property | ||
Isbn:: |
public | property | ||
Isbn:: |
public | function |
Initializes the constraint with options. Overrides Constraint:: |