85 if (is_null($pName) || is_null($pWorksheet)|| is_null($pRange)) {
86 throw new Exception(
'Parameters can not be null.');
90 $this->_name = $pName;
91 $this->_worksheet = $pWorksheet;
92 $this->_range = $pRange;
93 $this->_localOnly = $pLocalOnly;
94 $this->_scope = ($pLocalOnly ==
true) ?
95 (($pScope == null) ? $pWorksheet : $pScope) : null;
114 if (!is_null($value)) {
119 if (!is_null($this->_worksheet)) {
120 $this->_worksheet->getParent()->removeNamedRange($this->_name,$this->_worksheet);
122 $this->_name = $value;
124 if (!is_null($this->_worksheet)) {
125 $this->_worksheet->getParent()->addNamedRange($this);
151 if (!is_null($value)) {
152 $this->_worksheet = $value;
173 if (!is_null($value)) {
174 $this->_range = $value;
195 $this->_localOnly = $value;
196 $this->_scope = $value ? $this->_worksheet : null;
216 $this->_scope = $value;
217 $this->_localOnly = ($value == null) ?
false :
true;
229 return $pSheet->
getParent()->getNamedRange($pNamedRange, $pSheet);
236 $vars = get_object_vars($this);
237 foreach ($vars as $key => $value) {
238 if (is_object($value)) {
239 $this->$key = clone $value;
241 $this->$key = $value;