From 4.5, the file app.json will be replaced by Install.php to stored information of your app.
Here is the example structure of Install.php:
Install.php sample
<?php
namespace Apps\PHPfox_Core;
use Core\App;
use Core\App\Install\Setting;
class Install extends App\App
{
protected function setId()
{
$this->id = 'PHPfox_Core';//Set ID for your app. This action is required.
}
protected function setSupportVersion()
{
$this->start_support_version = '4.4.0';//Start support version
$this->end_support_version = '4.5.0';//End support version
}
protected function setAlias()
{
//Set alias for your app
}
protected function setName()
{
$this->name = 'phpFox Core';//Set Name for your app, this name will display in manage apps (admincp)
}
protected function setVersion()
{
$this->version = '4.0.1';//Set version for your app
}
protected function setSettings()
{
//Define settings for your app
}
protected function setUserGroupSettings()
{
//Define user group settings for your app
}
protected function setComponent()
{
//Define component for your app
}
protected function setComponentBlock()
{
//Define component block for your app
}
protected function setPhrase()
{
//Add more phrase for your app. However, for mow please define in phrase.json
}
protected function setOthers()
{
//Set other information for your app
$this->_publisher = 'phpFox'; //Your company name
$this->_publisher_url = 'http://store.phpfox.com/';//Your company website
}
}
These are all information you can define for your app:
| ID | Define | Note |
|---|---|---|
| 1 | $this->id = "your_app_id" | This is your app ID, it must be the same folder name stored your app. Space is not allowed. This ID can't change. |
| 2 | $this->alias = "your_app_alias" | This value is used for: admincp url, block name, component name, ajax name,... This value must be lower case and no space. If your app is simple, this value can be empty. |
| 3 | $this->name = "your app name" | The name of your app, it will display in manage app in admincp |
| 4 | $this->version = "your.app.version" | Version of your app. It has to follow version naming convention. |
| 5 | $this->icon = "your_app_icon" | Define Icon of your app. We support 3 ways to define your app icon:
|
| 6 | $this->admincp_route = "default admincp route" |
Define in bold is required