예제 #1
0
 /**
  * @param $chartType
  * @return bool
  * @throws TypeNotValidException
  */
 public function chartTypeIsValid($chartType)
 {
     $validator = new ExistenceValidator();
     $validator->setLimits(["Existence" => $this->chartOptions]);
     $validator->setObject($chartType);
     return $validator->validate();
 }
예제 #2
0
 /**
  * @param $connectionName
  * @return bool
  * @throws ValidationFailedException
  * @throws \QCharts\CoreBundle\Exception\TypeNotValidException
  */
 public function validateConnection($connectionName)
 {
     $validator = new ExistenceValidator();
     $validator->setKeyComparison('Connection');
     $validator->setLimits(["Connection" => $this->dynamicRepo->getConnectionNames()]);
     $validator->setObject($connectionName);
     return $validator->validate();
 }