コード例 #1
0
 protected function validate()
 {
     foreach ($this->getSchema() as $key => $value) {
         $current = $this->get($key);
         if ($current instanceof EntityInterface) {
             $current->validate();
         } else {
             Tools::validate($key, $current, $value, $this->isRequired($key), $this->getCalledEntityName());
         }
     }
     return true;
 }
コード例 #2
0
ファイル: ToolsTest.php プロジェクト: braising/stelo-for-wc
 public function testSucessoComUsoDeDadosValidos()
 {
     $this->assertTrue(Tools::validate('foo', 3456, 'integer', true));
 }