phpCan

PHP 5 framework

The modules

phpCan is divided in scenes and modules. A scene is the own website (where the site is built) and a module is an addon that works over the scene. An example of module can be a cms to manage the site content.

Currently there are few available modules:

Content
Manages the content of database of the website and the uploaded files.
Gettext
Allows create and edit the gettext strings for a multilanguage site
Database
Updates the database creating, editing and deleting tables and fields according with the tables and relations configuration
SVN
Updates the project from an SVN server.

Installing a module

To install a module you have to save the module in the folder "modules" in the root of your phpcan installation. Then you have to define which available modules you want for each scene. This configuration is made in the routes configuration file, in phpcan/config/ folder.

$config['scenes'] = array(
	'web' => array(
		'folder' => 'web/',
		'detect' => 'subfolder',
		'default' => true,

		'modules' => array(
			'content' => array(
				'folder' => 'content/',
				'detect' => 'subfolder'
			),
			'database' => array(
				'folder' => 'database/',
				'detect' => 'subfolder'
			)
		)
	)
);

In this example, the scene "web" has two modules: "content" (saved in folder admin) and "database" (saved in folder database). So the urls "/admin/content" and "/admin/database" go to these modules. You can change the route of the module (for example "/admin/cms/") changing the key name of the module.

Configuration

Once the module is intalled you can configurate it. The configuration of each module is stored in a subfolder inside the scene config folder. For example the module "content" will look for the configuration files in scene_folder/config/content/. Like the scene configuration, you can save the configuration files inside a domain folder (for example localhost) or a default folder.

Checkout in Google Code