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


PHP Main::instance方法代码示例

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


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

示例1: getInstance

 public static function getInstance()
 {
     if (self::$instance == false) {
         self::$instance = new Main();
     }
     return self::$instance;
 }
开发者ID:RossWeb,项目名称:Wydatki,代码行数:7,代码来源:lib.php

示例2: getInstance

 public static function getInstance()
 {
     if (!Main::$instance) {
         Main::$instance = new Main();
     }
     return Main::$instance;
 }
开发者ID:zuozuoba,项目名称:zpf,代码行数:7,代码来源:Main.php

示例3: getInstance

 public static function getInstance()
 {
     if (!isset(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
开发者ID:gingifruden,项目名称:salty-lighty,代码行数:7,代码来源:Main.php

示例4: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     $this->plugin = Main::instance();
     // Register the menu page
     add_action('admin_menu', [$this, 'owl_submenu_page']);
     add_action('admin_init', [$this, 'display_settings_fields']);
     // Scripts
     add_action('wp_enqueue_scripts', [$this, 'enqueue_v2']);
     add_action('admin_enqueue_scripts', [$this, 'admin_enqueue']);
 }
开发者ID:evaristocolomby,项目名称:owl-carousel,代码行数:13,代码来源:class-admin.php

示例5: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     $this->plugin = Main::instance();
     // Initialize post type
     add_action('init', [$this, 'init_post_type']);
     // Add admin column
     add_action('manage_edit-owl-carousel_columns', [$this, 'owl_columnfilter']);
     add_action('manage_posts_custom_column', [$this, 'owl_column']);
     // Add functions to create a new attachments fields
     add_filter('attachment_fields_to_edit', [$this, 'owl_carousel_attachment_fields_to_edit'], null, 2);
     add_filter('attachment_fields_to_save', [$this, 'owl_carousel_attachment_fields_to_save'], null, 2);
 }
开发者ID:evaristocolomby,项目名称:owl-carousel,代码行数:15,代码来源:class-post-type.php

示例6: main

/**
 * Returns the main instance
 */
function main()
{
    return Main::instance();
}
开发者ID:evaristocolomby,项目名称:owl-carousel,代码行数:7,代码来源:init.php

示例7: and

<?php

namespace Fragen\Category_Colors;

/*
 * Setup variables for CSS generation.
 */
$teccc = Main::instance();
$options = Admin::fetch_options($teccc);
if (function_exists('tribe_get_mobile_breakpoint')) {
    $breakpoint = tribe_get_mobile_breakpoint();
}
?>

/* The Events Calendar Category Colors <?php 
echo Main::$version;
?>
 generated CSS */
.teccc-legend a, .tribe-events-calendar a, #tribe-events-content .tribe-events-tooltip h4
{
	font-weight: <?php 
esc_attr_e($options['font_weight']);
?>
;
}

.tribe-events-list .vevent.hentry h2 { padding-left: 5px; }

@media only screen and (max-width: <?php 
esc_attr_e($breakpoint);
?>
开发者ID:acutedeveloper,项目名称:havering-intranet-development,代码行数:31,代码来源:category.css.php

示例8: array_replace

                $this->__config = array_replace($this->__config, $new);
            }
        }
    }
    public function DBconfig($new = array())
    {
        foreach ($new as $key => $value) {
            if (array_key_exists($key, $this->__DBconfig)) {
                $this->__DBconfig = array_replace($this->__DBconfig, $new);
            }
        }
    }
    protected $__config = array('sessionName' => 'SESSION', 'hashName' => 'token', 'cookiePath' => '/', 'authTime' => 10800, 'lockDelay' => 1200, 'checkIP' => 'strict', 'multiple' => true, 'onMultiple' => 'allow', 'reroute' => false, 'lockscreen' => true, 'loginPageUrl' => '/', 'lockscreenPageUrl' => '/lockscreen', 'successUrl' => '/dashboard', 'lockRef' => true, 'lockRef_Name' => 'referer');
    protected $__DBconfig = array('tUserInfo' => 'user', 'tUserToken' => 'token', 'fLogin' => 'login', 'hashLogin' => true, 'fPassword' => 'pwd', 'fIdUser' => 'id_user', 'fToken' => 'token', 'fTokenIp' => 'user_ip', 'fTokenAdd' => 'time_add');
}
/**
 * Plugin exception
 */
class Auth_exception extends \Exception
{
    public function __construct($message = null, $code = 0)
    {
        if (!$message) {
            throw new $this('Unknown exception');
        }
        parent::__construct($message, $code);
        // log
    }
}
return Main::instance();
开发者ID:v1996-96,项目名称:AuthPHP,代码行数:30,代码来源:Main.php

示例9:

<?php

/*
Plugin Name: Cron Control
Plugin URI:
Description: Execute WordPress cron events in parallel, using a custom post type for event storage.
Author: Erick Hitter, Automattic
Version: 1.0
Text Domain: automattic-cron-control
*/
namespace Automattic\WP\Cron_Control;

// Load basics needed to instantiate plugin
require __DIR__ . '/includes/constants.php';
require __DIR__ . '/includes/utils.php';
require __DIR__ . '/includes/abstract-class-singleton.php';
require __DIR__ . '/includes/class-lock.php';
// For data consistency, ensure alternate data store is always loaded
require __DIR__ . '/includes/class-cron-options-cpt.php';
// Instantiate main plugin class, which checks environment and loads remaining classes when appropriate
require __DIR__ . '/includes/class-main.php';
Main::instance();
开发者ID:Automattic,项目名称:vip-mu-plugins-public,代码行数:22,代码来源:cron-control.php


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