The sites
module
Manages websites., (*1)
Requirement
The package requires PHP 5.3 or later.
The package also requires an installation of Icybee., (*2)
Installation
The recommended way to install this package is through Composer.
Create a composer.json
file and run php composer.phar install
command to install it:, (*3)
{
"minimum-stability": "dev",
"require":
{
"icybee/module-sites": "*"
}
}
Cloning the repository
The package is available on GitHub, its repository can be
cloned with the following command line:, (*4)
$ git clone git://github.com/Icybee/module-sites.git
Documentation
The package is documented as part of the Icybee CMS
documentation. The documentation for the package and its
dependencies can be generated with the make doc
command. The documentation is generated in
the docs
directory using ApiGen. The package directory can later by
cleaned with the make clean
command., (*5)
Event hooks
ICanBoogie\Core::run
Initializes the site
, locale
and timezone
properties of the core object. If the website has
a path, the contextualize()
and decontextualize()
helpers of the Routing
package are patched., (*6)
ICanBoogie\HTTP\Dispatcher::dispatch:before
Redirects the request to the first available website to the user if the request matches none., (*7)
Prototype methods
Icybee\Modules\Nodes\Node::get_site
Returns the website the node belongs to., (*8)
<?php
$core->models['nodes']->one->site;
ICanBoogie\Core::get_site
Returns the website matching the request or the initial request., (*9)
<?php
$core->site;
ICanBoogie\Core::get_site_id
Returns the identifier of the website matching the request or the initial request., (*10)
<?php
$core->site_id;
ICanBoogie\HTTP\Request\Context::get_site
Returns the website matching the request context., (*11)
<?php
$core->request->context->site;
ICanBoogie\HTTP\Request\Context::get_site_id
Returns the identifier of the website matching the request context., (*12)
<?php
$core->request->context->site_id;
Testing
The test suite is ran with the make test
command. Composer is
automatically installed as well as all the dependencies required to run the suite. The package
directory can later be cleaned with the make clean
command., (*13)
The package is continuously tested by Travis CI., (*14)
, (*15)
License
The module is licensed under the New BSD License - See the LICENSE file for details., (*16)