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


PHP Bootstrap类代码示例

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


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

示例1: bootstrap

 /**
  * Bootstrap the application
  *
  * Throws Steelcode_Application_Exception if Bootstrap class
  * does not extend Steelcode_Application_Bootstrap_Abstract
  *
  * @param array $options
  * @return Stelcode_Application_Config
  * @throws Steelcode_Application_Exception
  */
 public function bootstrap($options = array())
 {
     if (!$this->_bootstrap instanceof Steelcode_Application_Bootstrap) {
         throw new Steelcode_Application_Exception('Class Bootstrap does not extend Steelcode_Application_Bootstrap_Abstract');
     }
     return $this->_bootstrap->bootstrap($options);
 }
开发者ID:ajaysreedhar,项目名称:steelcode-framework,代码行数:17,代码来源:Bootstrapper.php

示例2: generate_meta_box

 /**
  * generate Input type
  */
 public function generate_meta_box()
 {
     global $post_id;
     $bootstrap = new Bootstrap();
     $bootstrap->load_bootstrap_css();
     foreach ($this->meta_boxes["input"] as $input) {
         switch ($input["type"]) {
             case "text":
                 $this->render->view("input.text", $input, plugin_dir_path(__FILE__) . "../views/admin");
                 break;
             case "editor":
                 $this->render->view("input.editor", $input, plugin_dir_path(__FILE__) . "../views/admin");
                 break;
             case "textarea":
                 $this->render->view("input.textarea", $input, plugin_dir_path(__FILE__) . "../views/admin");
                 break;
             case "email":
                 $this->render->view("input.email", $input, plugin_dir_path(__FILE__) . "../views/admin");
                 break;
             case "img":
                 wp_enqueue_media();
                 $this->render->view("img", $input, plugin_dir_path(__FILE__) . "../views/admin");
                 break;
             default:
                 $this->render->view($input["type"], $input, plugin_dir_path(__FILE__) . "../views/admin");
                 break;
         }
     }
 }
开发者ID:Darkan35,项目名称:Wordpress-CPT-class,代码行数:32,代码来源:PluginMetaBox.php

示例3: bootstrap

 public function bootstrap($bootstrap_nodes = NULL)
 {
     $nodes = $this->settings->kbuckets->toNodeList();
     if ($bootstrap_nodes !== NULL) {
         $nodes->addNodeList($bootstrap_nodes);
     }
     $task = new Bootstrap($this->settings, $nodes);
     return $task->enqueue();
 }
开发者ID:rongzedong,项目名称:kademlia.php,代码行数:9,代码来源:instance.php

示例4: run

 /**
  * Run the bootstrap process of the application
  * Define constants, settings etc.
  * Main point in index.php
  *
  * @return void
  */
 public static function run()
 {
     if (self::$instance === null) {
         self::$instance = new Bootstrap();
     }
     self::$instance->app = new \Silex\Application();
     self::$instance->defineConstants();
     self::$instance->includeSettingsAndRoutes();
     self::$instance->app->run();
 }
开发者ID:andrij2012,项目名称:silex-skeleton,代码行数:17,代码来源:Bootstrap.php

示例5: runApplication

 /**
  * @param string $url
  * @param \Phalcon\DI\FactoryDefault $di
  */
 private function runApplication($url, DI\FactoryDefault $di = null)
 {
     require_once dirname(__DIR__) . '/../fixtures/app/Bootstrap.php';
     $config = (require dirname(__DIR__) . '/../fixtures/app/config/config.php');
     $config = new \Phalcon\Config($config);
     $bootstrap = new \Bootstrap($config);
     if ($di != null) {
         $bootstrap->setDi($di);
     }
     $bootstrap->setup()->run($url);
 }
开发者ID:vegas-cmf,项目名称:acl,代码行数:15,代码来源:PluginTest.php

