Noherczeg\Breadcrumb\Breadcrumb::build PHP Method

build() public method

Supports separator switching, casing switching, and custom property insertion from an array (only if output is set to html!).
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
return String
    public function build($format = null, $casing = null, $last_not_link = true, $separator = null, $customizations = array(), $different_links = false)
    {
        $format = is_null($format) ? $this->config->value('output_format') : $format;
        if (in_array($format, $this->build_formats)) {
            // compose the namespaced name of the builder which we wanted to use
            $builder_name = '\\Noherczeg\\Breadcrumb\\Builders\\' . ucfirst($format) . 'Builder';
            // instantiate it
            $this->builder_instance = new $builder_name($this->segments, $this->base_url, $this->config);
            // return with the results :)
            return $this->builder_instance->build($casing, $last_not_link, $separator, $customizations, $different_links);
        } else {
            throw new OutOfRangeException("Provided output format({$format}) is not supported!");
        }
    }