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:


      Class: __ResourceManager


      Class Overview

      This is the class in charge of manage I18n resources, being text, error messages, images an so on.

      The application context has his own resource manager, which can be retrieved by calling the __Context::getResourceManager() method

      1.  //Retrieve the __ResourceManager instance associated to the application context:
      2.  $resource_manager __ApplicationContext::getInstance()->getResourceManager();


      
      
      				

      Methods

      [ Top ]

      Method Summary

      void   addResource()  
      void   addResourceProvider()   This method append a new __ResourceDictionary instance.
      void   addSupportedLanguage()  
      __ResourceManager   &getContextInstance()   This method return a singleton instance of __ResourceManager associated to a context id
      __ResourceManager   &getInstance()   Maintained for back-compatibility, but deprecated.
      __ResourceBase   getResource()   This method will returns a resource identified by a key.
      void   hasResource()  
      void   isSupportedLanguage()  
      void   loadActionResources()  
      void   removeResource()  

      [ Top ]

      Methods

      addResource


        void addResource( __ResourceBase &$resource, [ $language_iso_code = null]  )


      Parameters:
      TypeNameDescription
      __ResourceBase &$resource
      $language_iso_code

      Access:  public



      addResourceProvider


        void addResourceProvider( __ResourceProvider &$resource_provider  )

      This method append a new __ResourceDictionary instance.

      __ResourceDictionary are objects that group Resources



      Parameters:
      TypeNameDescription
      __ResourceProvider &$resource_provider The resource dictionary to add to

      Access:  public



      addSupportedLanguage


        void addSupportedLanguage( $language_iso_code  )


      Parameters:
      TypeNameDescription
      $language_iso_code

      Access:  public



      getContextInstance


        __ResourceManager &getContextInstance( $context_id  )

      This method return a singleton instance of __ResourceManager associated to a context id


      Parameters:
      TypeNameDescription
      $context_id

      Access:  public



      getInstance


        __ResourceManager &getInstance( )

      Maintained for back-compatibility, but deprecated.

      Use __Context::getResourceManager() method instead of


      Deprecated:  Use __Context::getResourceManager() method instead of
      Access:  public



      getResource


        __ResourceBase getResource( string $resource_key, [ $language_iso_code = null]  )

      This method will returns a resource identified by a key.

      It will ask to all __ResourceDictionary instances if any of them has the resource, and will return it if it's found.



      Parameters:
      TypeNameDescription
      string $resource_key The resource's key
      $language_iso_code

      Return:  The requested resource or null if it's not found.
      Access:  public



      hasResource


        void hasResource( $resource_key, [ $language_iso_code = null]  )


      Parameters:
      TypeNameDescription
      $resource_key
      $language_iso_code

      Access:  public



      isSupportedLanguage


        void isSupportedLanguage( $language_iso_code  )


      Parameters:
      TypeNameDescription
      $language_iso_code

      Access:  public



      loadActionResources


        void loadActionResources( $action_identity, [ $language_iso_code = null]  )


      Parameters:
      TypeNameDescription
      $action_identity
      $language_iso_code

      Access:  public



      removeResource


        void removeResource( $resource_id  )


      Parameters:
      TypeNameDescription
      $resource_id

      Access:  public