mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-30 21:29:23 +02:00
MINOR: Updated inline phpdoc while investigating trac/4113
This commit is contained in:
parent
f01ca808db
commit
88a222fff3
@ -152,9 +152,12 @@ class i18nTextCollector extends Object {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build the module's master string table
|
* Builds a master string table from php and .ss template files for the module passed as the $module param
|
||||||
|
* @see {@link collectFromCode} and {@link collectFromTemplate}
|
||||||
*
|
*
|
||||||
* @param string $module Module's name or 'themes'
|
* @param string $module A module's name or just 'themes'
|
||||||
|
* @return array $entities An array of entities found in the files that comprise the module
|
||||||
|
* @todo Why the type juggling for $this->collectFromBlah()? They always return arrays.
|
||||||
*/
|
*/
|
||||||
protected function processModule($module) {
|
protected function processModule($module) {
|
||||||
$entities = array();
|
$entities = array();
|
||||||
@ -194,6 +197,13 @@ class i18nTextCollector extends Object {
|
|||||||
return $entities;
|
return $entities;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extracts translatables from .php files.
|
||||||
|
*
|
||||||
|
* @param string $content The text content of a parsed template-file
|
||||||
|
* @param string $module Module's name or 'themes'
|
||||||
|
* @return array $entities An array of entities representing the extracted translation function calls in code
|
||||||
|
*/
|
||||||
public function collectFromCode($content, $module) {
|
public function collectFromCode($content, $module) {
|
||||||
$entities = array();
|
$entities = array();
|
||||||
|
|
||||||
@ -267,6 +277,16 @@ class i18nTextCollector extends Object {
|
|||||||
return $entities;
|
return $entities;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extracts translatables from .ss templates (Self referencing)
|
||||||
|
*
|
||||||
|
* @param string $content The text content of a parsed template-file
|
||||||
|
* @param string $module Module's name or 'themes'
|
||||||
|
* @param string $fileName The name of a template file when method is used in self-referencing mode
|
||||||
|
* @return array $entities An array of entities representing the extracted template function calls
|
||||||
|
*
|
||||||
|
* @todo Why the type juggling for $this->collectFromTemplate()? It always returns an array.
|
||||||
|
*/
|
||||||
public function collectFromTemplate($content, $fileName, $module) {
|
public function collectFromTemplate($content, $fileName, $module) {
|
||||||
$entities = array();
|
$entities = array();
|
||||||
|
|
||||||
@ -330,9 +350,11 @@ class i18nTextCollector extends Object {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param String $fullName
|
* Normalizes enitities with namespaces.
|
||||||
* @param String $_namespace
|
*
|
||||||
* @return String|FALSE
|
* @param string $fullName
|
||||||
|
* @param string $_namespace
|
||||||
|
* @return string|boolean FALSE
|
||||||
*/
|
*/
|
||||||
protected function normalizeEntity($fullName, $_namespace = null) {
|
protected function normalizeEntity($fullName, $_namespace = null) {
|
||||||
// split fullname into entity parts
|
// split fullname into entity parts
|
||||||
@ -360,11 +382,12 @@ class i18nTextCollector extends Object {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper function that searches for potential files to be parsed
|
* Helper function that searches for potential files (templates and code) to be parsed
|
||||||
*
|
*
|
||||||
* @param string $folder base directory to scan (will scan recursively)
|
* @param string $folder base directory to scan (will scan recursively)
|
||||||
* @param array $fileList Array where potential files will be added to
|
* @param array $fileList Array to which potential files will be appended
|
||||||
* @param String $type Optional, "php" or "ss"
|
* @param string $type Optional, "php" or "ss"
|
||||||
|
* @return array $fileList An array of files
|
||||||
*/
|
*/
|
||||||
protected function getFilesRecursive($folder, &$fileList = null, $type = null) {
|
protected function getFilesRecursive($folder, &$fileList = null, $type = null) {
|
||||||
if(!$fileList) $fileList = array();
|
if(!$fileList) $fileList = array();
|
||||||
|
Loading…
Reference in New Issue
Block a user