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


PHP Filter::create方法代码示例

本文整理汇总了PHP中Filter::create方法的典型用法代码示例。如果您正苦于以下问题:PHP Filter::create方法的具体用法?PHP Filter::create怎么用?PHP Filter::create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Filter的用法示例。


在下文中一共展示了Filter::create方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

 public function run()
 {
     DB::table('filters')->delete();
     $success = File::cleanDirectory($this->getImagesPath());
     File::put($this->getImagesPath() . '.gitignore', File::get(public_path() . '/../app/storage/cache/.gitignore'));
     Filter::create(['name' => 'Fitness', 'poi_url' => 'http://happyfist.co/pois/pois/POI/gyms.kml', 'text' => 'lorem', 'paragraph_title' => 'ipsum']);
     Filter::create(['name' => 'Lodging', 'poi_url' => 'http://happyfist.co/pois/pois/POI/hotels.kml', 'text' => 'lorem', 'paragraph_title' => 'ipsum']);
     Filter::create(['name' => 'Culture', 'poi_url' => 'http://happyfist.co/pois/pois/POI/artMuseums.kml', 'text' => 'lorem', 'paragraph_title' => 'ipsum']);
     Filter::create(['name' => 'Entertainment', 'poi_url' => 'http://happyfist.co/pois/pois/POI/nightlife.kml', 'text' => 'lorem', 'paragraph_title' => 'ipsum']);
     Filter::create(['name' => 'Dinning', 'poi_url' => 'http://happyfist.co/pois/pois/POI/restaurants.kml', 'text' => 'lorem', 'paragraph_title' => 'ipsum']);
     Filter::create(['name' => 'Education', 'poi_url' => 'http://happyfist.co/pois/pois/POI/schools.kml', 'text' => 'lorem', 'paragraph_title' => 'ipsum']);
     Filter::create(['name' => 'Retail', 'poi_url' => 'http://happyfist.co/pois/pois/POI/shop-and-specialities.kml', 'text' => 'lorem', 'paragraph_title' => 'ipsum']);
     Filter::create(['name' => 'Transportation', 'poi_url' => 'http://happyfist.co/pois/pois/POI/transit.kml', 'text' => 'lorem', 'paragraph_title' => 'ipsum']);
 }
开发者ID:rilence,项目名称:pacificSite,代码行数:14,代码来源:FiltersTableSeeder.php

示例2: header

if ($filter && $filter->isSystemBanlist()) {
    header('Location: banlist.php');
}
if ($_POST) {
    switch (strtolower($_POST['do'])) {
        case 'update':
            if (!$filter) {
                $errors['err'] = 'Unknown or invalid filter.';
            } elseif ($filter->update($_POST, $errors)) {
                $msg = 'Filter updated successfully';
            } elseif (!$errors['err']) {
                $errors['err'] = 'Error updating filter. Try again!';
            }
            break;
        case 'add':
            if (Filter::create($_POST, $errors)) {
                $msg = 'Filter added successfully';
                $_REQUEST['a'] = null;
            } elseif (!$errors['err']) {
                $errors['err'] = 'Unable to add filter. Correct error(s) below and try again.';
            }
            break;
        case 'mass_process':
            if (!$_POST['ids'] || !is_array($_POST['ids']) || !count($_POST['ids'])) {
                $errors['err'] = 'You must select at least one filter to process.';
            } else {
                $count = count($_POST['ids']);
                if ($_POST['enable']) {
                    $sql = 'UPDATE ' . EMAIL_FILTER_TABLE . ' SET isactive=1 WHERE id IN (' . implode(',', $_POST['ids']) . ')';
                    if (db_query($sql) && ($num = db_affected_rows())) {
                        if ($num == $count) {
开发者ID:nicolap,项目名称:osTicket-1.7,代码行数:31,代码来源:filters.php

示例3: createSystemBanList

 function createSystemBanList()
 {
     # XXX: Filter::create should return the ID!!!
     $errors = array();
     return Filter::create(array('execorder' => 99, 'name' => 'SYSTEM BAN LIST', 'isactive' => 1, 'match_all_rules' => false, 'reject_ticket' => true, 'rules' => array(), 'notes' => __('Internal list for email banning. Do not remove')), $errors);
 }
开发者ID:tirix,项目名称:osTicket-1.8,代码行数:6,代码来源:class.banlist.php

示例4: run

 public function run()
 {
     Filter::create(['name' => 'Employee MS Filter', 'active' => true]);
     Filter::create(['name' => 'Property MS Filter', 'active' => true]);
     Filter::create(['name' => 'Performance MS Filter', 'active' => true]);
 }
开发者ID:codeblues1516,项目名称:godaddy,代码行数:6,代码来源:FiltersTableSeeder.php


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