Метод | Описание | |
---|---|---|
__construct ( $base_url = null, $config = 'en' ) | ||
append ( String $raw_name = null, String $side = 'right', boolean $base = false, mixed $translate = true, boolean $disabled = false ) : |
append: Appends an element to the list of Segments. Can do it from both sides, and can mark an element as base element, which means that it'll point to the base URL. | |
build ( String $format = null, String | null $casing = null, boolean $last_not_link = true, String | null $separator = null, array $customizations = [], boolean $different_links = false ) : String | Builder method which returns with a result type as required. | |
disable ( integer $pos = null ) : |
Disables a Segment at the given position. | |
from ( mixed $input = null ) : |
from: Reads the first parameter which can be a String, PHP array, JSON array and creates + appends Segments from it in one step. | |
map ( array $rawArray ) : |
Registers a list of title => link pairs with the package. | |
num_of_segments ( ) : integer | num_of_segments: Returns the number of segments which are registered in the system. | |
registered ( ) : array | registered: Returns all the registered Segments. | |
remove ( integer $pos, boolean $reindex_after_remove = false ) : |
remove: Removes an element from the list, optionally can reindex the list after removal. | |
segment ( String $id ) : |
segment: A getter which returns the Segment which is at the given position. | |
setBaseURL ( String $urlString ) : |
Sets the base URL for the package. | |
setConfiguration ( mixed $config ) : |
Dynamic Package configuration |
Метод | Описание | |
---|---|---|
appendToSide ( $segment, $side ) | ||
checkAppendArgs ( $raw_name, $side ) | ||
checkFromArgs ( $input ) | ||
inputToArray ( $input = null ) | ||
loadBuilders ( ) : array | ||
safeArrayAssignment ( $input ) : array | ||
setParam ( mixed $to_this ) : String | setParam: basic system method, don't bother. |
public append ( String $raw_name = null, String $side = 'right', boolean $base = false, mixed $translate = true, boolean $disabled = false ) : |
||
$raw_name | String | Name of the appendable Segment |
$side | String | Which side to place the segment in the array |
$base | boolean | true if it is referring to the base url |
$translate | mixed | Set to true if you want to use the provided dictionary, set to false if you want to skip translation, or set to a specific string to assign that value |
$disabled | boolean | |
Результат |
public build ( String $format = null, String | null $casing = null, boolean $last_not_link = true, String | null $separator = null, array $customizations = [], boolean $different_links = false ) : String | ||
$format | String | Format of the output |
$casing | String | null | Casing of Segments |
$last_not_link | boolean | |
$separator | String | null | Separator String (not there in Foundation!) |
$customizations | array | Array of properties (only in HTML!) |
$different_links | boolean | |
Результат | String |
public num_of_segments ( ) : integer | ||
Результат | integer |
public registered ( ) : array | ||
Результат | array |
public segment ( String $id ) : |
||
$id | String | The ID of the required Segment. |
Результат |
public setBaseURL ( String $urlString ) : |
||
$urlString | String | Base URL |
Результат |
public setConfiguration ( mixed $config ) : |
||
$config | mixed | Configurations (either lang code as String, or configuration array) |
Результат |