本文整理汇总了PHP中Condition::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Condition::__construct方法的具体用法?PHP Condition::__construct怎么用?PHP Condition::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Condition
的用法示例。
在下文中一共展示了Condition::__construct方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
/**
* constructor
* @param string $column_name
* @param mixed $argument
* @param string $operation
* @param string $pipe
* @return void
*/
function __construct($column_name, $argument, $operation, $pipe = "")
{
if ($argument === null) {
$this->_show = false;
return;
}
parent::__construct($column_name, $argument, $operation, $pipe);
$this->_value = $argument->getValue();
}
示例2: array
/**
* constructor
* @param string $column_name
* @param mixed $argument
* @param string $operation
* @param string $pipe
* @return void
*/
function __construct($column_name, $argument, $operation, $pipe = "")
{
parent::__construct($column_name, $argument, $operation, $pipe);
$tmpArray = array('in' => 1, 'notin' => 1, 'not_in' => 1);
if (isset($tmpArray[$operation])) {
if (is_array($argument)) {
$argument = implode($argument, ',');
}
$this->_value = '(' . $argument . ')';
} else {
$this->_value = $argument;
}
}
示例3:
/**
* @param $_key
* @param $_value
*/
function __construct($_key, $_value)
{
parent::__construct($_key, '<', $_value);
}
示例4: __construct
/**
* @param string $column
* @param mixed $value
*/
public function __construct($column, $value)
{
parent::__construct($column, "LIKE ?", array($value));
}
示例5: __construct
/**
* The route can accept a simple pattern syntax: `:id` to match a path
* segment named `id`, `*path` to match a portion of the URL named
* `path` which may span multiple segments , and `(optional)` to an
* optional section. Named parameters will be collected in the array
* `$data->parameters`.
*
* @param string $route A URL pattern.
*/
public function __construct($route, $callback)
{
parent::__construct($callback);
$this->route = $route;
}
示例6:
/**
* constructor
* @param string $column_name
* @param mixed $argument
* @param string $operation
* @param string $pipe
* @return void
*/
function __construct($column_name, $argument, $operation, $pipe = "")
{
parent::__construct($column_name, $argument, $operation, $pipe);
$this->_value = $this->argument->toString();
}
示例7:
/**
* @param $_key
* @param $_value
*/
function __construct($_key, $_value)
{
parent::__construct($_key, 'LIKE', '%' . $_value . '%');
}