GBHTMLTemplateVariablesProvider Class Reference
| Inherits from | NSObject |
| Declared in | GBHTMLTemplateVariablesProvider.h GBHTMLTemplateVariablesProvider.m |
Overview
Provides variables for HTML template string for given objects.
The main purpose of this class is to prepare an intermediate variables from given objects suitable for template generation. Although original object could easily be used within templates, using simplified, intermediate, form greatly simplifies template files. Think of the variables as the controlley layer for the template engine.
This class is intended to be reused, create a single instance and pass it the objects - one by one - for which you'd like to get template variables.
Tasks
Initialization & disposal
-
+ providerWithSettingsProvider:Returns autoreleased provider that work with the givenGBApplicationSettingsProviderimplementor. -
– initWithSettingsProvider:Initializes the provider to work with the givenGBApplicationSettingsProviderimplementor.
Variables handling
-
– variablesForClass:withStore:Returns the variables for the givenGBClassDatausing the givenGBStorefor links. -
– variablesForCategory:withStore:Returns the variables for the givenGBCategoryDatausing the givenGBStorefor links. -
– variablesForProtocol:withStore:Returns the variables for the givenGBProtocolDatausing the givenGBStorefor links. -
– variablesForIndexWithStore:Returns the variables for the index file using the givenGBStorefor links. -
– variablesForHierarchyWithStore:Returns the variables for the hierarchy file using the givenGBStorefor links.
Class Methods
providerWithSettingsProvider:
Returns autoreleased provider that work with the given GBApplicationSettingsProvider implementor.
+ (id)providerWithSettingsProvider:(id)settingsProviderParameters
- settingsProvider
- Application-wide settings provider to use for checking parameters.
Return Value
Returns initialized instance or nil if initialization fails.
Exceptions
- NSException
- Thrown if the given application is
nil.
Declared In
GBHTMLTemplateVariablesProvider.hInstance Methods
initWithSettingsProvider:
Initializes the provider to work with the given GBApplicationSettingsProvider implementor.
- (id)initWithSettingsProvider:(id)settingsProviderParameters
- settingsProvider
- Application-wide settings provider to use for checking parameters.
Return Value
Returns initialized instance or nil if initialization fails.
Discussion
This is the designated initializer.
Exceptions
- NSException
- Thrown if the given application is
nil.
Declared In
GBHTMLTemplateVariablesProvider.hvariablesForCategory:withStore:
Returns the variables for the given GBCategoryData using the given GBStore for links.
- (NSDictionary *)variablesForCategory:(GBCategoryData *)object withStore:(id)storeParameters
- object
- The category for which to return variables.
- store
- Store provider to be used for links generation.
Return Value
Returns dictionary of all variables
Discussion
The result can be used with GBTemplateHandler to generate category specific output.
Exceptions
- NSException
- Thrown if the given object or store is
nil.
See Also
Declared In
GBHTMLTemplateVariablesProvider.hvariablesForClass:withStore:
Returns the variables for the given GBClassData using the given GBStore for links.
- (NSDictionary *)variablesForClass:(GBClassData *)object withStore:(id)storeParameters
- object
- The class for which to return variables.
- store
- Store provider to be used for links generation.
Return Value
Returns dictionary of all variables
Discussion
The result can be used with GBTemplateHandler to generate class specific output.
Exceptions
- NSException
- Thrown if the given object or store is
nil.
See Also
Declared In
GBHTMLTemplateVariablesProvider.hvariablesForHierarchyWithStore:
Returns the variables for the hierarchy file using the given GBStore for links.
- (NSDictionary *)variablesForHierarchyWithStore:(id)storeParameters
- store
- Store provider to be used for links generation.
Return Value
Returns dictionary of all variables.
Discussion
The result can be used with GBTemplateHandler to generate protocol specific output.
Exceptions
- NSException
- Thrown if the given object or store is
nil.
See Also
Declared In
GBHTMLTemplateVariablesProvider.hvariablesForIndexWithStore:
Returns the variables for the index file using the given GBStore for links.
- (NSDictionary *)variablesForIndexWithStore:(id)storeParameters
- store
- Store provider to be used for links generation.
Return Value
Returns dictionary of all variables
Discussion
The result can be used with GBTemplateHandler to generate protocol specific output.
Exceptions
- NSException
- Thrown if the given object or store is
nil.
See Also
Declared In
GBHTMLTemplateVariablesProvider.hvariablesForProtocol:withStore:
Returns the variables for the given GBProtocolData using the given GBStore for links.
- (NSDictionary *)variablesForProtocol:(GBProtocolData *)object withStore:(id)storeParameters
- object
- The protocol for which to return variables.
- store
- Store provider to be used for links generation.
Return Value
Returns dictionary of all variables
Discussion
The result can be used with GBTemplateHandler to generate protocol specific output.
Exceptions
- NSException
- Thrown if the given object or store is
nil.
See Also
Declared In
GBHTMLTemplateVariablesProvider.h