My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for

EnLib » System engine

  • MVC (Days_Model, Days_View, Days_Controller) - basic concepts necessary to work with framework
  • Days_Config - work with the configuration of the site
  • Days_Db - work with database
  • Days_Db_Table - implementation ORM representation of database tables
  • Days_Engine - starting point of entry
  • Days_Event - implementation of observer design pattern
  • Days_Log - logging errors and debugging information
  • Days_Request - request from the user's browser
  • Days_Response - response to the user's browser
  • Days_Url - work with the url address

Under development

  • Days_Acl (Aceess Control List) - delineation of rights of access to sections of the site
  • Days_Filter - filtering data coming from the user (also known as validation or verification of data)
  • Days_Form - processing of data coming from html forms
  • Days_User - work with user (authorization, authentication, end of session)
EnLibDaysConfig  
Days_Config - work with the configuration of the site.
Lang-En
Updated Nov 28, 2009 by letl...@gmail.com

Days_Config - work with the configuration of the site.

How to use

Example of use in php code:

// load default configutation (default.yaml) and return all sections
$config = Days_Config::load()->get();
// return database configuration
$config = Days_Config::load()->get('db/default');
// load specified configutation file and return specified option
$config = Days_Config::load('myconfig')->get('engine/brand');
// return specified value if option not exists
$config = Days_Config::load()->get('engine/brand', 'app');

Parameters

Available configuration parameters:

  • db - database configuration
    • default - name of section (for use many databases in one project)
      • adapter - database engine (available: mysql, mssql, pgsql, sqlite)
      • host - database host (typically this "localhost")
      • username - user for work with database (typycally "root")
      • password - sasswork for user
      • dbname - databse name in this engine (for example "phpdays")
  • engine - engine settings
    • debug - collect debug info (1 - enabled, 0 - disabled)
    • brand - name of you application name (prefix for model classes)
  • log - logging settings
    • type - show debug info to: firephp, file, sqlite
    • level - show errors only with specified levels (levels joided by "bytes or"). Value 31 - show all errors, and 0 - no show errors
  • url - settings for url adress
    • lang - default page language (en, ru, fr, ...)
    • ext - default page type (html, wml, xml)
    • base - delete this part of path from start of string
    • virtual - call index action if specified action not exists (1 - enabled, 0 - disabled)
  • view - settings for view
    • engine - use template engine (available: smarty, dwoo, templum, php - for native php templates)
  • cache - settings for cache support
    • lifetime - cache data on this time (in seconds)

Configuration file writen on YAML syntax (see example).


Sign in to add a comment
Powered by Google Project Hosting