phpDocumentor pivotx
[ class tree: pivotx ] [ index: pivotx ] [ all elements ]

Class: Multilingual

Source Location: /modules/module_multilingual.php

Class Multilingual

Property Summary
static mixed   $instance  
mixed   $config_default_language  
mixed   $config_enabled  
mixed   $config_languages  
mixed   $config_language_url_name  
mixed   $config_locales  
mixed   $config_url_patterns  
mixed   $content_language  
mixed   $current_language  
mixed   $default_language  
mixed   $languages  
mixed   $latest_content_language  
mixed   $locales  
mixed   $page_uris  
mixed   $url_patterns  

[ Top ]
Method Summary
Multilingual   __construct()   Protected constructor
boolean   findLanguageInString()   Find a language in a languages string
void   fixLanguageUri()   Fix the language URI
object   getConfigForm()   PivotX configuration Tab
string   getContentLanguage()   Get the main content language
array   getContents()   Get the 'contents' from a particular source
string   getCurrentLanguage()   Return the current language
string   getDefaultLanguage()   Return the default language
void   getHomeUri()   Get the URI to the homepage of the language
array   getLanguages()   Return the configured languages
string   getLocaleForLanguage()   Get the defined locale for language
void   getPageUri()   Get the current page-uri
string   getRequestedLanguage()   Use various methods to detect the requested language
void   getUriPostfix()  
void   getUriPrefix()  
void   handleWrongEntryUrl()   Handle a wrong entry url
void   handleWrongPageUrl()   Handle a wrong page url
void   instance()   Singleton return instance method
boolean   isDefaultLanguage()   Check if the parameter is the default language
boolean   isEnabled()   Return multilingual status
string   isLatestContentLanguageAlsoRequested()   Get the latest content language
mixed   makeLink()   Make link to any source kind
mixed   makeURI()   Make link to any source kind
void   readConfiguration()  
void   setContentLanguage()   Set the main content language
void   setCurrentLanguage()   Set the current language if valid
void   setLatestContentLanguage()   Set the latest content language
void   setLatestContentLanguageIsDefault()   Set the latest content language to the default language
void   setPageUri()   Store the current page-uri in specific languages

[ Top ]
Properties
static mixed   $instance = false [line 25]
API Tags:
Access:  protected


[ Top ]
mixed   $config_default_language = false [line 33]
API Tags:
Access:  protected


[ Top ]
mixed   $config_enabled = false [line 28]
API Tags:
Access:  protected


[ Top ]
mixed   $config_languages = false [line 29]
API Tags:
Access:  protected


[ Top ]
mixed   $config_language_url_name = 'language' [line 30]
API Tags:
Access:  protected


[ Top ]
mixed   $config_locales = false [line 32]
API Tags:
Access:  protected


[ Top ]
mixed   $config_url_patterns = false [line 31]
API Tags:
Access:  protected


[ Top ]
mixed   $content_language = false [line 38]
API Tags:
Access:  protected


[ Top ]
mixed   $current_language = false [line 36]
API Tags:
Access:  protected


[ Top ]
mixed   $default_language = false [line 37]
API Tags:
Access:  protected


[ Top ]
mixed   $languages = array() [line 40]
API Tags:
Access:  protected


[ Top ]
mixed   $latest_content_language = false [line 39]
API Tags:
Access:  protected


[ Top ]
mixed   $locales = array() [line 42]
API Tags:
Access:  protected


[ Top ]
mixed   $page_uris = false [line 43]
API Tags:
Access:  protected


[ Top ]
mixed   $url_patterns = array() [line 41]
API Tags:
Access:  protected


[ Top ]
Methods
Constructor __construct  [line 48]

  Multilingual __construct( )

Protected constructor


API Tags:
Access:  protected


[ Top ]
findLanguageInString  [line 306]

  boolean findLanguageInString( $str, $language  )

Find a language in a languages string

Parameters:
   $str: 
   $language: 

API Tags:
Return:  true if the language is found
Access:  public


[ Top ]
fixLanguageUri  [line 402]

  void fixLanguageUri( $language, $uri, [ $absolute = false]  )

Fix the language URI

Parameters:
   $language: 
   $uri: 
   $absolute: 

API Tags:
Access:  public


[ Top ]
getConfigForm  [line 317]

  object getConfigForm( )

PivotX configuration Tab


API Tags:
Access:  public


[ Top ]
getContentLanguage  [line 297]

  string getContentLanguage( )

Get the main content language


API Tags:
Return:  get the main content language
Access:  public


[ Top ]
getContents  [line 491]

  array getContents( mixed $source, [string $language = false]  )

Get the 'contents' from a particular source

Magically detects the source kind and load the contents

Parameters:
mixed   $source:  any source
string   $language:  specific language variant of the page you want

API Tags:
Return:  array($type,$contents,$havelanguage)
  • type, type of contents (entry, page, oops_record)
  • contents, usually array of contents
  • havelanguage, true if contents is actually in the requested language
