PHP Class Noherczeg\Breadcrumb\Segment

Class that represents a single URI segment, and add functionality to it. This is used and manipulated by Breadcrumb. A key building block
Mostrar archivo Open project: noherczeg/breadcrumb Class Usage Examples

Public Methods

Method Description
__construct ( String $raw_insert, boolean $base = false, boolean $disabled = false ) Constructor
disable ( ) Disables this Segment.
enable ( ) Enables this Segment.
get ( string $property_name ) : string get: Mediocre getter which returns a single requested property.
is_base ( ) : boolean is_base: Tells if the Segment is a base Segment or not.
setLink ( string $link ) setLink: Basic setter method.
setTranslated ( string $value ) setTranslated: Basic setter method.
vars ( ) : array vars: alias method.

Method Details

__construct() public method

Constructor
public __construct ( String $raw_insert, boolean $base = false, boolean $disabled = false )
$raw_insert String The value/name of the segment in the URI
$base boolean If this points to the base url of your site, then set to true, otherwise false
$disabled boolean

disable() public method

Basically makes the builder process ignore the link generation if it is disabled.
public disable ( )

enable() public method

The exact opposite of the above
public enable ( )

get() public method

get: Mediocre getter which returns a single requested property.
public get ( string $property_name ) : string
$property_name string
return string

is_base() public method

is_base: Tells if the Segment is a base Segment or not.
public is_base ( ) : boolean
return boolean

setTranslated() public method

setTranslated: Basic setter method.
public setTranslated ( string $value )
$value string

vars() public method

vars: alias method.
public vars ( ) : array
return array