Example #1
0
 /**
  *
  */
 function __clone()
 {
     if (!is_object($this->config)) {
         return null;
     }
     if (!$this->config instanceof Scope) {
         return $this->config = clone $this->config;
     }
     $scope = $this->config->scope();
     if (!$scope instanceof self) {
         return $this->config = clone $this->config;
     }
     $this->config->scope(false);
     $clone = clone $this->config;
     $clone->scope($this);
     $this->config->scope($scope);
     return $this->config = $clone;
 }