本文整理汇总了PHP中Illuminate\Support\Facades\Input::exists方法的典型用法代码示例。如果您正苦于以下问题:PHP Input::exists方法的具体用法?PHP Input::exists怎么用?PHP Input::exists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Support\Facades\Input
的用法示例。
在下文中一共展示了Input::exists方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getValue
public function getValue()
{
parent::getValue();
if (\Request::isMethod('post') && !Input::exists($this->name)) {
$this->value = $this->unchecked_value;
}
$this->checked = (bool) ($this->value == $this->checked_value);
}
示例2: getNewValue
public function getNewValue()
{
$process = Input::get('search') || Input::get('save') ? true : false;
if ($process && Input::exists($this->name)) {
if ($this->status == "create") {
$this->action = "insert";
} elseif ($this->status == "modify") {
$this->action = "update";
}
if ($this->multiple) {
$this->value = "";
if (Input::get($this->name)) {
$values = Input::get($this->name);
if (!is_array($values)) {
$this->new_value = $values;
} else {
$this->new_value = implode($this->serialization_sep, $values);
}
}
} else {
$this->new_value = HTML::xssfilter(Input::get($this->name));
}
} elseif ($this->action == "insert" && $this->insert_value != null) {
$this->new_value = $this->insert_value;
} elseif ($this->action == "update" && $this->update_value != null) {
$this->new_value = $this->update_value;
} else {
$this->action = "idle";
}
if ($this->new_value == "") {
$this->new_value = null;
}
}
示例3: getNewValue
public function getNewValue($forceProcess = false)
{
$process = Input::get('search') || Input::get('save') || $forceProcess ? true : false;
if ($process && Input::exists($this->name)) {
if ($this->status == "create") {
$this->action = "insert";
} elseif ($this->status == "modify") {
$this->action = "update";
}
if ($this->multiple) {
$this->value = "";
if (Input::get($this->name)) {
$values = Input::get($this->name);
if (!is_array($values)) {
$this->new_value = $values;
} else {
$this->new_value = implode($this->serialization_sep, $values);
}
}
} else {
$this->new_value = HTML::xssfilter(Input::get($this->name));
}
} elseif ($this->action == "insert" && $this->insert_value != null) {
$this->edited = true;
$this->new_value = $this->insert_value;
} elseif ($this->action == "update" && $this->update_value != null) {
$this->edited = true;
$this->new_value = $this->update_value;
} elseif ($this->type == 'auto') {
//if is auto and no default is matched, keep the old value
$this->new_value = $this->value;
} else {
$this->action = "idle";
}
if ($this->new_value == "") {
$this->new_value = null;
}
//Run the pre_save_processor
if (is_a($this->pre_save_processor, 'Closure') && $this->form) {
$this->new_value = $this->pre_save_processor->__invoke($this->new_value, $this->form->fields, $this->form->model);
}
}
示例4: getNewValue
public function getNewValue()
{
$process = Input::get('search') || Input::get('save') ? true : false;
if ($process && Input::exists($this->name)) {
if ($this->status == "create") {
$this->action = "insert";
} elseif ($this->status == "modify") {
$this->action = "update";
}
if ($this->multiple) {
$this->value = "";
if (Input::get($this->name)) {
$values = Input::get($this->name);
if (!is_array($values)) {
$this->new_value = $values;
} else {
$this->new_value = implode($this->serialization_sep, $values);
}
}
} else {
if ($this->with_xss_filter) {
$this->new_value = HTML::xssfilter(Input::get($this->name));
} else {
$this->new_value = Input::get($this->name);
}
}
} elseif ($this->action == "insert" && $this->insert_value != null) {
$this->edited = true;
$this->new_value = $this->insert_value;
} elseif ($this->action == "update" && $this->update_value != null) {
$this->edited = true;
$this->new_value = $this->update_value;
} elseif ($this->type == 'auto') {
//if is auto and no default is matched, keep the old value
$this->new_value = $this->value;
} else {
$this->action = "idle";
}
if ($this->new_value == "") {
$this->new_value = null;
}
}