icybee/module-sites

管理网站

安装数量: 1,608

依赖关系: 1

建议者: 0

安全: 0

星级: 0

关注者: 2

分支: 1

开放问题: 1

类型:icanboogie-module

v3.0.0 2017-03-05 12:06 UTC

This package is auto-updated.

Last update: 2024-09-20 03:38:24 UTC


README

网站模块(sites)管理由Icybee提供的网站。

事件钩子

ICanBoogie\Core::run

初始化核心对象的sitelocaletimezone属性。如果网站有基本路径,则修补Routing包的contextualize()decontextualize()辅助函数。

ICanBoogie\HTTP\RequestDispatcher::dispatch:before

如果请求不匹配任何网站,则将请求重定向到第一个可用的网站。

原型方法

Icybee\Modules\Nodes\Node::get_site

返回节点所属的网站。

<?php

$app->models['nodes']->one->site;

ICanBoogie\Core::get_site

返回与当前请求匹配的网站。

<?php

$app->site;
# or
$app->request->context->site;

ICanBoogie\Core::get_site_id

返回与当前请求匹配的网站的标识符。

<?php

$app->site_id;
# or
$app->request->context->site_id;

ICanBoogie\HTTP\Request\Context::get_site

返回与请求上下文匹配的网站。

<?php

$app->request->context->site;

ICanBoogie\HTTP\Request\Context::get_site_id

返回与请求上下文匹配的网站的标识符。

<?php

$app->request->context->site_id;

需求

该包需要PHP 5.5或更高版本。

安装

安装此包的推荐方法是使用Composer

$ composer require icybee/module-sites

克隆仓库

该包可在GitHub上找到,其仓库可以使用以下命令行克隆

$ git clone https://github.com/Icybee/module-sites.git sites

文档

该包作为Icybee CMS 文档的一部分进行文档记录。可以使用make doc命令生成该包及其依赖项的文档。文档使用ApiGendocs目录中生成。可以使用make clean命令清理包目录。

测试

使用make test命令运行测试套件。将自动安装Composer以及运行套件所需的所有依赖项。可以使用make clean命令清理包目录。

该包由Travis CI持续测试。

Build Status

许可

该模块受新BSD许可协议的许可 - 有关详细信息,请参阅LICENSE文件。