示例6: UsesBootstrapCssDependingOnSwitches

 /**
  * @test
  * @dataProvider BootstrapCssFilenames
  */
 public function UsesBootstrapCssDependingOnSwitches($cdn, $responsive, $fontawesome, $mincss, $expected_filename)
 {
     $component = new Bootstrap();
     $component->_assetsUrl = 'assets';
     $component->assetsRegistry = new FakeAssetsRegistry();
     $component->enableCdn = $cdn;
     $component->responsiveCss = $responsive;
     $component->fontAwesomeCss = $fontawesome;
     $component->minify = $mincss;
     $component->registerBootstrapCss();
     $this->assertEquals($expected_filename, $component->assetsRegistry->getLastRegisteredCssFile());
 }
开发者ID:LumbaJack,项目名称:Mercado-BTX,代码行数:16,代码来源:BootstrapTest.php

示例7: testPostRequestDoesDispatch

 /**
  * @covers \Heystack\Core\Bootstrap::__construct
  * @covers \Heystack\Core\Bootstrap::postRequest
  * @covers \Heystack\Core\Bootstrap::doBootstrap
  */
 public function testPostRequestDoesDispatch()
 {
     $session = $this->getSessionMock();
     $sessionBackend = $this->getMock('Heystack\\Core\\State\\Backends\\Session');
     $eventDispatcher = $this->getMock('Heystack\\Core\\EventDispatcher');
     $sessionBackend->expects($this->once())->method('setSession')->with($session);
     $eventDispatcher->expects($this->once())->method('dispatch')->with(Events::POST_REQUEST);
     $this->container->expects($this->at(0))->method('get')->with(Services::BACKEND_SESSION)->will($this->returnValue($sessionBackend));
     $this->container->expects($this->at(1))->method('get')->with(Services::EVENT_DISPATCHER)->will($this->returnValue($eventDispatcher));
     $b = new Bootstrap($this->container);
     $b->doBootstrap($session);
     $b->postRequest($this->getRequestMock(), $this->getMock('SS_HTTPResponse'), $this->getMock('DataModel'));
 }
开发者ID:helpfulrobot,项目名称:heystack-heystack,代码行数:18,代码来源:BootstrapTest.php

示例8: getSystemLogPath

 /**
  * Returns the path to system file configurated to log errors. If no paramter
  * is passed, tries to load bootstrap from Agana_Util_Bootstrap, else, loads
  * from parameter variable.
  * 
  * @param Bootstrap $bootsrap
  * @return string System error file path
  */
 public static function getSystemLogPath($bootsrap = null)
 {
     if ($bootsrap) {
         $options = $bootsrap->getOption('agana');
     } else {
         $options = Agana_Util_Bootstrap::getOption('agana');
     }
     if (isset($options['app']['syserrorfile'])) {
         $sysLogFile = $options['app']['syserrorfile'];
     } else {
         $sysLogFile = APPLICATION_DATA_PATH . '/app.error.log.xml';
     }
     return $sysLogFile;
 }
开发者ID:brunopbaffonso,项目名称:ongonline,代码行数:22,代码来源:Log.php

示例9: setUp

 public function setUp()
 {
     $_SERVER['HTTP_HOST'] = 'vegas.dev';
     $_SERVER['REQUEST_URI'] = '/';
     $this->di = DI::getDefault();
     $modules = (new ModuleLoader())->dump(TESTS_ROOT_DIR . '/fixtures/app', TESTS_ROOT_DIR . '/fixtures/app/config/');
     $app = new Application();
     $app->registerModules($modules);
     require_once TESTS_ROOT_DIR . '/fixtures/app/Bootstrap.php';
     $config = (require TESTS_ROOT_DIR . '/fixtures/app/config/config.php');
     $config = new \Phalcon\Config($config);
     $bootstrap = new \Bootstrap($config);
     $bootstrap->setup();
     $this->bootstrap = $bootstrap;
 }
开发者ID:vegas-cmf,项目名称:apidoc,代码行数:15,代码来源:TestCase.php

