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


PHP api_expose_admin函数代码示例

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


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

示例1: api_bind

<?php

namespace shop\shipping\gateways\country;

api_bind('shop/shipping/gateways/country/shipping_to_country/test', 'shop/shipping/gateways/country/shipping_to_country/test2');
// print('shop/shipping/gateways/country/shipping_to_country/test'. 'shop/shipping/gateways/country/shipping_to_country/test2');
api_expose_admin('shop/shipping/gateways/country/shipping_to_country/save');
api_expose('shop/shipping/gateways/country/shipping_to_country/set');
api_expose('shop/shipping/gateways/country/shipping_to_country/get');
api_expose_admin('shop/shipping/gateways/country/shipping_to_country/delete');
api_expose_admin('shop/shipping/gateways/country/shipping_to_country/reorder');
class shipping_to_country
{
    // singleton instance
    public $table;
    public $app;
    // private constructor function
    // to prevent external instantiation
    function __construct($app = false)
    {
        $this->table = 'cart_shipping';
        if (!is_object($this->app)) {
            if (is_object($app)) {
                $this->app = $app;
            } else {
                $this->app = mw();
            }
        }
    }
    function get_cost()
    {
开发者ID:kamilmiesiac,项目名称:microweber,代码行数:31,代码来源:shipping_to_country.php

示例2: mw_error

//function captcha_url($params=false)
//{
//	return Microweber\Utils\Captcha::url($params);
//}
function mw_error($e, $f = false, $l = false)
{
    $f = mw_includes_path() . 'error.php';
    $v = new \Microweber\View($f);
    $v->e = $e;
    $v->f = $f;
    $v->l = $l;
    die($v);
}
api_expose_admin('mw_composer_save_package');
function mw_composer_save_package($params)
{
    $update_api = mw('update');
    return $update_api->composer_save_package($params);
}
api_expose_admin('mw_composer_run_update');
function mw_composer_run_update($params)
{
    $update_api = mw('update');
    return $update_api->composer_run($params);
}
api_expose_admin('mw_composer_replace_vendor_from_cache');
function mw_composer_replace_vendor_from_cache($params)
{
    $update_api = mw('update');
    return $update_api->composer_replace_vendor_from_cache($params);
}
开发者ID:newaltcoin,项目名称:microweber,代码行数:31,代码来源:other.php

示例3: delete_menu_item

function delete_menu_item($id)
{
    return mw()->menu_manager->menu_item_delete($id);
}
function get_menu_item($id)
{
    return mw()->menu_manager->menu_item_get($id);
}
api_expose_admin('edit_menu_item');
function edit_menu_item($data_to_save)
{
    return mw()->menu_manager->menu_item_save($data_to_save);
}
api_expose_admin('reorder_menu_items');
function reorder_menu_items($data)
{
    return mw()->menu_manager->menu_items_reorder($data);
}
function menu_tree($menu_id = false, $maxdepth = false)
{
    return mw()->menu_manager->menu_tree($menu_id, $maxdepth);
}
function is_in_menu($menu_id = false, $content_id = false)
{
    return mw()->menu_manager->is_in_menu($menu_id, $content_id);
}
api_expose_admin('add_content_to_menu');
function add_content_to_menu($content_id, $menu_id = false)
{
    return mw()->content_manager->add_content_to_menu($content_id, $menu_id);
}
开发者ID:hyrmedia,项目名称:microweber,代码行数:31,代码来源:menus.php

示例4: api_expose_admin

api_expose_admin('get_order_by_id');
api_expose_admin('checkout_confirm_email_test');
api_expose_admin('delete_client');
api_expose_admin('delete_order');
api_expose_admin('update_order');
api_expose_admin('shop/update_order', function ($data) {
    return mw()->shop_manager->update_order($data);
});
api_expose_admin('shop/save_tax_item', function ($data) {
    return mw()->tax_manager->save($data);
});
api_expose_admin('shop/delete_tax_item', function ($data) {
    return mw()->tax_manager->delete_by_id($data);
});
api_expose_admin('shop/export_orders', function ($data) {
    return mw()->order_manager->export_orders($data);
});
// media
api_expose('delete_media_file');
api_expose('upload_progress_check');
api_expose('upload');
api_expose('reorder_media');
api_expose('delete_media');
api_expose('save_media');
api_expose('pixum_img');
api_expose('thumbnail_img');
api_expose('create_media_dir');
api_expose('media/upload');
api_expose('media/delete_media_file');
// queue
api_expose('queue_dispatch', function () {
开发者ID:microweber,项目名称:microweber,代码行数:31,代码来源:api_callbacks.php

示例5: api_expose_admin

<?php

namespace Microweber\Providers;

use DB;
//event_bind('mw_db_init_default', mw()->shop_manager->db_init());
/**
 *
 * Shop module api
 *
 * @package           modules
 * @subpackage        shop
 * @since             Version 0.1
 */
// ------------------------------------------------------------------------
api_expose_admin('shop/update_order');
class ShopManager
{
    public $app;
    public $tables = array();
    public $table_prefix = false;
    public $no_cache = false;
    function __construct($app = null)
    {
        if (is_object($app)) {
            $this->app = $app;
        } else {
            $this->app = mw();
        }
        $this->set_table_names();
    }
开发者ID:apsolut,项目名称:microweber,代码行数:31,代码来源:ShopManager.php

示例6: api_expose

api_expose('cart_sum');
api_expose('checkout');
api_expose('checkout_ipn');
api_expose('currency_format');
api_expose('empty_cart');
api_expose('payment_options');
api_expose('remove_cart_item');
api_expose('update_cart');
api_expose('update_cart_item_qty');
api_expose_admin('get_cart');
api_expose_admin('get_orders');
api_expose_admin('get_order_by_id');
api_expose_admin('checkout_confirm_email_test');
api_expose_admin('delete_client');
api_expose_admin('delete_order');
api_expose_admin('update_order');
api_bind_admin('shop/update_order', function ($data) {
    return mw()->shop_manager->update_order($data);
});
// media
api_expose('delete_media_file');
api_expose('upload_progress_check');
api_expose('upload');
api_expose('reorder_media');
api_expose('delete_media');
api_expose('save_media');
api_expose('pixum_img');
api_expose('thumbnail_img');
api_expose('create_media_dir');
api_expose('media/upload');
api_expose('media/delete_media_file');
开发者ID:kamilmiesiac,项目名称:microweber,代码行数:31,代码来源:api_callbacks.php

示例7: get_user

 *
 * @author   Microweber
 *
 * @link     http://microweber.com
 *
 * @param bool $id
 *
 *
 * @return array
 */
function get_user($id = false)
{
    return mw()->user_manager->get($id);
}
api_expose_admin('users/register_email_send_test', function () {
    mw()->option_manager->override('users', 'register_email_enabled', true);
    return mw()->user_manager->register_email_send();
});
api_expose('users/register_email_send', function () {
    return mw()->user_manager->register_email_send();
});
api_expose('users/verify_email_link', function ($params) {
    if (isset($params['key'])) {
        try {
            $decoded = mw()->format->decrypt($params['key']);
            if ($decoded) {
                $decoded = intval($decoded);
                $adminUser = \User::findOrFail($decoded);
                $adminUser->is_verified = 1;
                $adminUser->save();
                mw()->cache_manager->delete('users/global');
                mw()->cache_manager->delete('users/' . $decoded);
开发者ID:microweber,项目名称:microweber,代码行数:32,代码来源:user.php

示例8: api_expose_admin

<?php

namespace Microweber\Utils;

$_mw_email_transport_object = false;
api_expose_admin('Microweber/Utils/MailSender/test');
use Config;
use View;
class MailSender
{
    public $transport = false;
    public $debug = false;
    public $email_from = false;
    public $email_from_name = false;
    public $cc = false;
    public $smtp_host = false;
    public $smtp_port = false;
    public $smtp_username = false;
    public $smtp_password = false;
    public $smtp_auth = false;
    public $smtp_secure = false;
    private $here = false;
    function __construct()
    {
        $views = MW_PATH . 'Views' . DS;
        View::addNamespace('mw_email_send', $views);
        $email_from = mw()->option_manager->get('email_from_name', 'email');
        if ($email_from == false or trim($email_from) == '') {
            $email_from = getenv("USERNAME");
        }
        $this->email_from_name = $email_from;
开发者ID:kamilmiesiac,项目名称:microweber,代码行数:31,代码来源:MailSender.php

示例9: api_expose_admin

api_expose_admin('uninstall_module');
function uninstall_module($params)
{
    return mw()->modules->uninstall($params);
}
//event_bind('mw_db_init_modules', 're_init_modules_db');
function re_init_modules_db()
{
    //return mw()->modules->update_db();
}
api_expose_admin('install_module');
function install_module($params)
{
    return mw()->modules->set_installed($params);
}
function save_module_to_db($data_to_save)
{
    return mw()->modules->save($data_to_save);
}
function get_saved_modules_as_template($params)
{
    return mw()->modules->get_saved_modules_as_template($params);
}
api_expose_admin('delete_module_as_template');
function delete_module_as_template($data)
{
    return mw()->modules->delete_module_as_template($data);
}
api_bind_admin('module/reorder_modules', function ($data) {
    return mw()->modules->reorder_modules($data);
});
开发者ID:hyrmedia,项目名称:microweber,代码行数:31,代码来源:modules.php

示例10: mw_is_installed

function mw_is_installed()
{
    static $is = null;
    if ($is === null) {
        $is = Config::get('microweber.is_installed');
    }
    return (bool) $is;
}
api_expose_admin('mw_save_framework_config_file', function ($params) {
    if (empty($params) or !is_admin()) {
        return;
    }
    $save_configs = array();
    foreach ($params as $k => $item) {
        if (is_array($item) and !empty($item)) {
            foreach ($item as $config_k => $config) {
                if (is_string($config_k)) {
                    if (is_numeric($config)) {
                        $config = intval($config);
                    }
                    Config::set($k . '.' . $config_k, $config);
                    $save_configs[] = $k;
                }
            }
        }
    }
    if (!empty($save_configs)) {
        Config::save($save_configs);
    }
});
开发者ID:microweber,项目名称:microweber,代码行数:30,代码来源:config.php

示例11: cache_save

 * @param mixed $data_to_cache
 *                                      your data, anything that can be serialized
 * @param string $cache_id
 *                                      id of the cache, you must define it because you will use it later to
 *                                      retrieve the cached content.
 * @param string $cache_group
 *                                      (default is 'global') - this is the subfolder in the cache dir.
 * @param bool $expiration_in_seconds
 *
 * @return bool
 */
function cache_save($data_to_cache, $cache_id, $cache_group = 'global', $expiration = false)
{
    return mw()->cache_manager->save($data_to_cache, $cache_id, $cache_group, $expiration);
}
api_expose_admin('clearcache');
/**
 * Clears all cache data.
 *
 * @example
 *          <code>
 *          //delete all cache
 *          clearcache();
 *          </code>
 *
 * @return bool
 */
function clearcache()
{
    mw()->cache_manager->clear();
    mw()->template->clear_cache();
开发者ID:microweber,项目名称:microweber,代码行数:31,代码来源:common.php

示例12: define

<?php

if (!defined("MODULE_DB_COMMENTS")) {
    define('MODULE_DB_COMMENTS', 'comments');
}
/**
 * mark_comments_as_old
 */
api_expose_admin('mark_comments_as_old');
function mark_comments_as_old($data)
{
    if (isset($data['content_id'])) {
        $table = MODULE_DB_COMMENTS;
        mw_var('FORCE_SAVE', $table);
        $data['is_new'] = 1;
        $get_comm = get_comments($data);
        if (!empty($get_comm)) {
            foreach ($get_comm as $get_com) {
                $upd = array();
                $upd['is_new'] = 0;
                $upd['id'] = $get_com['id'];
                $upd['rel_type'] = 'content';
                $upd['rel_id'] = mw()->database_manager->escape_string($data['content_id']);
                mw()->database_manager->save($table, $upd);
            }
        }
        return $get_comm;
    }
}
/**
 * post_comment
开发者ID:Git-Host,项目名称:microweber,代码行数:31,代码来源:functions.php

示例13: api_expose_admin

<?php

namespace admin\developer_tools\media_cleanup;

use Illuminate\Cache\tags;
use Illuminate\Support\Facades\Cache;
use ZipArchive;
use RecursiveIteratorIterator;
use RecursiveDirectoryIterator;
api_expose_admin('admin/developer_tools/media_cleanup/Worker/create_batch');
class Worker
{
    public $app;
    public $cache_group = 'media_cleanup_worker';
    function __construct($app = null)
    {
        if (is_object($app)) {
            $this->app = $app;
        } else {
            $this->app = mw();
        }
    }
    public function create_batch()
    {
        $work = array();
        $work['total'] = mw()->media_manager->get_all('count=1');
        $work['remaining'] = mw()->media_manager->get_all('count=1');
        mw()->cache_manager->save($work, 'create_batch', $this->cache_group);
        return $work;
    }
    public function run()
开发者ID:hyrmedia,项目名称:microweber,代码行数:31,代码来源:Worker.php

示例14: mw

    return mw()->content_manager->copy($data);
});
api_bind_admin('current_template_save_custom_css', function ($data) {
    return mw()->layouts_manager->template_save_css($data);
});
// SHOP
api_expose_admin('delete_client');
api_expose_admin('update_order');
api_expose('empty_cart');
api_expose('update_cart');
api_expose_admin('delete_order');
api_expose('checkout_ipn');
api_expose('checkout');
api_expose('remove_cart_item');
api_expose('update_cart_item_qty');
api_bind_admin('shop/update_order', function ($data) {
    return mw()->shop_manager->update_order($data);
});
api_expose_admin('checkout_confirm_email_test');
// media
api_expose('delete_media_file');
api_expose('upload_progress_check');
api_expose('upload');
api_expose('reorder_media');
api_expose('delete_media');
api_expose('save_media');
api_expose('pixum_img');
api_expose('thumbnail_img');
api_expose('create_media_dir');
api_expose('media/upload');
api_expose('media/delete_media_file');
开发者ID:Git-Host,项目名称:microweber,代码行数:31,代码来源:api_callbacks.php

示例15: api_expose_admin

 *
 * @package utils
 */
namespace Microweber\Utils;

use ZipArchive;
use RecursiveIteratorIterator;
use RecursiveDirectoryIterator;
api_expose_admin('Microweber\\Utils\\Import\\delete');
api_expose_admin('Microweber\\Utils\\Import\\create');
api_expose_admin('Microweber\\Utils\\Import\\download');
api_expose_admin('Microweber\\Utils\\Import\\create_full');
api_expose_admin('Microweber\\Utils\\Import\\move_uploaded_file_to_import');
api_expose_admin('Microweber\\Utils\\Import\\restore');
api_expose_admin('Microweber\\Utils\\Import\\export');
api_expose_admin('Microweber\\Utils\\Import\\batch_process');
class Import
{
    public $import_to_page_id = false;
    public $imports_folder = false;
    public $import_file = false;
    public $app;
    public $batch_size = 5;
    public $xml_paths = array('channel' => 'item', 'feed' => 'entry', 'feed' => 'post_item', 'records' => 'record');
    /**
     * The import class is used for making or restoring exported files from other CMS
     *
     * @category  mics
     * @package   utils
     */
    private $file_q_sep = '; /* MW_QUERY_SEPERATOR */';
开发者ID:newaltcoin,项目名称:microweber,代码行数:31,代码来源:Import.php


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