XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
Legacy_Validator.class.php
1<?php
10
11if (!defined('XOOPS_ROOT_PATH')) {
12 exit();
13}
14
15require_once XOOPS_ROOT_PATH . '/core/XCube_Validator.class.php';
16
18{
19 public function isValid(&$form, $vars)
20 {
21 if ($form->isNull()) {
22 return true;
23 } else {
24 $handleName = $vars['handler'];
25 $moduleName = $vars['module'] ?? null;
26
27 if (null == $moduleName) {
28 $handler =& xoops_gethandler($handleName);
29 } else {
30 $handler =& xoops_getmodulehandler($handleName, $moduleName);
31 }
32 $obj =& $handler->get($form->getValue());
33
34 return is_object($obj);
35 }
36 }
37}