本文整理汇总了PHP中utils::htmlDeOut方法的典型用法代码示例。如果您正苦于以下问题:PHP utils::htmlDeOut方法的具体用法?PHP utils::htmlDeOut怎么用?PHP utils::htmlDeOut使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类utils
的用法示例。
在下文中一共展示了utils::htmlDeOut方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getValue
/**
* Get the actual value
*
* @param null|string $key Null to get both values or string to get only one
* @param string $mode How get the value in case of retriving only one value
* @return mixed
*/
public function getValue($key = null, $mode = 'raw')
{
if (!is_null($key)) {
$ret = $this->cfg->getInArray('rangeValue', $key);
} else {
$ret = $this->rangeValue;
}
return utils::htmlDeOut($ret);
}
示例2: getValue
public function getValue($key = null, $mode = 'raw')
{
if (!is_null($key)) {
if ($mode == 'input') {
$ret = $this->set[$key] ? $this->dates[$key]->format('date', 'short2') : null;
} else {
$ret = $this->cfg->getInArray('rangeValue', $key);
}
} else {
$ret = $this->rangeValue;
}
return utils::htmlDeOut($ret);
}
示例3: getValue
/**
* Get the actual value
*
* @param bool $outside Indicate if it's coming from outside (ie if it should be htmlDeOut)
* @return mixed
*/
public function getValue($outside = true)
{
$val = parent::getValue();
if (!is_null($this->cfg->valueNone) && $val == $this->cfg->valueNone) {
return null;
}
if ($this->cfg->needOut) {
if ($outside) {
$val = utils::htmlDeOut($val, true);
} else {
$val = utils::htmlOut($val, true);
}
}
return $val;
}
示例4: addNew
/**
* Parse values send through POST data and eventually add the new ones
*
* @param array $values Valeus to parse
* @return array Values to use
*/
protected function addNew(array $values)
{
$new = isset($values['new']) && is_array($values['new']) ? array_filter($values['new']) : null;
unset($values['new']);
if ($this->cfg->allowAdd && count($new) && is_array($new)) {
$dbList = $this->cfg->dbList;
if (is_array($dbList) && $dbList['table']) {
$tbl = db::get('table', $dbList['table']);
$list = utils::htmlDeOut($this->cfg->list);
$i18n = isset($dbList['i18nFields']) && $dbList['i18nFields'];
if (!$i18n) {
$field = substr($dbList['fields'], strlen($dbList['ident']) + 1);
}
foreach ($new as $v) {
$exists = array_search($v, $list);
if ($exists === false) {
$row = $tbl->getRow();
if ($i18n) {
$i18nRow = $row->getI18nRow();
$i18nRow->set($dbList['i18nFields'], $v);
} else {
$row->set($field, $v);
}
$id = $row->save();
$values[] = $id;
$list[$id] = $v;
} else {
$values[] = $exists;
}
}
$this->cfg->list = utils::htmlOut($list);
if (is_array($this->cfg->list)) {
$this->addRule('in', array_keys($this->cfg->list));
}
}
}
return $values;
}
示例5: getValue
/**
* Get the actual value
*
* @return mixed
*/
public function getValue()
{
return utils::htmlDeOut($this->cfg->value);
}