Documentation


SEARCH

TABLE OF CONTENT

    1. Getting started 2. Basic concepts 3. Request dispatching 4. Context container 5. Dual MVC 6. Component model: 7. Security 8. Configuration 9. Session handling 10. I18n 11. Cache 12. Logging 13. Error handling 14. Advanced Topics 15. API reference

      Tutorials: Frequently Asqued Questions

      See also:


      Interface: __IActionController


      Interface Overview

      This file is part of lion framework.

      Copyright (c) 2010 Antonio Parraga Navarro

      Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

      The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


      Author:  Antonio Parraga Navarro
      Version:  1.4
      Copyright:  Copyright (c) 2010 Antonio Parraga Navarro
      Link:  http://www.lionframework.org
      License:  http://www.lionframework.org/license.html
      __ISystemResource
         |
         --__IActionController

      Methods

      [ Top ]

      Inherited Properties, Constants, and Methods

      Inherited Properties Inherited Methods Inherited Constants

      Inherited From __ISystemResource


      [ Top ]

      Method Summary

      __ModelAndView   execute()   Enter description here...
      string   getCode()   Gets the code associated to the current action controller.
      boolean   getRequireSsl()   Getter for _require_ssl member Get if current action controller requires SSL protocol to be executed.
      integer   getValidRequestMethod()   Get the allowed request methods to execute current action controller.
      boolean   isHistoriable()   Get if current action can be logged in the history registry or not.
      boolean   isRequestable()   Get if current action controller can be requested directly by the user or not.
      void   postExecute()  
      void   preExecute()  
      void   setCode()   Sets an unike code for current action controller.
      void   setHistoriable()   Set if current action can be logged in the history registry or not.
      void   setRequestable()   Set if an action controller can be selected and executed by the __FrontController in response to dispatching the user request.
      void   setRequireSsl()   Set if current action controller requires SSL protocol to be executed.
      void   setValidRequestMethod()   Set the allowed request methods to execute current action controller

      [ Top ]

      Methods

      execute


        __ModelAndView execute( [ $action_code = null], string $  )

      Enter description here...


      Parameters:
      TypeNameDescription
      $action_code
      string $ The action code to execute. If not specified, the default one should be used

      Return:  A __ModelAndView instance as a result of executing the requested action
      Access:  public



      getCode


        string getCode( )

      Gets the code associated to the current action controller.

      Return:  The code assigned to current action controller
      Access:  public



      getRequireSsl


        boolean getRequireSsl( )

      Getter for _require_ssl member Get if current action controller requires SSL protocol to be executed.

      Return:  If current action controller requires SSL protocol to be executed
      Access:  public



      getValidRequestMethod


        integer getValidRequestMethod( )

      Get the allowed request methods to execute current action controller.

      Return:  A code that identify all valid request methods to execute current action controller
      Access:  public



      isHistoriable


        boolean isHistoriable( )

      Get if current action can be logged in the history registry or not.

      Return:  If current action can be logged in the history registry
      Access:  public



      isRequestable


        boolean isRequestable( )

      Get if current action controller can be requested directly by the user or not.

      Return:  If current action controller can be requested directly by the user
      Access:  public



      postExecute


        void postExecute( )

      Access:  public



      preExecute


        void preExecute( )

      Access:  public



      setCode


        void setCode( $code, string $action_code  )

      Sets an unike code for current action controller.


      Parameters:
      TypeNameDescription
      $code
      string $action_code An unike code for current action controller

      Access:  public



      setHistoriable


        void setHistoriable( boolean $is_historiable  )

      Set if current action can be logged in the history registry or not.


      Parameters:
      TypeNameDescription
      boolean $is_historiable If current action can be logged in the history registry

      Access:  public



      setRequestable


        void setRequestable( boolean $is_requestable  )

      Set if an action controller can be selected and executed by the __FrontController in response to dispatching the user request.

      In other words: if an action controller is requestable directly by the user or not.

      <p>i.e.: imagine that the request to the url http://yourdomain/showcars.action is resolved by the __FrontController by executing the "showcars" action controller, in that case, that action should be requestable. Otherwise it will raise an exception.



      Parameters:
      TypeNameDescription
      boolean $is_requestable If current action controller can be requested directly by the user

      Access:  public



      setRequireSsl


        void setRequireSsl( boolean $require_ssl  )

      Set if current action controller requires SSL protocol to be executed.


      Parameters:
      TypeNameDescription
      boolean $require_ssl If current action controller requires SSL protocol to be executed

      Access:  public



      setValidRequestMethod


        void setValidRequestMethod( integer $valid_request_method  )

      Set the allowed request methods to execute current action controller

      Possible values:

      • REQMETHOD_NONE: No requests methods are allowed
      • REQMETHOD_GET: Only GET request method is allowed
      • REQMETHOD_POST: Only POST request method is allowed
      • REQMETHOD_COMMAND_LINE: Only from command line (ussing php client) is allowed
      • REQMETHOD_ALL: All possible request methods are allowed



      Parameters:
      TypeNameDescription
      integer $valid_request_method A code that identify all valid request methods to execute current action controller

      Access:  public