- Seme Framework
- version 4.0.3
- Requirements
- Download & Install
- Configuration
- Tutorials
- URI Routing
- Constants
- Global Variables
- Model
- View
- Controller
- cdn_url
- config
- constructor
- getAdditional
- getAdditionalBefore
- getAdditionalAfter
- getAuthor
- getCanonical
- getContentLanguage
- getDescription
- getIcon
- getJsContent
- getJsFooter
- getJsReady
- getKey
- getKeyword
- getLang
- getRobots
- getShortcutIcon
- getThemeElement
- getTitle
- input
- lib
- load
- loadCss
- loadLayout
- putThemeContent
- putJsContent
- putJsFooter
- putJsReady
- render
- resetThemeContent
- session
- setAuthor
- setCanonical
- setContentLanguage
- setDescription
- setIcon
- setKey
- setKeyword
- setLang
- setShortcutIcon
- setTheme
- setTitle
- Library
- CLI (command line interface)
- Core
- Issue
- Deployment
Library
Library is a file of collection of file that you can use inside Seme Framework. You can found our library on kero/lib/
. Seme Framework has 3 method for loading library.
- instantiate library object automatically,
- instantiate object of library by using different name
- include only library file, so you can instantiate by using its class name.
Loading A Library
You can load library from controller by using method lib. Method lib has 3 parameter required:
- Location of library file relative to kero/lib/.
- Object name, default name is class name with in lower case format.
- The include method. you can use inc value if you just require_once only your lib. Otherwise library will instantiate automatically.
Example loading json library in home controller:
Class Home extends SENE_Controller {
public function __construct(){
parent::__construct();
$this->lib('sene_json_engine','sene_json');
}
public function index(){
$data = array();
$data["status"] = 200;
$data["message"] = 'Hello we just use json right here, Yi-Ha!';
$data["result"] = array();
$this->sene_json->out($data);
}
}
After that you can open your base_url on browser and see what you get.
List of Library
Here is the list of library currently exist on seme framework: