phpdoc/I18n/Loader.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>I18n\Loader | Internationalization</title>
<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../css/bootstrap-theme.min.css">
<link rel="stylesheet" type="text/css" href="../css/sami.css">
<script src="../js/jquery-1.11.1.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/typeahead.min.js"></script>
<script src="../sami.js"></script>
<meta name="MobileOptimized" content="width">
<meta name="HandheldFriendly" content="true">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
</head>
<body id="class" data-name="class:I18n_Loader" data-root-path="../">
<div id="content">
<div id="left-column">
<div id="control-panel">
<form id="search-form" action="../search.html" method="GET">
<span class="glyphicon glyphicon-search"></span>
<input name="search"
class="typeahead form-control"
type="search"
placeholder="Search">
</form>
</div>
<div id="api-tree"></div>
</div>
<div id="right-column">
<nav id="site-nav" class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-elements">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">Internationalization</a>
</div>
<div class="collapse navbar-collapse" id="navbar-elements">
<ul class="nav navbar-nav">
<li><a href="../classes.html">Classes</a></li>
<li><a href="../namespaces.html">Namespaces</a></li>
<li><a href="../interfaces.html">Interfaces</a></li>
<li><a href="../traits.html">Traits</a></li>
<li><a href="../doc-index.html">Index</a></li>
<li><a href="../search.html">Search</a></li>
</ul>
</div>
</div>
</nav>
<div class="namespace-breadcrumbs">
<ol class="breadcrumb">
<li><span class="label label-default">class</span></li>
<li><a href="../I18n.html">I18n</a></li>
<li>Loader</li>
</ol>
</div>
<div id="page-content">
<div class="page-header">
<h1>Loader</h1>
</div>
<p> class
<strong>Loader</strong> extends <abbr title="Patterns\Abstracts\AbstractOptionable">AbstractOptionable</abbr> implements
<a href="../I18n/LoaderInterface.html"><abbr title="I18n\LoaderInterface">LoaderInterface</abbr></a>
</p>
<h2>Properties</h2>
<table class="table table-condensed">
<tr>
<td class="type" id="property_defaults">
static
</td>
<td>$defaults</td>
<td class="last">The default options</td>
<td></td>
</tr>
</table>
<h2>Methods</h2>
<div class="container-fluid underlined">
<div class="row">
<div class="col-md-2 type">
</div>
<div class="col-md-8 type">
<a href="#method___construct">__construct</a>(
array $user_options = array())
<p>Creation of a Loader with an optional user defined set of options</p> </div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
<abbr title="I18n\$this">$this</abbr>
</div>
<div class="col-md-8 type">
<a href="#method_addPath">addPath</a>(
null|string $db_filename = null,
null|string $db_directory = null,
null|string $file = null)
<p>Add a path to the registry</p> </div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
mixed
</div>
<div class="col-md-8 type">
<a href="#method_getParsedOption">getParsedOption</a>(
string $name,
string|array $lang = null,
mixed $default = null)
<p>Parse an option value replacing <code>%s</code> by the actual language code</p> </div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
string
</div>
<div class="col-md-8 type">
<a href="#method_buildLanguageFileName">buildLanguageFileName</a>(
string $lang,
string $db_filename = null)
<p>Build the file name for the language database</p> </div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
string
</div>
<div class="col-md-8 type">
<a href="#method_buildLanguageDirName">buildLanguageDirName</a>(
string $lang)
<p>Build the directory name for the language database</p> </div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
string
</div>
<div class="col-md-8 type">
<a href="#method_buildLanguageFilePath">buildLanguageFilePath</a>(
string $lang)
<p>Build the absolute file path for the language database</p> </div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
string
</div>
<div class="col-md-8 type">
<a href="#method_buildLanguageVarname">buildLanguageVarname</a>(
string $lang)
<p>Build the variable name for the language database</p> </div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
string
</div>
<div class="col-md-8 type">
<a href="#method_buildLanguageDBFileName">buildLanguageDBFileName</a>()
<p>Build the file name for the language CSV database</p> </div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
string
</div>
<div class="col-md-8 type">
<a href="#method_buildLanguageDBDirName">buildLanguageDBDirName</a>()
<p>Build the directory name for the language CSV database</p> </div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
string
</div>
<div class="col-md-8 type">
<a href="#method_buildLanguageDBFilePath">buildLanguageDBFilePath</a>()
<p>Build the file path for the language CSV database</p> </div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
null|string
</div>
<div class="col-md-8 type">
<a href="#method_findLanguageDBFile">findLanguageDBFile</a>(
string $db_filename = null,
string $db_directory = null)
<p>Find (and add if needed) a language file from options directories</p> </div>
<div class="col-md-2"></div>
</div>
</div>
<h2>Details</h2>
<div id="method-details">
<div class="method-item">
<h3 id="method___construct">
<div class="location">at line 76</div>
<code>
<strong>__construct</strong>(
array $user_options = array())</code>
</h3>
<div class="details">
<div class="method-description">
<p>Creation of a Loader with an optional user defined set of options</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
array</td>
<td>$user_options</td>
<td>An array of options values to over-write defaults</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_addPath">
<div class="location">at line 88</div>
<code>
<abbr title="I18n\$this">$this</abbr>
<strong>addPath</strong>(
null|string $db_filename = null,
null|string $db_directory = null,
null|string $file = null)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Add a path to the registry</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
null|string</td>
<td>$db_filename</td>
<td>
</td>
</tr>
<tr>
<td>
null|string</td>
<td>$db_directory</td>
<td>
</td>
</tr>
<tr>
<td>
null|string</td>
<td>$file</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
<abbr title="I18n\$this">$this</abbr></td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_getParsedOption">
<div class="location">at line 111</div>
<code>
mixed
<strong>getParsedOption</strong>(
string $name,
string|array $lang = null,
mixed $default = null)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Parse an option value replacing <code>%s</code> by the actual language code</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$name</td>
<td>The option name</td>
</tr>
<tr>
<td>
string|array</td>
<td>$lang</td>
<td>The language code to use or an array to pass to
the 'sprintf()' method</td>
</tr>
<tr>
<td>
mixed</td>
<td>$default</td>
<td>The value to return if the option can't be found</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
mixed</td>
<td>The value of the option if found, with replacement if so</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_buildLanguageFileName">
<div class="location">at line 140</div>
<code>
string
<strong>buildLanguageFileName</strong>(
string $lang,
string $db_filename = null)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Build the file name for the language database</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$lang</td>
<td>The language code to use</td>
</tr>
<tr>
<td>
string</td>
<td>$db_filename</td>
<td>A base filename to use</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>The file name for the concerned language</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_buildLanguageDirName">
<div class="location">at line 155</div>
<code>
string
<strong>buildLanguageDirName</strong>(
string $lang)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Build the directory name for the language database</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$lang</td>
<td>The language code to use</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>The directory name for the concerned language with trailing slash</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_buildLanguageFilePath">
<div class="location">at line 166</div>
<code>
string
<strong>buildLanguageFilePath</strong>(
string $lang)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Build the absolute file path for the language database</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$lang</td>
<td>The language code to use</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>The file path for the concerned language</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_buildLanguageVarname">
<div class="location">at line 177</div>
<code>
string
<strong>buildLanguageVarname</strong>(
string $lang)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Build the variable name for the language database</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$lang</td>
<td>The language code to use</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>The variable name for the concerned language</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_buildLanguageDBFileName">
<div class="location">at line 187</div>
<code>
string
<strong>buildLanguageDBFileName</strong>()</code>
</h3>
<div class="details">
<div class="method-description">
<p>Build the file name for the language CSV database</p> </div>
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_buildLanguageDBDirName">
<div class="location">at line 197</div>
<code>
string
<strong>buildLanguageDBDirName</strong>()</code>
</h3>
<div class="details">
<div class="method-description">
<p>Build the directory name for the language CSV database</p> </div>
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_buildLanguageDBFilePath">
<div class="location">at line 207</div>
<code>
string
<strong>buildLanguageDBFilePath</strong>()</code>
</h3>
<div class="details">
<div class="method-description">
<p>Build the file path for the language CSV database</p> </div>
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_findLanguageDBFile">
<div class="location">at line 219</div>
<code>
null|string
<strong>findLanguageDBFile</strong>(
string $db_filename = null,
string $db_directory = null)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Find (and add if needed) a language file from options directories</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$db_filename</td>
<td>
</td>
</tr>
<tr>
<td>
string</td>
<td>$db_directory</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
null|string</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div id="footer">
Generated by <a href="http://sami.sensiolabs.org/">Sami, the API Documentation Generator</a>.
</div>
</div>
</div>
</body>
</html>