当前位置: 首页>>代码示例>>PHP>>正文


PHP Formo::is_set方法代码示例

本文整理汇总了PHP中Formo::is_set方法的典型用法代码示例。如果您正苦于以下问题:PHP Formo::is_set方法的具体用法?PHP Formo::is_set怎么用?PHP Formo::is_set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Formo的用法示例。


在下文中一共展示了Formo::is_set方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _get_val

 protected function _get_val()
 {
     $new_value = $this->_field->get('new_value');
     if (Formo::is_set($new_value) === TRUE) {
         return $new_value;
     }
     return ($val = $this->_field->get('value')) ? $val : array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => '', 'size' => '');
 }
开发者ID:kanikaN,项目名称:qload,代码行数:8,代码来源:file.php

示例2: getval

 public function getval()
 {
     // If the form was sent but the field wasn't set, return empty array as value
     if ($this->field->sent() and Formo::is_set($this->field->get('new_value')) === FALSE) {
         return array();
     }
     // Otherwise return the value that's set
     return Formo::is_set($this->field->get('new_value'), $new_value) === TRUE ? (array) $new_value : (array) $this->field->get('value');
 }
开发者ID:justus,项目名称:kohana-formo,代码行数:9,代码来源:core.php

示例3: checked

 public function checked()
 {
     $parent_newval = $this->field->parent()->get('new_value');
     $parent_value = $this->field->parent()->get('value');
     if (Formo::is_set($parent_newval) === FALSE and !$this->field->parent(Formo::PARENT)->sent()) {
         return in_array($this->val(), (array) $parent_value);
     }
     return in_array($this->field->val(), (array) $parent_newval);
 }
开发者ID:justus,项目名称:kohana-formo,代码行数:9,代码来源:core.php

示例4: _get_val

 protected function _get_val()
 {
     $new_value = $this->_field->get('new_value');
     // If the form was sent but the field wasn't set, return FALSE
     if ($this->_field->sent() and Formo::is_set($new_value) === FALSE) {
         return FALSE;
     }
     // Otherwise return the value that's set
     return Formo::is_set($new_value) === TRUE ? (bool) $new_value : (bool) $this->_field->get('value');
 }
开发者ID:kanikaN,项目名称:qload,代码行数:10,代码来源:bool.php

示例5: _get_val

	protected function _get_val()
	{
		$new_value = $this->_field->get('new_value');

		// If the form was sent but the field wasn't set, return empty array as value
		if ($this->_field->sent() AND Formo::is_set($new_value) === FALSE)
			return array();

		// Otherwise return the value that's set
		return (Formo::is_set($new_value, $new_value) === TRUE)
			? (array) $new_value
			: (array) $this->_field->get('value');
	}
开发者ID:refo,项目名称:kohana,代码行数:13,代码来源:checkboxes.php

示例6: sent

 public function sent(array $input = NULL)
 {
     if (Formo::is_set($this->get('sent')) === TRUE) {
         return TRUE;
     }
     $input = $input !== NULL ? $input : $this->get('input');
     foreach ((array) $input as $alias => $value) {
         if ($this->find($alias) !== TRUE) {
             $this->set('sent', TRUE);
             return TRUE;
         }
     }
     return FALSE;
 }
开发者ID:justus,项目名称:kohana-formo,代码行数:14,代码来源:core.php

示例7: not_empty

 public function not_empty()
 {
     $new_value = $this->_field->get('new_value');
     if (Formo::is_set($new_value) === FALSE and !$this->_field->get('value')) {
         return FALSE;
     }
     return $new_value !== Formo::NOTSET;
 }
开发者ID:kanikaN,项目名称:qload,代码行数:8,代码来源:driver.php

示例8: not_empty

 public function not_empty()
 {
     $new_value = $this->field->get('new_value');
     if (Formo::is_set($new_value) === FALSE and !$this->field->get('value')) {
         return FALSE;
     }
     return (bool) $new_value;
 }
开发者ID:justus,项目名称:kohana-formo,代码行数:8,代码来源:core.php


注:本文中的Formo::is_set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。