Thule - 0.9.6
  • Welcome
  • Introduction
  • - MVC(Model-View-Controller)
    - Architecture of Framework
    - Flow Chart of Application
    - Services In One Server
    - Developing Guide
    - Features
  • Installation
  • Getting Started
  • - Direct Access HTTP
    - Router Access HTTP
    - Router Direct Access HTTP
    - Reserved Function
    - Convention
    - Bootstrap
    - Pack Javascript , CSS
  • Basic Modules
  • - Model
    - View
    - Controller
  • Libraries
  • - Router
    - Config
    - Response
    - Request
    - Database
    - Query
    - Cache
    - Debug
    - Log
    - Unit Test
    - Registry
    - Profile
  • Helper
  • - Auth
    - Calendar
    - Date
    - Error page
    - Email
    - Form
    - GeoIP
    - Google
    - Html Element
    - Html
    - Http
    - I18n
    - Image
    - Json
    - Jquery
    - Login
    - Layout
    - Locale
    - PHP to Javascript
    - Paging
    - Payflow
    - Soap
    - Text
    - Table
    - Uri
    - Upload
    - Validation
  • Plugins
  • - Smarty Template Engine
  • History
  • Home > Convention

    Thule has a convention but very minimized.

    Class Name

    Class name is first character should be capital and others are a lowercase letter.

    // file : controllers/mvc.php
    class MvcController extends Thule_Contorller {
    }

    // file : models/mvc.php
    class MvcModel extends Thule_Model {
    }

    // file : application/libraries/lib.php
    class Lib extends Thule_lib {
    }

    // file : application/helper/auth.php
    class Auth extends Thule_Auth {
    }

    Call Controller

    loadController parameter should be lowercase. But Controller class must be first capital charater or not (because in this case you can name the model in detail Controller Chapter.

    $this->loadController('controller');
    $this->Controller->Hello();

    Call Model

    loadModel parameter should be lowercase. But Model class is first capital charater or not (because in this case you can name the model in detail Model Chapter.

    $this->loadModel('model');
    $this->Model->Hello();

    Call helper

    loadHelper parameter should be lowercase. But Helper class is first capital charater or not same reason of model. in detail Helper Chapter

    $this->loadHelper('text');
    $this->Text->Hello();