Access:  public


[ Top ]
getCurrentLanguage  [line 182]

  string getCurrentLanguage( )

Return the current language


API Tags:
Return:  the current language
Access:  public


[ Top ]
getDefaultLanguage  [line 198]

  string getDefaultLanguage( )

Return the default language


API Tags:
Return:  the default language
Access:  public


[ Top ]
getHomeUri  [line 158]

  void getHomeUri( $language  )

Get the URI to the homepage of the language

(derived from url patterns)

Parameters:
   $language: 

API Tags:
Access:  public


[ Top ]
getLanguages  [line 235]

  array getLanguages( )

Return the configured languages


API Tags:
Return:  configured languages
Access:  public


[ Top ]
getLocaleForLanguage  [line 704]

  string getLocaleForLanguage( [string $language = false]  )

Get the defined locale for language

Parameters:
string   $language:  language string or false for default

API Tags:
Return:  defined locale or false
Access:  public


[ Top ]
getPageUri  [line 458]

  void getPageUri( $language  )

Get the current page-uri

Parameters:
   $language: 

API Tags:
Access:  public


[ Top ]
getRequestedLanguage  [line 124]

  string getRequestedLanguage( )

Use various methods to detect the requested language


API Tags:
Return:  the detected language
Access:  public


[ Top ]
getUriPostfix  [line 737]

  void getUriPostfix( $content  )

Parameters:
   $content: 

API Tags:
Access:  public


[ Top ]
getUriPrefix  [line 719]

  void getUriPrefix( $content, $language  )

Parameters:
   $content: 
   $language: 

API Tags:
Access:  public


[ Top ]
handleWrongEntryUrl  [line 475]

  void handleWrongEntryUrl( &$page, $language  )

Handle a wrong entry url

Parameters:
   &$page: 
   $language: 

API Tags:
Access:  public


[ Top ]
handleWrongPageUrl  [line 468]

  void handleWrongPageUrl( &$page, $language  )

Handle a wrong page url

Parameters:
   &$page: 
   $language: 

API Tags:
Access:  public


[ Top ]
instance  [line 63]

  void instance( )

Singleton return instance method


API Tags:
Access:  public


[ Top ]
isDefaultLanguage  [line 245]

  boolean isDefaultLanguage( [string $language = false]  )

Check if the parameter is the default language

Parameters:
string   $language:  test this language

API Tags:
Return:  true if the given language is the default
Access:  public


[ Top ]
isEnabled  [line 109]

  boolean isEnabled( )

Return multilingual status


API Tags:
Return:  returns true if multilingual is enabled
Access:  public


[ Top ]
isLatestContentLanguageAlsoRequested  [line 276]

  string isLatestContentLanguageAlsoRequested( )

Get the latest content language


API Tags:
Return:  get the main content language
Access:  public


[ Top ]
makeLink  [line 604]

  mixed makeLink( mixed $source, [string $language = false], [ $default = false], [ $ignore_shave = false]  )

Make link to any source kind

Magically detects the source kind and create the proper link to then language you want.

Parameters:
mixed   $source:  any source
string   $language:  specific language variant of the page you want
   $default: 
   $ignore_shave: 

API Tags:
Return:  valid link or the default specified
Access:  public


[ Top ]
makeURI  [line 675]

  mixed makeURI( mixed $source, [string $language = false], [ $default = false]  )

Make link to any source kind

Magically detects the source kind and create the proper link to then language you want.

Parameters:
mixed   $source:  any source
string   $language:  specific language variant of the page you want
   $default: 

API Tags:
Return:  valid link or the default specified
Access:  public


[ Top ]
readConfiguration  [line 74]

  void readConfiguration( )


API Tags:
Access:  protected


[ Top ]
setContentLanguage  [line 288]

  void setContentLanguage( string $language  )

Set the main content language

Parameters:
string   $language:  set this language

API Tags:
Access:  public


[ Top ]
setCurrentLanguage  [line 207]

  void setCurrentLanguage( string $language  )

Set the current language if valid

Parameters:
string   $language:  the current language

API Tags:
Access:  public


[ Top ]
setLatestContentLanguage  [line 260]

  void setLatestContentLanguage( string $language  )

Set the latest content language

Parameters:
string   $language:  set this language

API Tags:
Access:  public


[ Top ]
setLatestContentLanguageIsDefault  [line 267]

  void setLatestContentLanguageIsDefault( )

Set the latest content language to the default language


API Tags:
Access:  public


[ Top ]
setPageUri  [line 443]

  void setPageUri( $language, $uri, [ $fix_host = true]  )

Store the current page-uri in specific languages

To be used when building the languages array for the templating

Parameters:
   $language: 
   $uri: 
   $fix_host: 

API Tags:
Access:  public


[ Top ]

Documentation generated on Thu, 17 May 2012 01:07:18 +0200 by phpDocumentor 1.4.3