本文整理汇总了PHP中Respect\Validation\Validator::arrayType方法的典型用法代码示例。如果您正苦于以下问题:PHP Validator::arrayType方法的具体用法?PHP Validator::arrayType怎么用?PHP Validator::arrayType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Respect\Validation\Validator
的用法示例。
在下文中一共展示了Validator::arrayType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
public function delete()
{
$post = $this->FORM->trim($this->input->post('data'));
$this->MSG->transbegin();
try {
v::arrayType()->notEmpty()->assert($post);
} catch (vn $exception) {
$this->MSG->showmsg(nl2br($exception->getFullMessage()));
}
$files = [];
foreach ($post as $d) {
$rs = $this->db->query('SELECT * FROM product WHERE name = ?', [$d['name']])->row_array();
$this->db->query('DELETE FROM product WHERE name = ?', [$d['name']]);
$files[] = dfUploadDirPath . $rs['pic1'];
$files[] = dfUploadDirPath . $rs['pic2'];
}
$this->MSG->showmsg('success', TRUE);
@array_map('unlink', $files);
}
示例2: delete
public function delete()
{
$post = $this->FORM->trim($this->input->post('data'));
$this->MSG->transbegin();
try {
v::arrayType()->notEmpty()->assert($post);
} catch (vn $exception) {
$this->MSG->showmsg(nl2br($exception->getFullMessage()));
}
$defaultclassgroup = $this->ADM->getSetting('Default ClassGroup');
foreach ($post as $d) {
if ($d['groupname'] == $defaultclassgroup) {
$this->MSG->showmsg('Not Available');
}
}
foreach ($post as $d) {
$this->db->query('DELETE FROM ' . dfWebSchema . 'classgroup WHERE groupname = ?', array($d['groupname']));
$this->db->query('DELETE FROM ' . dfWebSchema . 'classgroupbindaccount WHERE groupname = ?', array($d['groupname']));
}
$this->MSG->showmsg('success', TRUE);
}
示例3: delete
public function delete()
{
$post = $this->FORM->trim($this->input->post('data'));
$this->MSG->transbegin();
try {
v::arrayType()->notEmpty()->assert($post);
} catch (vn $exception) {
$this->MSG->showmsg(nl2br($exception->getFullMessage()));
}
foreach ($post as $d) {
$this->db->query('DELETE FROM ' . dfWebSchema . 'setting WHERE name = ?', array($d['name']));
}
$this->MSG->showmsg('success', TRUE);
}