ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
PHPExcel_NamedRange Class Reference
+ Collaboration diagram for PHPExcel_NamedRange:

Public Member Functions

 __construct ($pName=null, PHPExcel_Worksheet $pWorksheet, $pRange= 'A1', $pLocalOnly=false)
 Create a new NamedRange.
 getName ()
 Get name.
 setName ($value=null)
 Set name.
 getWorksheet ()
 Get worksheet.
 setWorksheet (PHPExcel_Worksheet $value=null)
 Set worksheet.
 getRange ()
 Get range.
 setRange ($value=null)
 Set range.
 getLocalOnly ()
 Get localOnly.
 setLocalOnly ($value=false)
 Set localOnly.
 __clone ()
 Implement PHP __clone to create a deep clone, not just a shallow copy.

Static Public Member Functions

static resolveRange ($pNamedRange= '', PHPExcel_Worksheet $pSheet)
 Resolve a named range to a regular cell range.

Private Attributes

 $_name
 $_worksheet
 $_range
 $_localOnly

Detailed Description

Definition at line 54 of file NamedRange.php.

Constructor & Destructor Documentation

PHPExcel_NamedRange::__construct (   $pName = null,
PHPExcel_Worksheet  $pWorksheet,
  $pRange = 'A1',
  $pLocalOnly = false 
)

Create a new NamedRange.

Parameters
string$pName
PHPExcel_Worksheet$pWorksheet
string$pRange
bool$pLocalOnly

Definition at line 92 of file NamedRange.php.

{
// Validate data
if (is_null($pName) || is_null($pWorksheet)|| is_null($pRange)) {
throw new Exception('Parameters can not be null.');
}
// Set local members
$this->_name = $pName;
$this->_worksheet = $pWorksheet;
$this->_range = $pRange;
$this->_localOnly = $pLocalOnly;
}

Member Function Documentation

PHPExcel_NamedRange::__clone ( )

Implement PHP __clone to create a deep clone, not just a shallow copy.

Definition at line 221 of file NamedRange.php.

References $key.

{
$vars = get_object_vars($this);
foreach ($vars as $key => $value) {
if (is_object($value)) {
$this->$key = clone $value;
} else {
$this->$key = $value;
}
}
}
PHPExcel_NamedRange::getLocalOnly ( )

Get localOnly.

Returns
bool

Definition at line 192 of file NamedRange.php.

References $_localOnly.

Referenced by PHPExcel_Writer_Excel2007_Workbook\_writeDefinedNameForNamedRange().

{
}

+ Here is the caller graph for this function:

PHPExcel_NamedRange::getName ( )

Get name.

Returns
string

Definition at line 111 of file NamedRange.php.

References $_name.

Referenced by PHPExcel_Writer_Excel2007_Workbook\_writeDefinedNameForNamedRange(), and PHPExcel\addNamedRange().

{
return $this->_name;
}

+ Here is the caller graph for this function:

PHPExcel_NamedRange::getRange ( )

Get range.

Returns
string

Definition at line 170 of file NamedRange.php.

References $_range.

Referenced by PHPExcel_Writer_Excel2007_Workbook\_writeDefinedNameForNamedRange().

{
return $this->_range;
}

+ Here is the caller graph for this function:

PHPExcel_NamedRange::getWorksheet ( )

Get worksheet.

Returns
PHPExcel_Worksheet

Definition at line 148 of file NamedRange.php.

References $_worksheet.

Referenced by PHPExcel_Writer_Excel2007_Workbook\_writeDefinedNameForNamedRange(), and PHPExcel\addNamedRange().

{
}

+ Here is the caller graph for this function:

static PHPExcel_NamedRange::resolveRange (   $pNamedRange = '',
PHPExcel_Worksheet  $pSheet 
)
static

Resolve a named range to a regular cell range.

Parameters
string$pNamedRangeNamed range
PHPExcel_Worksheet$pSheetWorksheet
Returns
PHPExcel_NamedRange

Definition at line 214 of file NamedRange.php.

References PHPExcel_Worksheet\getParent().

Referenced by PHPExcel_Worksheet\cellExists(), PHPExcel_Calculation\extractNamedRange(), and PHPExcel_Worksheet\getCell().

{
return $pSheet->getParent()->getNamedRange($pNamedRange, $pSheet);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

PHPExcel_NamedRange::setLocalOnly (   $value = false)

Set localOnly.

Parameters
bool$value
Returns
PHPExcel_NamedRange

Definition at line 202 of file NamedRange.php.

{
$this->_localOnly = $value;
return $this;
}
PHPExcel_NamedRange::setName (   $value = null)

Set name.

Parameters
string$value
Returns
PHPExcel_NamedRange

Definition at line 121 of file NamedRange.php.

References $_name, and PHPExcel_ReferenceHelper\getInstance().

{
if (!is_null($value)) {
// Old title
$oldTitle = $this->_name;
// Re-attach
if (!is_null($this->_worksheet)) {
$this->_worksheet->getParent()->removeNamedRange($this->_name,$this->_worksheet);
}
$this->_name = $value;
if (!is_null($this->_worksheet)) {
$this->_worksheet->getParent()->addNamedRange($this);
}
// New title
$newTitle = $this->_name;
PHPExcel_ReferenceHelper::getInstance()->updateNamedFormulas($this->_worksheet->getParent(), $oldTitle, $newTitle);
}
return $this;
}

+ Here is the call graph for this function:

PHPExcel_NamedRange::setRange (   $value = null)

Set range.

Parameters
string$value
Returns
PHPExcel_NamedRange

Definition at line 180 of file NamedRange.php.

{
if (!is_null($value)) {
$this->_range = $value;
}
return $this;
}
PHPExcel_NamedRange::setWorksheet ( PHPExcel_Worksheet  $value = null)

Set worksheet.

Parameters
PHPExcel_Worksheet$value
Returns
PHPExcel_NamedRange

Definition at line 158 of file NamedRange.php.

{
if (!is_null($value)) {
$this->_worksheet = $value;
}
return $this;
}

Field Documentation

PHPExcel_NamedRange::$_localOnly
private

Definition at line 82 of file NamedRange.php.

Referenced by getLocalOnly().

PHPExcel_NamedRange::$_name
private

Definition at line 61 of file NamedRange.php.

Referenced by getName(), and setName().

PHPExcel_NamedRange::$_range
private

Definition at line 75 of file NamedRange.php.

Referenced by getRange().

PHPExcel_NamedRange::$_worksheet
private

Definition at line 68 of file NamedRange.php.

Referenced by getWorksheet().


The documentation for this class was generated from the following file: