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


PHP mw函数代码示例

本文整理汇总了PHP中mw函数的典型用法代码示例。如果您正苦于以下问题:PHP mw函数的具体用法?PHP mw怎么用?PHP mw使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: fire

 public function fire()
 {
     $input = array('option_key' => $this->argument('option_key'), 'option_value' => $this->argument('option_value'), 'option_group' => $this->argument('option_group'));
     $this->info('Setting option...');
     $result = mw()->option_manager->save($input);
     $this->info($result);
 }
开发者ID:microweber,项目名称:microweber,代码行数:7,代码来源:OptionCommand.php

示例2: __construct

 function __construct($app = null)
 {
     if (!is_object($app)) {
         $this->app = mw();
     } else {
         $this->app = $app;
     }
 }
开发者ID:hyrmedia,项目名称:microweber,代码行数:8,代码来源:Parser.php

示例3: get_custom_fields

function get_custom_fields($table, $id = 0, $return_full = false, $field_for = false, $debug = false, $field_type = false, $for_session = false)
{
    if (isset($table) and intval($table) > 0) {
        $id = intval(intval($table));
        $table = 'content';
    }
    return mw()->fields_manager->get($table, $id, $return_full, $field_for, $debug, $field_type, $for_session);
}
开发者ID:Git-Host,项目名称:microweber,代码行数:8,代码来源:custom_fields.php

示例4: run

 public function run()
 {
     Cache::flush();
     $this->createSchema();
     $this->seed();
     Cache::flush();
     mw()->modules->install();
 }
开发者ID:kamilmiesiac,项目名称:microweber,代码行数:8,代码来源:DbInstaller.php

示例5: mw_print_admin_menu_settings_btn

function mw_print_admin_menu_settings_btn()
{
    $active = mw()->url_manager->param('view');
    $cls = '';
    if ($active == 'settings') {
        $cls = ' class="active" ';
    }
    print '<li' . $cls . '><a href="' . admin_url() . 'view:settings" title="' . _e("Settings", true) . '"><i class="ico inavsettings"></i><span>' . _e("Settings", true) . '</span></a></li>';
}
开发者ID:hyrmedia,项目名称:microweber,代码行数:9,代码来源:functions.php

示例6: __construct

 public function __construct($app = null)
 {
     if (is_object($app)) {
         $this->app = $app;
     } else {
         $this->app = mw();
     }
     $this->set_table_names();
 }
开发者ID:microweber,项目名称:microweber,代码行数:9,代码来源:ContentManagerCrud.php

示例7: hasNoAdmin

 private function hasNoAdmin()
 {
     if (!$this->checkServiceConfig()) {
         $this->registerMwClient();
     }
     if (mw()->url_manager->param('mw_install_create_user')) {
         $this->execCreateAdmin();
     }
 }
开发者ID:newaltcoin,项目名称:microweber,代码行数:9,代码来源:AdminController.php

示例8: __construct

 function __construct($app = null)
 {
     $this->set_table_names();
     if (is_object($app)) {
         $this->app = $app;
     } else {
         $this->app = mw();
     }
     $this->socialite = new SocialiteManager($this->app);
 }
开发者ID:kamilmiesiac,项目名称:microweber,代码行数:10,代码来源:UserManager.php

示例9: __construct

 public function __construct($app)
 {
     if (!is_object($this->app)) {
         if (is_object($app)) {
             $this->app = $app;
         } else {
             $this->app = mw();
         }
     }
     $this->app->database_manager->build_table($this->table, $this->fields);
 }
开发者ID:hyrmedia,项目名称:microweber,代码行数:11,代码来源:Model.php

示例10: __construct

 function __construct($app = null)
 {
     if (!is_object($this->app)) {
         if (is_object($app)) {
             $this->app = $app;
         } else {
             $this->app = mw();
         }
     }
     $this->adapter_current = $this->adapter_default = new MicroweberTemplate($app);
 }
开发者ID:kamilmiesiac,项目名称:microweber,代码行数:11,代码来源:Template.php

示例11: __construct

 function __construct($app = null)
 {
     if (!is_object($this->app)) {
         if (is_object($app)) {
             $this->app = $app;
         } else {
             $this->app = mw();
         }
     }
     $this->adapter = new LaravelCache($app);
 }
开发者ID:hyrmedia,项目名称:microweber,代码行数:11,代码来源:CacheManager.php

示例12: testSave

 public function testSave()
 {
     mw()->database_manager->extended_save_set_permission(true);
     $has_permission = mw()->database_manager->extended_save_has_permission();
     $params = array('title' => 'My post with data fields', 'content_type' => 'post', 'data_hi_there' => 'hello world', 'is_active' => 1);
     //saving
     $id = save_content($params);
     $data_fields = content_data($id);
     $this->assertEquals(intval($id) > 0, true);
     $this->assertEquals($data_fields['hi_there'], "hello world");
     $this->assertEquals(true, $has_permission);
 }
开发者ID:hyrmedia,项目名称:microweber,代码行数:12,代码来源:DataFieldsTest.php

示例13: testSaveDataFields

 public function testSaveDataFields()
 {
     mw()->database_manager->extended_save_set_permission(true);
     $val = 'hello there custom 1-' . rand();
     $val2 = 'hello there custom 2-' . rand();
     $params = array('title' => 'My post with data attributes 1', 'content_type' => 'post', 'data_fields_something_custom' => $val, 'data_fields_something_else_custom' => $val2, 'is_active' => 1);
     $id = save_content($params);
     $attributes = content_data($id);
     $this->assertEquals(intval($id) > 0, true);
     $this->assertEquals($attributes['something_custom'], $val);
     $this->assertEquals($attributes['something_else_custom'], $val2);
 }
开发者ID:microweber,项目名称:microweber,代码行数:12,代码来源:DataFieldsTest.php

示例14: delete

 function delete($data)
 {
     $adm = is_admin();
     if ($adm == false) {
         error('Error: not logged in as admin.' . __FILE__ . __LINE__);
     }
     if (isset($data['id'])) {
         $c_id = intval($data['id']);
         mw()->database_manager->delete_by_id($this->table, $c_id);
         //d($c_id);
     }
 }
开发者ID:newaltcoin,项目名称:microweber,代码行数:12,代码来源:shipping_api.php

示例15: __construct

 function __construct($app = null)
 {
     if (!is_object($this->app)) {
         if (is_object($app)) {
             $this->app = $app;
         } else {
             $this->app = mw();
         }
     }
     if (!is_object($this->adapter)) {
         $this->adapter = new Adapters\Http\Guzzle($app);
     }
 }
开发者ID:hyrmedia,项目名称:microweber,代码行数:13,代码来源:Http.php


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