Noherczeg\Breadcrumb\Segment::__construct PHP 메소드

__construct() 공개 메소드

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
    public function __construct($raw_insert, $base = false, $disabled = false)
    {
        if (!is_string($raw_insert) && !is_int($raw_insert) || !is_bool($base) || !is_bool($disabled)) {
            throw new \InvalidArgumentException("Invalid arguments given, name has to be: String, optional second parameter: bool");
        }
        $this->raw = $raw_insert;
        $this->base = $base;
        $this->disabled = $disabled;
    }