XOOPS  2.6.0
CountryFlagProvider Class Reference
Inheritance diagram for CountryFlagProvider:
Inheritance graph

Public Member Functions

 getDescription ()
 
 getImgTag (Response $response, $countryCode, $attributes=array(), $size= 'large')
 
 getImgUrl (Response $response, $countryCode, $size= 'large')
 
 getName ()
 
- Public Member Functions inherited from Xoops\Core\Service\AbstractContract
 getDescription ()
 
 getMode ()
 
 getName ()
 
 getPriority ()
 
 setPriority ($priority)
 
- Public Member Functions inherited from Xoops\Core\Service\Contract\CountryflagInterface
 getImgTag (Response $response, $countryCode, $attributes=array())
 
 getImgUrl (Response $response, $countryCode)
 

Protected Attributes

 $flagSource = 'media/xoops/images/flags/'
 
- Protected Attributes inherited from Xoops\Core\Service\AbstractContract
 $priority = Manager::PRIORITY_MEDIUM
 

Private Member Functions

 getFlagUrl ($countryCode, $size)
 

Additional Inherited Members

- Public Attributes inherited from Xoops\Core\Service\Contract\CountryflagInterface
const MODE = \Xoops\Core\Service\Manager::MODE_EXCLUSIVE
 

Detailed Description

Definition at line 28 of file CountryFlagProvider.php.

Member Function Documentation

CountryFlagProvider::getDescription ( )

getDescription - get human readable description of the service provider

Returns
string

Definition at line 49 of file CountryFlagProvider.php.

CountryFlagProvider::getFlagUrl (   $countryCode,
  $size 
)
private

getFlagUrl

Parameters
string$countryCodeISO 3166-1 alpha-2 code to select flag
string$size'small', 'medium' or 'large'
Returns
string URL to obtain Flag image for country code

Definition at line 63 of file CountryFlagProvider.php.

References $file, $url, $xoops, and Xoops\getInstance().

Referenced by getImgTag(), and getImgUrl().

Here is the call graph for this function:

Here is the caller graph for this function:

CountryFlagProvider::getImgTag ( Response  $response,
  $countryCode,
  $attributes = array(),
  $size = 'large' 
)

getImgTag - get a full HTML img tag to display a flag based on county code

Parameters
Response$responseobject
string$countryCodeISO 3166-1 alpha-2 code to select flag
array$attributesarray of attribute name => value pairs for img tag
string$size'small', 'medium' or 'large'
Returns
void - response->value set to image tag

Definition at line 113 of file CountryFlagProvider.php.

References $url, getFlagUrl(), and Xoops\Core\Service\Response\setValue().

Here is the call graph for this function:

CountryFlagProvider::getImgUrl ( Response  $response,
  $countryCode,
  $size = 'large' 
)

getImgUrl - get URL to flag based on county code

Parameters
Response$responseobject
string$countryCodeISO 3166-1 alpha-2 code to select flag
string$size'small', 'medium' or 'large'
Returns
void - response->value set to URL string

Definition at line 98 of file CountryFlagProvider.php.

References getFlagUrl(), and Xoops\Core\Service\Response\setValue().

Here is the call graph for this function:

CountryFlagProvider::getName ( )

getName - get a short name for this service provider. This should be unique within the scope of the named service, so using module dirname is suggested.

Returns
string - a unique name for the service provider

Definition at line 39 of file CountryFlagProvider.php.

Member Data Documentation

CountryFlagProvider::$flagSource = 'media/xoops/images/flags/'
protected

Definition at line 31 of file CountryFlagProvider.php.


The documentation for this class was generated from the following file: