get() public method

Returns the requested item
public get ( string $name ) : mixed
$name string
return mixed
示例#1
0
 /**
  * {@inheritdoc}
  */
 public function validate(ValidationData $data)
 {
     if ($data->has($this->getName())) {
         return $this->getValue() === $data->get($this->getName());
     }
     return true;
 }
示例#2
0
 /**
  * {@inheritdoc}
  */
 public function validate(ValidationData $data) : bool
 {
     if ($data->has($this->getName())) {
         return in_array($data->get($this->getName()), $this->getValue());
     }
     return true;
 }