PHP Class Noherczeg\Breadcrumb\Builders\Builder

Show file Open project: noherczeg/breadcrumb Class Usage Examples

Protected Properties

Property Type Description
$base_url string
$casing string
$config Noherczeg\Breadcrumb\Config
$segments Noherczeg\Breadcrumb\Segment[]
$separator string

Public Methods

Method Description
__construct ( array $segments = [], $base_url = '', $config = [] )
build ( )
casing ( String $string, String $to = '' ) : String casing: Provides casing operation to the class.
link ( boolean $skip_last = true, boolean $different_links = false ) : array link: Inserts proper URLs to each Segment which is IN THE BUILDER's list.
properties ( array $properties = [] ) : string properties: Transforms an array of properties to a chain of html property key + value pairs.

Private Methods

Method Description
allowedToSetLink ( $key, Segment $segment )
getLastKey ( )
initCurrentUrl ( )
isBaseElement ( Segment $segment, $position )
setLink ( $key, Segment $segment, $position )
setNextCurrentURL ( Segment $segment, $different_links )

Method Details

__construct() public method

public __construct ( array $segments = [], $base_url = '', $config = [] )
$segments array

build() abstract public method

abstract public build ( )

casing() public method

casing: Provides casing operation to the class.
public casing ( String $string, String $to = '' ) : String
$string String String to format
$to String Name of casing
return String

properties() public method

properties: Transforms an array of properties to a chain of html property key + value pairs.
public properties ( array $properties = [] ) : string
$properties array Array of properties
return string Chained properties

Property Details

$base_url protected property

protected string $base_url
return string

$casing protected property

protected string $casing
return string

$config protected property

protected Config,Noherczeg\Breadcrumb $config
return Noherczeg\Breadcrumb\Config

$segments protected property

protected Segment[],Noherczeg\Breadcrumb $segments
return Noherczeg\Breadcrumb\Segment[]

$separator protected property

protected string $separator
return string