\StringExtractor

Responsible for extracting translatable strings from PHP source files in the form of Translations instances

Summary

Methods
Properties
Constants
__construct()
extract_from_directory()
extract_from_file()
does_file_name_match()
entry_from_call()
extract_from_code()
find_function_calls()
$rules
$comment_prefix
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$rules

$rules

$comment_prefix

$comment_prefix

Methods

__construct()

__construct( $rules)

Parameters

$rules

extract_from_directory()

extract_from_directory( $dir,  $excludes,  $includes,  $prefix)

Parameters

$dir
$excludes
$includes
$prefix

extract_from_file()

extract_from_file( $file_name,  $prefix)

Parameters

$file_name
$prefix

does_file_name_match()

does_file_name_match( $path,  $excludes,  $includes)

Parameters

$path
$excludes
$includes

entry_from_call()

entry_from_call( $call,  $file_name)

Parameters

$call
$file_name

extract_from_code()

extract_from_code( $code,  $file_name)

Parameters

$code
$file_name

find_function_calls()

find_function_calls( $function_names,  $code)

Finds all function calls in $code and returns an array with an associative array for each function: - name - name of the function - args - array for the function arguments. Each string literal is represented by itself, other arguments are represented by null.

  • line - line number

Parameters

$function_names
$code