本文整理汇总了PHP中Statement::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Statement::__construct方法的具体用法?PHP Statement::__construct怎么用?PHP Statement::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Statement
的用法示例。
在下文中一共展示了Statement::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructs a conditional statement.
*
* @param string $condition The condition statement
* @param \Helmich\TypoScriptParser\Parser\AST\Statement[] $ifStatements The statements in the if-branch.
* @param \Helmich\TypoScriptParser\Parser\AST\Statement[] $elseStatements The statements in the else-branch (may be empty).
* @param int $sourceLine The original source line.
*/
public function __construct($condition, array $ifStatements, array $elseStatements, $sourceLine)
{
parent::__construct($sourceLine);
$this->condition = $condition;
$this->ifStatements = $ifStatements;
$this->elseStatements = $elseStatements;
}
示例2: array
function __construct($name, $value, $operator = null, \Kinesis\Task $parent = null)
{
if (is_null($operator)) {
$operator = '=';
}
$params = array('Name' => $name, 'Value' => $value, 'Operator' => $operator);
parent::__construct($params, $parent);
}
示例3: __construct
public function __construct($string, $token = self::SEMICOLON_TOKEN, $raw = null)
{
parent::__construct($raw);
$this->string = $string;
$this->token = $token;
if ($this->token !== self::NUMBER_TOKEN && $this->token !== self::SEMICOLON_TOKEN) {
$this->token = self::SEMICOLON_TOKEN;
}
}
示例4: __construct
public function __construct($key, $value, $delimiter = self::EQUALSIGN_DELIMITER, $raw = null)
{
parent::__construct($raw);
$this->key = $key;
$this->value = $value;
$this->delimiter = $delimiter;
if ($this->delimiter !== self::EQUALSIGN_DELIMITER && $this->delimiter !== self::COLON_DELIMITER) {
$this->delimiter = self::EQUALSIGN_DELIMITER;
}
}
示例5: array
function __construct($name, $value = null, \Kinesis\Task $parent)
{
if (is_array($name) && is_null($value)) {
$params = array('Data' => $name);
} elseif (is_scalar($name) && !is_null($value)) {
$params = array('Data' => array($name => $value));
}
$parent->Parameters['Container']->addChild($this);
parent::__construct($params, $parent->Parameters['Container']);
}
示例6: __construct
/**
* @param Connection $connection
* @param null $paging
* @param null $resource
*/
public function __construct(Connection $connection, $paging = null, &$resource = null)
{
parent::__construct($connection, $paging, $resource);
if (isset($resource)) {
if (is_resource($resource)) {
$this->resource = $resource;
} else {
$this->resource = oci_new_cursor($this->connection->resource);
$trace = debug_backtrace();
trigger_error('Invalid input via __construct(): value is not a valid resource for ("this->resource' . '") in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_NOTICE);
}
} else {
$this->resource = oci_new_cursor($this->connection->resource);
}
}
示例7: array
function __construct()
{
$params = array();
if (func_num_args() > 0) {
$args = func_get_args();
if (is_array($args[0])) {
$params = $args[0];
}
if (is_string($args[0])) {
if (strpos($args[0], ',') !== false) {
$params = explode(',', $args[0]);
} else {
$parent = array_pop($args);
$params = $args;
}
}
}
parent::__construct($params, $parent);
}
示例8: __construct
/**
* @param \Helmich\TypoScriptParser\Parser\AST\ObjectPath $object The object to operate on.
* @param \Helmich\TypoScriptParser\Parser\AST\Statement[] $statements The nested statements.
* @param int $sourceLine The original source line.
*/
public function __construct(ObjectPath $object, array $statements, $sourceLine)
{
parent::__construct($sourceLine);
$this->object = $object;
$this->statements = $statements;
}
示例9:
function __construct($item, \Kinesis\Task $parent)
{
$container = $parent->Parameters['Container'];
$container->addChild($this);
parent::__construct(array('Item' => $item), $container);
}
示例10:
function __construct(array $params, \Kinesis\Task $parent)
{
$parent->Parameters['Container'] = $this;
parent::__construct($params, $parent);
}
示例11:
function __construct($table, \Kinesis\Task $parent)
{
parent::__construct(array('Table' => $table), $parent);
}
示例12:
function __construct($attribute, \Kinesis\Task $parent)
{
$parent->addChild($this);
$this->setComponent($parent->Parent->getComponent());
parent::__construct(array('Attribute' => $attribute), $parent);
}
示例13:
function __construct($attribute, \Kinesis\Task $parent)
{
$parent->Children['Alter']->addChild($this);
parent::__construct(array('Attribute' => $attribute), $parent->Children['Alter']);
}
示例14: array
function __construct($name, $attribute, \Kinesis\Task $parent)
{
$parent->Children['Alter']->addChild($this);
$params = array('Attribute' => $attribute, 'Name' => $name);
parent::__construct($params, $parent->Children['Alter']);
}
示例15:
function __construct(\Kinesis\Task $parent)
{
parent::__construct(null, $parent);
}