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 > Reserved Function

    Reserved Function means that sometimes you need to execute some functions just one time to prevent double call from anywhere. For Example AModel has BModel ,CModel,DModel but AModel call the Afunction and BModel call the function too, and CModel,DModel also. So AFunction Called 4 times in one session,this situation is often occured when there are many developers in project.
    In this case, Best Solution is to use the Reserved Function and you can call the AFunction just one time in a session.

    How to make the Reserved Function


    Just the below added to your top of function in Models.very~~ simple.

    function AFunction () {
        if($this->isReserved(__METHOD__)) return false;
        .......
    }