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 > Helper

    Helper class helps you make site easily and to be more fast.
    Helper has a special function that is "reserved function ". when you register your function to "reserved function" that the function should be executed just one time in one session no matter where the function called in. This means that if you have a something to do just one in models, you can make them no matter where called.

    Every Helper can be extended by user. User's directory is HELPER_PATH. or

    // create new helper
    class Auth extends Thule_Helper {
    ......
    }

    // extended by current helper
    class Auth extends Thule_Auth {
    .........
    }

    How to register "reserved function"

    Below function should be called just at one time in one session.

    public function islogin($hconn,$authObject,$value) {
        if($this->isReserved(__METHOD__)) { // check reserved
            return TRUE;
        }
        // your code added here
    }

    For example in Controllers

    $this->loadHelper("login","Login");
    $this->Login->islogin($hconn,$this->auth,1);

    class MvcController extends Thule_Controller {
        function f1() {
            $this->loadHelper("login","Login");
            $this->Login->islogin($hconn,$this->auth,1); // should not be called ,just skip
        }
    }

    Helper List


    - Auth Helper
    - Validation Helper
    - Login Helper
    - Error page Helper
    - PHP to Javascript Helper
    - Email
    - Json
    - Text
    - Paging
    - Locale
    - Date
    - Calendar
    - Image
    - Uri
    - GeoIP
    - Google
    - Payflow
    - Soap
    - Form
    - Table
    - Html Element
    - Html
    - Upload
    - Jquery
    - Layout
    - I18n