-
Klinkor is a PHP Framework which give you ability to develop Application as component. An application can be done with multiple components. Also you could do your Application Component extendable as an alias or exportable to another project.
-
What is an AppAlias, it is like on php function sizeof() which is an alias of count(), you can do the same DemoTwoApp can be an Alias of DemoApp. Only DemoTwoApp could include other layout templates or other styles, actions, new Controllers, new Models DataBase, behavior of DemoTwoApp can be other. When you generate an App as Alias your App will Extend all Controllers and Application Core from DemoApp.
-
How do you call your First App Controller:
1. Call Simple App page -> localhost/Default/home
[ControllerName][Action]
2. Call App Component page -> localhost/DemoComponentApp/Default/home
[AppName][ControllerName][Action]
- How you can define add an Component
require_once 'config/defines.php';
require_once 'config/functions.php';
use AppLauncher\Launch;
use \AppLauncher\Action\Request;
Launch::app('\DemoAliasApp\DemoAliasAppController', 'dev')
->addApp('\DemoSecuredApp\DemoSecuredAppController')
->registerAppFacade()
->display();
- Multi Language Web Framework!
- Include
- App Config
- App Package Generator (using console)
- ORM DataBase Entities Generator (using console)
- OML ORM DataBase Manager (https://github.com/dmitrirussu/OmlManager)
- Session Manager
- Action Request Manager
- Routing
- Action Display Layout (Template, HTML, JSON, IMAGE)
- Configs
- Actions rooting config
app/DemoApp/Config/actions.ini
------------------------------
[en:home]
action=DemoApp::DefaultController->defaultAction
[es:casa]
action=DemoApp::DefaultController->defaultAction
- Action Response
public function defaultAction() {
return array(
'type' => 'html',
'display' => 'index'
);
}
public function countriesAction() {
return array(
'type' => 'html_block',
'display' => 'countries'
);
}
public function anOtherAction() {
return array(
'type' => 'redirect',
'url' => 'DemoApp::DefaultController->defaultAction'
);
}
- DataBase configuration
config/databases.ini
--------------------
[default]
driver = pdo_mysql;
host = localhost;
db_name = '';
user = 'root';
password = '';
port = '';
[db_launch]
driver = pdo_mysql;
host = localhost;
db_name = launch;
user = root;
password = ;
port = '';
- Console commands
'create:app' => 'php generator.php create:app [PROJECT_NAME]',
'create:app:controller' => 'php generator.php create:app:controller [PROJECT_NAME] [CONTROLLER_NAME]',
'create:app:alias' => 'php generator.php create:app:alias [PROJECT_ALIAS_NAME] [PROJECT_NAME]',
'create:secured:app' => 'php generator.php create:app [PROJECT_NAME]',
'create:secured:app:controller' => 'php generator.php create:app:controller [PROJECT_NAME] [CONTROLLER_NAME]',
'create:app:db:entities' => 'php generator.php create:db:entities [PROJECT_NAME] [DATABASE_CONF_NAME]',
'create:app:db:entity' => 'php generator.php create:db:entity [PROJECT_NAME] [DATABASE_CONF_NAME] [TABLE_NAME]'
- Form Builder based on OML ORM Manager - OML ORM Manager
use ApplauncherApp\Models\LaunchPackage\Model\Articls;
use ApplauncherApp\Models\LaunchPackage\Model\Categories;
use ApplauncherApp\Models\LaunchPackage\Model\KeywordTranslations;
use HtmlFormBuilder\FormBuilder;
use OmlManager\ORM\OmlORManager;
$form = new FormBuilder(new Articls(),
array(
'fields'=> array(
'id_category' => array(
'keyword' => 'Categories',
'data' => OmlORManager::oml()->model(new Categories())->fetch(),
'key' => 'ct_key',
'fields' => array('ct_key', 'ct_type'),
'type' => 'select'
),
),
'buttons' => array(
'submit' => 'Save',
'reset' => array('active' => true, 'keyword' => 'reset')
)));
$form->setModel(new KeywordTranslations());
$form->setModel(new Categories());
$this->assign('form', $form);
- HTML Form Builder, Form Validator