当前位置: 首页>>代码示例>>PHP>>正文


PHP Validator::arrayType方法代码示例

本文整理汇总了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);
 }
开发者ID:slion0725,项目名称:admin_ci303,代码行数:19,代码来源:product.php

示例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);
 }
开发者ID:slion0725,项目名称:admin_ci303,代码行数:21,代码来源:classgroup.php

示例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);
 }
开发者ID:slion0725,项目名称:admin_ci303,代码行数:14,代码来源:setting.php


注:本文中的Respect\Validation\Validator::arrayType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。