示例10: init

 /**
  *### .init()
  *
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     $classes = array('table');
     if (isset($this->type)) {
         if (is_string($this->type)) {
             $this->type = explode(' ', $this->type);
         }
         if (!empty($this->type)) {
             $validTypes = array(self::TYPE_STRIPED, self::TYPE_BORDERED, self::TYPE_CONDENSED, self::TYPE_HOVER);
             foreach ($this->type as $type) {
                 if (in_array($type, $validTypes)) {
                     $classes[] = 'table-' . $type;
                 }
             }
         }
     }
     if (!empty($classes)) {
         $classes = implode(' ', $classes);
         if (isset($this->itemsCssClass)) {
             $this->itemsCssClass .= ' ' . $classes;
         } else {
             $this->itemsCssClass = $classes;
         }
     }
     $booster = Bootstrap::getBooster();
     $popover = $booster->popoverSelector;
     $tooltip = $booster->tooltipSelector;
     $afterAjaxUpdate = "js:function() {\n\t\t\tjQuery('.popover').remove();\n\t\t\tjQuery('{$popover}').popover();\n\t\t\tjQuery('.tooltip').remove();\n\t\t\tjQuery('{$tooltip}').tooltip();\n\t\t}";
     if (!isset($this->afterAjaxUpdate)) {
         $this->afterAjaxUpdate = $afterAjaxUpdate;
     }
 }
开发者ID:xunicorn,项目名称:ebay-simple-watching,代码行数:38,代码来源:TbGridView.php

示例11: setSkin

 public static function setSkin($parser, $skin)
 {
     /* @todo: in order to work with parsercache this needs to cache the value in wikitext and retreive it
     		before the skin is initialized */
     Bootstrap::$pageSkin = $skin;
     return true;
 }
开发者ID:tsynodinos,项目名称:booty,代码行数:7,代码来源:Booty.extension.php

示例12: __construct

    public function __construct()
    {
        $config = Config::GetConfig();
        
        $this->_dba = DatabaseAdapter::Create($config['db_adapter']);
        $this->_dba->connect($config['db_host'], $config['db_user'], $config['db_pass'], $config['db_flags']);

        // Connect to the default database
        // @todo Move this decision out of this class
        if (class_exists('Bootstrap', false))
        {
            $this->_dba->selectDatabase(Bootstrap::GetDefaultDatabase());       // @todo Abstraction violation!
        }
        else
        {
            $default_db = Config::GetValue('default_db');
            
            if (isset($default_db))
            {
                $this->_dba->selectDatabase($default_db);                       // @todo Hack!
            }
        }
        
        return;
    }
开发者ID:Goodgulf,项目名称:nodemesh,代码行数:25,代码来源:class.DatabaseConnection.php

示例13: __construct

 public function __construct()
 {
     $b = Bootstrap::getInstance();
     $b->init();
     $b->includeWordPress();
     $this->uploadDir = wp_upload_dir();
 }
开发者ID:eriktorsner,项目名称:wp-bootstrap-ui,代码行数:7,代码来源:Extractmedia.php

示例14: forge

 /**
  * @access public
  * @static
  * @param array $attrs (default: array())
  * @return void
  */
 public static function forge(array $attrs = array())
 {
     is_null(self::$helper) and self::$helper = Bootstrap::forge('html');
     // increment instance num, if we need to render more tan than 1 tabs element
     self::$inst_num++;
     return new self($attrs);
 }
开发者ID:ronan-gloo,项目名称:FuelPHP-Twitter-Bootstrap,代码行数:13,代码来源:tab.php

示例15: init

 public function init()
 {
     X_VlcShares_Plugins::broker()->gen_beforeInit($this);
     $this->bootstrap = $this->getFrontController()->getParam('bootstrap');
     $this->options = $this->bootstrap->getResource('configs');
     $this->translate = $this->bootstrap->getResource('translation');
     X_VlcShares_Plugins::broker()->gen_afterInit($this);
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:8,代码来源:Action.php


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