本文整理汇总了PHP中AbstractObject::__clone方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractObject::__clone方法的具体用法?PHP AbstractObject::__clone怎么用?PHP AbstractObject::__clone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AbstractObject
的用法示例。
在下文中一共展示了AbstractObject::__clone方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
/** Duplicate view and it's template. Will not duplicate children */
function __clone()
{
parent::__clone();
if ($this->template) {
$this->template = clone $this->template;
}
}
示例2:
function __clone()
{
parent::__clone();
if ($this->model) {
$this->model = clone $this->model;
}
}
示例3: __clone
public function __clone() {
parent::__clone();
// when we clone this object we need to clean pre-calculated values
// usually cloning is done before modification of this or parent objects and that could lead to different calculation
$this->calculatedValues = NULL;
$this->calculatedValueFlags = NULL;
}
示例4: __clone
public function __clone()
{
parent::__clone();
$this->cachedPropertyNameMappings = ArrayHelper::cloneArray($this->cachedPropertyNameMappings);
if (isset($this->parent)) {
$this->parent = clone $this->parent;
}
}
示例5: __clone
public function __clone() {
parent::__clone();
$this->formattedColumnNames = ArrayHelper::copy($this->formattedColumnNames);
if (isset($this->parent)) {
$this->parent = clone $this->parent;
}
}
示例6:
/** Duplicate view and it's template. Will not duplicate children */
function __clone()
{
parent::__clone();
if ($this->template) {
$this->template = clone $this->template;
}
if ($this->controller) {
$this->controller = clone $this->controller;
}
}
示例7: __clone
public function __clone() {
parent::__clone();
$this->segmentLinkIds = ArrayHelper::copy($this->segmentLinkIds);
}