定制 getsky/phalcon-bootstrap 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

getsky/phalcon-bootstrap

Composer 安装命令:

composer require getsky/phalcon-bootstrap

包简介

Bootstrap Component for Phalcon

README 文档

README

This component is used as a basis for Pherlin. I recommend to use it instead of this bootstrap.

Run application

To launch the application, you need to execute code:

$app = new Bootstrap(new FactoryDefault());
echo $app->run();

Pass true into a method app(), if you do not want to run the handler:

$app = new Bootstrap(new FactoryDefault());
echo $app->run(true);

Configuration file

By default, the configuration file is here ../app/config/config_%environment%.yml. %environment% - environment under which the application is running.

To change the configuration file, you must use the method setPathConfig():

$app = new Bootstrap(new FactoryDefault());
$app->setPathConfig('config/config.%environment%.ini');
echo $app->run();

Environment

By default, the environment is set to `` `dev ```. To change it, pass the second parameter name of the desired environment.

$app = new Bootstrap(new FactoryDefault(), 'prod');

Сaching

Bootstrap allows you to cache the application configuration. When creating object of class Bootstrap, there is check the presence of apc or apcu. If APC(u) is found, the configuration will be cached. To disable caching, you should report it:

$app = new Bootstrap(new FactoryDefault(), 'prod');
$app->setCacheable(false);

// check
echo $app->isCacheable();
// print: false

If you are on the same machine run two copies of the site, you need to specify a different name for the application cache:

$app = new Bootstrap(new FactorDefault(), 'prod', 'FestApp');
// in another application:
$app = new Bootstrap(new FactorDefault(), 'prod', 'SecondApp');

Loader

If you need the autoloader (Phalcon\Loader), you can request it from the bootstrap:

$app = new Bootstrap(new FactoryDefault(), 'prod');

/**
* @var $loader Phalcon\Loader
*/
$loader = $app->getLoader();

统计信息

  • 总下载量: 275
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 17
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 17
  • Watchers: 4
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-01-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固