當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。