Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250620) (7d9030acd6e)
PhpOffice\PhpSpreadsheet\DefinedName Class Reference
Inheritance diagram for PhpOffice\PhpSpreadsheet\DefinedName:
PhpOffice\PhpSpreadsheet\NamedFormula PhpOffice\PhpSpreadsheet\NamedRange

Public Member Functions

 __construct (string $name, ?Worksheet $worksheet=null, ?string $value=null, bool $localOnly=false, ?Worksheet $scope=null)
 Create a new Defined Name.
 
 __clone ()
 Implement PHP __clone to create a deep clone, not just a shallow copy.
 
 getLocalOnly ()
 Get localOnly.
 
 getName ()
 Get name.
 
 getScope ()
 Get scope.
 
 getValue ()
 Get range or formula value.
 
 getWorksheet ()
 Get worksheet.
 
 isFormula ()
 Identify whether this is a named range or a named formula.
 
 setLocalOnly (bool $localScope)
 Set localOnly.
 
 setName (string $name)
 Set name.
 
 setScope (?Worksheet $worksheet)
 Set scope.
 
 setValue (string $value)
 Set range or formula value.
 
 setWorksheet (?Worksheet $worksheet)
 Set worksheet.
 

Static Public Member Functions

static createInstance (string $name, ?Worksheet $worksheet=null, ?string $value=null, bool $localOnly=false, ?Worksheet $scope=null)
 Create a new defined name, either a range or a formula.
 
static resolveName (string $definedName, Worksheet $worksheet, string $sheetName='')
 Resolve a named range to a regular cell range or formula.
 
static testIfFormula (string $value)
 

Protected Attributes

bool $isFormula
 Whether this is a named range or a named formula.
 
bool $localOnly
 Is the defined named local?
 
string $name
 
Worksheet $scope
 Scope.
 
string $value
 Value of the named object.
 
Worksheet $worksheet
 Worksheet on which the defined name can be resolved.
 
const REGEXP_IDENTIFY_FORMULA = '[^_\p{N}\p{L}:, $\'!]'
 

Constructor & Destructor Documentation

◆ __construct()

PhpOffice\PhpSpreadsheet\DefinedName::__construct ( string $name,
?Worksheet $worksheet = null,
?string $value = null,
bool $localOnly = false,
?Worksheet $scope = null )

Create a new Defined Name.

Reimplemented in PhpOffice\PhpSpreadsheet\NamedFormula.

Member Data Documentation

◆ $localOnly

bool PhpOffice\PhpSpreadsheet\DefinedName::$localOnly
protected

Is the defined named local?

(i.e. can only be used on $this->worksheet).


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