public function getContent($dataSource) { if ($this->content instanceof \Closure) { $func = $this->content; return $func($dataSource); } Assertion::nullOrScalar($this->content); return $this->content; }
/** * @return mixed */ public function getAction() { if ($this->action instanceof \Closure) { $func = $this->action; return $func($this->dataSource); } Assertion::nullOrScalar($this->action); return $this->action; }
/** * @return string */ public function getUrl($dataSource) { $url = $this->url; if ($url instanceof \Closure) { return $url($dataSource); } Assertion::nullOrScalar($url); return $url; }
/** * @return string */ public function getLabel($dataSource, $label) { if ($this->label instanceof \Closure) { $label = $this->label; return $label($dataSource); } if (is_scalar($this->label)) { return $this->label; } Assertion::nullOrScalar($label); return $label; }
public function __construct(Key $key, $lb, $li = false, $hb = null, $hi = false) { Assertion::nullOrScalar($lb); Assertion::boolean($li); Assertion::nullOrScalar($hb); Assertion::boolean($hi); $this->key = $key; $this->lower_bound = $lb; $this->lower_inclusive = $li; $this->higher_bound = $hb; $this->higher_inclusive = $hi; }