__clone() публичный Метод

Clones associated controller and model. If cloning views, add them to the owner.
public __clone ( ) : AbstractObject
Результат AbstractObject Copy of this object
 /** Duplicate view and it's template. Will not duplicate children */
 function __clone()
 {
     parent::__clone();
     if ($this->template) {
         $this->template = clone $this->template;
     }
 }
Пример #2
0
 function __clone()
 {
     parent::__clone();
     if ($this->model) {
         $this->model = clone $this->model;
     }
 }
    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
0
 public function __clone()
 {
     parent::__clone();
     $this->cachedPropertyNameMappings = ArrayHelper::cloneArray($this->cachedPropertyNameMappings);
     if (isset($this->parent)) {
         $this->parent = clone $this->parent;
     }
 }
    public function __clone() {
        parent::__clone();

        $this->formattedColumnNames = ArrayHelper::copy($this->formattedColumnNames);

        if (isset($this->parent)) {
            $this->parent = clone $this->parent;
        }
    }
Пример #6
0
 /** 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;
     }
 }
 public function __clone() {
     parent::__clone();
     $this->segmentLinkIds = ArrayHelper::copy($this->segmentLinkIds);
 }