PHPackages                             chkn/core - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. chkn/core

ActiveLibrary[Framework](/categories/framework)

chkn/core
=========

PHP MVC Framework

1.1.2(4y ago)229MITPHP

Since Mar 31Pushed 4y ago1 watchersCompare

[ Source](https://github.com/chkn-io/chkn)[ Packagist](https://packagist.org/packages/chkn/core)[ RSS](/packages/chkn-core/feed)WikiDiscussions main Synced today

READMEChangelog (10)DependenciesVersions (14)Used By (0)

CHKN3
=====

[](#chkn3)

PHP Framework for developing lightweight server-side application.

Installation
------------

[](#installation)

1. Download the package using composer.
    - `composer create-project chkn/core folder_name`
2. Install Application Key
    - `php chkn key:generate`
3. Change the rootfolder of the app. It must be the name of your main folder.
    - `php chkn root folder_name`
4. Database Configuration
    - Changing Database Connection = `php chkn db:connection __Connection__`
    - Changing Database Host = `php chkn db:host __host__`
    - Changing Database Name = `php chkn db:name __name__`
    - Changing Database Charset = `php chkn db:charset __charset__`
    - Changing Database Username = `php chkn db:username __username__`
    - Changing Database Password = `php chkn db:password __password__`
5. Run the application
    - `php chkn roast`
    - `php chkn roast --port=8000

Package
-------

[](#package)

Default classes on CHKN Framework are grouped and compiled inside `Drive:ROOT_FOLDER/config/Package/package.conf`

- **Query Building Class** - *Set value to 0 to disable*

```
QUERY_BUILDER=1

```

- **Encryption and Decryption Class** - *Set value to 0 to disable*

```
ENCRYPTION=1

```

- **Download Class** - *Set value to 0 to disable*

```
DOWNLOAD=1

```

- **Upload Class** - *Set value to 0 to disable*

```
UPLOAD=1

```

- **Session Class** - *Set value to 0 to disable*

```
SESSION=1

```

- **Maintenance Class** - *Set value to 0 to disable*

```
MAINTENANCE_CLASS=1

```

- **Page Not Found Class** - *Display a Page Not Found Page if class or method was not found. Set value to 0 to disable*

```
PAGE_NOT_FOUND=1

```

- **CSRF Token Class** - *Set value to 0 to disable*

```
CSRF=1

```

Vendor Styles and Scripts
-------------------------

[](#vendor-styles-and-scripts)

Include a global styles and scripts on the application.

- **Include Global CSS** - *Go to `config/vendors/stylesheet.conf`*

```
/**Set your App's Global Stylesheet/Libraries
/**Include every file after a new line
/**Save the stylesheet inside public/vendor/css/
/**Don't include the file extension

/**Start
bootstrap.min
fontawesome.min
fontawesome-all
/**End

```

- **Include Global Scripts** - *Go to `config/vendors/scripts.conf`*

```
/**Set your App's Global JavaScript/Libraries
/**Include every file after a new line
/**Save the scripts inside public/vendor/js/
/**Don't include the file extension

/**Start
jquery
bootstrap.min
fontawesome.min
/**End

```

CONTROLLERS AND PAGES
---------------------

[](#controllers-and-pages)

As what we know about Controllers, they are the one actually responsible on what must be displayed inside a View and what must be requested inside the Model. In CHKN Framework , Controllers are the most important file on your system. Controller is the place where you have to declare what will be your template to be use, the page that will display inside your template, the page title, the page stylesheet and scripts and the place where you will becreating a request in the Model.

### Creating a Controller

[](#creating-a-controller)

- You have to create a PHP file inside the folder Http/Controller/. The File name must be the name of the Controller you want, followed by the word Controller. Example: homeController.php
- php create:controller **controller\_name**

Every Controller will contain the following codes.

```
