Procedural File: aq.lib.php
Source Location: /aq.lib.php
Page Details:
This file contains some methods that are used throughout the entire script.
All methods in this file are private since they are only meant to be used internally by the script. (Not that this means anything in PHP ;)
Tags:
IMAGE_ALTERNATIVES_0 [line 54]
IMAGE_ALTERNATIVES_1 [line 62]
IMAGE_ALTERNATIVES_2 [line 69]
IMAGE_ALTERNATIVES_3 [line 76]
IMAGE_ALTERNATIVES_4 [line 83]
IMAGE_AS_IS [line 27]
IMAGE_NO_SIZE [line 44]
getAmazoopConfig [line 164]
string|boolean getAmazoopConfig(
string $var, [string $server = "auto"])
|
|
Gets the value of a variable from amazOOP's general configuration. The general configuration variables are the ones defined in section 'General' of the Configurator, under the title that reads 'General Configuration'. This function is mainly for internal use, however I have not declared it private because it might be of interest for some developers.
Tags:
Parameters
string |
$var |
The variable you wish to fetch. Valid values are: - 'address': the URL of the site's home (e.g. 'www.server.com', or 'www.shared.com/mysite')
- 'path_to_script': absolute path to the script (e.g. 'c:\\path\\to\\site\\include\\amazoop\\', or '/var/www/html/amazoop/')
- 'close_tag_character': returns ' />' or ' >' if configured to use XHTML or HTML respectively
- 'file_separator': returns '\\' or '/' if configured to use Windows or *nix respectively
- 'UTF-8_encode': determines whether data from Amazon should be UTF-8 encoded
- 'open_links_in': 'new' or 'same' window
- 'log_errors': true or false
- 'log_requests': true or false
- 'temporary_directory': absolute path to temporary directory
- 'cache_directory': absolute path to cache directory
- 'max_request_log_size': maximum size in lines of request log
- 'max_error_log_size': maximum size in lines of error log
- 'request_log_file': absolute path to request log
- 'error_log_file': absolute path to error log
- 'timestamp_file': absolute path to file containing timestamp
- 'XML_template': absolute path to XML template
- 'check_alternative_images': level of image checking (0-4)
|
string |
$server |
The server you want the variable for. Valid values are: - "auto": amazOOP determines which server it is running on and returns
the value for that server. - "test": the value for the test server is returned.
- "def": the value for the definitive server is returned.
|
getAssociateID [line 297]
string|boolean getAssociateID(
string $locale)
|
|
Gets the associate ID for a specified locale.
Tags:
Parameters
string |
$locale |
the locale for which you would like the associate ID. |
getBrowseNode [line 280]
string|boolean getBrowseNode(
string $locale, string $category)
|
|
Gets the browse node corresponding to an amazOOP category. This function is mainly for internal use, however I have not declared it private because it might be of interest for some developers.
Tags:
Parameters
string |
$locale |
the country for which the category is defined. |
string |
$category |
the amazOOP category for which you want to retrieve the browse node. |
getModeFromCatalog [line 730]
string getModeFromCatalog(
string $catalog, string $locale)
|
|
Tries to guess the AWS mode corresponding to a catalog returned in a feed. Used to guess the mode of a browse node obtained from a product's HeavyDetails::browseList. WARNING!!! This is an experimental feature. Use it, tweak it, and send feedback!!!
Tags:
Parameters
string |
$catalog |
the catalog that should be converted |
string |
$locale |
the locale for which you want the AWS mode. Important because modes are different in each locale. |
setAmazoopConfig [line 259]
void setAmazoopConfig(
string $var, string $value, string $server)
|
|
Sets the value of a variable from amazOOP's general configuration. The general configuration variables are the ones defined in section 'General' of the Configurator, under the title that reads 'General Configuration'. Although I can't see an immediate use for this function, you can override the default configuration of the script, using this function. These changes, however, are only available to each instance of the script, and are lost once the script ends.
Parameters
string |
$var |
The variable you wish to set. Valid values are: - 'address': the URL of the site's home (e.g. 'www.server.com', or 'www.shared.com/mysite')
- 'path_to_script': absolute path to the script (e.g. 'c:\\path\\to\\site\\include\\amazoop\\', or '/var/www/html/amazoop/')
- 'close_tag_character': 'xhtml' and 'html', will return ' />' or ' >' respectively
- 'file_separator': 'windows' or 'unix' will return '\\' or '/' respectively
- 'UTF-8_encode': 'true' or 'false'
- 'open_links_in': 'new' or 'same' window
- 'log_errors': 'true' or 'false'
- 'log_requests': 'true' or 'false'
- 'temporary_directory': path to temporary directory, either relative from 'path_to_script' or absolute
- 'cache_directory': path to cache directory, either relative from 'path_to_script' or absolute
- 'max_request_log_size': maximum size in lines of request log
- 'max_error_log_size': maximum size in lines of error log
- 'request_log_file': path to request log, either relative from 'path_to_script' or absolute
- 'error_log_file': path to error log, either relative from 'path_to_script' or absolute
- 'timestamp_file': path to file containing timestamp, either relative from 'path_to_script' or absolute
- 'XML_template': path to XML template, either relative from 'path_to_script' or absolute
- 'check_alternative_images': level of image checking (0-4)
|
string |
$value |
The value you wish to set to $var. See the description of the $var parameter for a list of valid values. |
string |
$server |
The server you want the variable for. Valid values are: - "test": the value for the test server is returned.
- "def": the value for the definitive server is returned.
|
|