Properties
in package
Table of Contents
Constants
- PROPERTY_TYPE_BOOLEAN = 'b'
- constants
- PROPERTY_TYPE_DATE = 'd'
- PROPERTY_TYPE_FLOAT = 'f'
- PROPERTY_TYPE_INTEGER = 'i'
- PROPERTY_TYPE_STRING = 's'
- PROPERTY_TYPE_UNKNOWN = 'u'
- SUGGESTED_VIEWPORT = 'width=device-width, initial-scale=1'
- PROPERTY_TYPE_ARRAY = [ 'i' => self::PROPERTY_TYPE_INTEGER, // Integer 'i1' => self::PROPERTY_TYPE_INTEGER, // 1-Byte Signed Integer 'i2' => self::PROPERTY_TYPE_INTEGER, // 2-Byte Signed Integer 'i4' => self::PROPERTY_TYPE_INTEGER, // 4-Byte Signed Integer 'i8' => self::PROPERTY_TYPE_INTEGER, // 8-Byte Signed Integer 'int' => self::PROPERTY_TYPE_INTEGER, // Integer 'ui1' => self::PROPERTY_TYPE_INTEGER, // 1-Byte Unsigned Integer 'ui2' => self::PROPERTY_TYPE_INTEGER, // 2-Byte Unsigned Integer 'ui4' => self::PROPERTY_TYPE_INTEGER, // 4-Byte Unsigned Integer 'ui8' => self::PROPERTY_TYPE_INTEGER, // 8-Byte Unsigned Integer 'uint' => self::PROPERTY_TYPE_INTEGER, // Unsigned Integer 'f' => self::PROPERTY_TYPE_FLOAT, // Real Number 'r4' => self::PROPERTY_TYPE_FLOAT, // 4-Byte Real Number 'r8' => self::PROPERTY_TYPE_FLOAT, // 8-Byte Real Number 'decimal' => self::PROPERTY_TYPE_FLOAT, // Decimal 's' => self::PROPERTY_TYPE_STRING, // String 'empty' => self::PROPERTY_TYPE_STRING, // Empty 'null' => self::PROPERTY_TYPE_STRING, // Null 'lpstr' => self::PROPERTY_TYPE_STRING, // LPSTR 'lpwstr' => self::PROPERTY_TYPE_STRING, // LPWSTR 'bstr' => self::PROPERTY_TYPE_STRING, // Basic String 'd' => self::PROPERTY_TYPE_DATE, // Date and Time 'date' => self::PROPERTY_TYPE_DATE, // Date and Time 'filetime' => self::PROPERTY_TYPE_DATE, // File Time 'b' => self::PROPERTY_TYPE_BOOLEAN, // Boolean 'bool' => self::PROPERTY_TYPE_BOOLEAN, ]
- SPECIAL_TYPES = ['empty' => '', 'null' => null]
- VALID_PROPERTY_TYPE_LIST = [self::PROPERTY_TYPE_BOOLEAN, self::PROPERTY_TYPE_INTEGER, self::PROPERTY_TYPE_FLOAT, self::PROPERTY_TYPE_DATE, self::PROPERTY_TYPE_STRING]
Properties
- $category : string
- Category.
- $company : string
- Company.
- $created : float|int
- Created.
- $creator : string
- Creator.
- $customProperties : array<string|int, array{value: null|bool|float|int|string, type: string}>
- Custom Properties.
- $description : string
- Description.
- $hyperlinkBase : string
- $keywords : string
- Keywords.
- $lastModifiedBy : string
- LastModifiedBy.
- $manager : string
- Manager.
- $modified : float|int
- Modified.
- $subject : string
- Subject.
- $title : string
- Title.
- $viewport : string
Methods
- __construct() : mixed
- Create a new Document Properties instance.
- convertProperty() : bool|int|float|string|null
- Convert property to form desired by Excel.
- convertPropertyType() : string
- getCategory() : string
- Get Category.
- getCompany() : string
- Get Company.
- getCreated() : float|int
- Get Created.
- getCreator() : string
- Get Creator.
- getCustomProperties() : array<string|int, string>
- Get a List of Custom Property Names.
- getCustomPropertyType() : string|null
- Get a Custom Property Type.
- getCustomPropertyValue() : bool|int|float|string|null
- Get a Custom Property Value.
- getDescription() : string
- Get Description.
- getHyperlinkBase() : string
- getKeywords() : string
- Get Keywords.
- getLastModifiedBy() : string
- Get Last Modified By.
- getManager() : string
- Get Manager.
- getModified() : float|int
- Get Modified.
- getSubject() : string
- Get Subject.
- getTitle() : string
- Get Title.
- getViewport() : string
- isCustomPropertySet() : bool
- Check if a Custom Property is defined.
- setCategory() : $this
- Set Category.
- setCompany() : $this
- Set Company.
- setCreated() : $this
- Set Created.
- setCreator() : $this
- Set Creator.
- setCustomProperty() : $this
- Set a Custom Property.
- setDescription() : $this
- Set Description.
- setHyperlinkBase() : self
- setKeywords() : $this
- Set Keywords.
- setLastModifiedBy() : $this
- Set Last Modified By.
- setManager() : $this
- Set Manager.
- setModified() : $this
- Set Modified.
- setSubject() : $this
- Set Subject.
- setTitle() : $this
- Set Title.
- setViewport() : self
- convertProperty2() : bool|int|float|string|null
- Convert property to form desired by Excel.
- identifyPropertyType() : string
- intOrFloatTimestamp() : float|int
Constants
PROPERTY_TYPE_BOOLEAN
constants
public
mixed
PROPERTY_TYPE_BOOLEAN
= 'b'
PROPERTY_TYPE_DATE
public
mixed
PROPERTY_TYPE_DATE
= 'd'
PROPERTY_TYPE_FLOAT
public
mixed
PROPERTY_TYPE_FLOAT
= 'f'
PROPERTY_TYPE_INTEGER
public
mixed
PROPERTY_TYPE_INTEGER
= 'i'
PROPERTY_TYPE_STRING
public
mixed
PROPERTY_TYPE_STRING
= 's'
PROPERTY_TYPE_UNKNOWN
public
mixed
PROPERTY_TYPE_UNKNOWN
= 'u'
SUGGESTED_VIEWPORT
public
mixed
SUGGESTED_VIEWPORT
= 'width=device-width, initial-scale=1'
PROPERTY_TYPE_ARRAY
private
mixed
PROPERTY_TYPE_ARRAY
= [
'i' => self::PROPERTY_TYPE_INTEGER,
// Integer
'i1' => self::PROPERTY_TYPE_INTEGER,
// 1-Byte Signed Integer
'i2' => self::PROPERTY_TYPE_INTEGER,
// 2-Byte Signed Integer
'i4' => self::PROPERTY_TYPE_INTEGER,
// 4-Byte Signed Integer
'i8' => self::PROPERTY_TYPE_INTEGER,
// 8-Byte Signed Integer
'int' => self::PROPERTY_TYPE_INTEGER,
// Integer
'ui1' => self::PROPERTY_TYPE_INTEGER,
// 1-Byte Unsigned Integer
'ui2' => self::PROPERTY_TYPE_INTEGER,
// 2-Byte Unsigned Integer
'ui4' => self::PROPERTY_TYPE_INTEGER,
// 4-Byte Unsigned Integer
'ui8' => self::PROPERTY_TYPE_INTEGER,
// 8-Byte Unsigned Integer
'uint' => self::PROPERTY_TYPE_INTEGER,
// Unsigned Integer
'f' => self::PROPERTY_TYPE_FLOAT,
// Real Number
'r4' => self::PROPERTY_TYPE_FLOAT,
// 4-Byte Real Number
'r8' => self::PROPERTY_TYPE_FLOAT,
// 8-Byte Real Number
'decimal' => self::PROPERTY_TYPE_FLOAT,
// Decimal
's' => self::PROPERTY_TYPE_STRING,
// String
'empty' => self::PROPERTY_TYPE_STRING,
// Empty
'null' => self::PROPERTY_TYPE_STRING,
// Null
'lpstr' => self::PROPERTY_TYPE_STRING,
// LPSTR
'lpwstr' => self::PROPERTY_TYPE_STRING,
// LPWSTR
'bstr' => self::PROPERTY_TYPE_STRING,
// Basic String
'd' => self::PROPERTY_TYPE_DATE,
// Date and Time
'date' => self::PROPERTY_TYPE_DATE,
// Date and Time
'filetime' => self::PROPERTY_TYPE_DATE,
// File Time
'b' => self::PROPERTY_TYPE_BOOLEAN,
// Boolean
'bool' => self::PROPERTY_TYPE_BOOLEAN,
]
SPECIAL_TYPES
private
mixed
SPECIAL_TYPES
= ['empty' => '', 'null' => null]
VALID_PROPERTY_TYPE_LIST
private
mixed
VALID_PROPERTY_TYPE_LIST
= [self::PROPERTY_TYPE_BOOLEAN, self::PROPERTY_TYPE_INTEGER, self::PROPERTY_TYPE_FLOAT, self::PROPERTY_TYPE_DATE, self::PROPERTY_TYPE_STRING]
Properties
$category
Category.
private
string
$category
= ''
$company
Company.
private
string
$company
= ''
$created
Created.
private
float|int
$created
$creator
Creator.
private
string
$creator
= 'Unknown Creator'
$customProperties
Custom Properties.
private
array<string|int, array{value: null|bool|float|int|string, type: string}>
$customProperties
= []
$description
Description.
private
string
$description
= ''
$hyperlinkBase
private
string
$hyperlinkBase
= ''
$keywords
Keywords.
private
string
$keywords
= ''
$lastModifiedBy
LastModifiedBy.
private
string
$lastModifiedBy
$manager
Manager.
private
string
$manager
= ''
$modified
Modified.
private
float|int
$modified
$subject
Subject.
private
string
$subject
= ''
$title
Title.
private
string
$title
= 'Untitled Spreadsheet'
$viewport
private
string
$viewport
= ''
Methods
__construct()
Create a new Document Properties instance.
public
__construct() : mixed
convertProperty()
Convert property to form desired by Excel.
public
static convertProperty(bool|int|float|string|null $propertyValue, string $propertyType) : bool|int|float|string|null
Parameters
- $propertyValue : bool|int|float|string|null
- $propertyType : string
Return values
bool|int|float|string|nullconvertPropertyType()
public
static convertPropertyType(string $propertyType) : string
Parameters
- $propertyType : string
Return values
stringgetCategory()
Get Category.
public
getCategory() : string
Return values
stringgetCompany()
Get Company.
public
getCompany() : string
Return values
stringgetCreated()
Get Created.
public
getCreated() : float|int
Return values
float|intgetCreator()
Get Creator.
public
getCreator() : string
Return values
stringgetCustomProperties()
Get a List of Custom Property Names.
public
getCustomProperties() : array<string|int, string>
Return values
array<string|int, string>getCustomPropertyType()
Get a Custom Property Type.
public
getCustomPropertyType(string $propertyName) : string|null
Parameters
- $propertyName : string
Return values
string|nullgetCustomPropertyValue()
Get a Custom Property Value.
public
getCustomPropertyValue(string $propertyName) : bool|int|float|string|null
Parameters
- $propertyName : string
Return values
bool|int|float|string|nullgetDescription()
Get Description.
public
getDescription() : string
Return values
stringgetHyperlinkBase()
public
getHyperlinkBase() : string
Return values
stringgetKeywords()
Get Keywords.
public
getKeywords() : string
Return values
stringgetLastModifiedBy()
Get Last Modified By.
public
getLastModifiedBy() : string
Return values
stringgetManager()
Get Manager.
public
getManager() : string
Return values
stringgetModified()
Get Modified.
public
getModified() : float|int
Return values
float|intgetSubject()
Get Subject.
public
getSubject() : string
Return values
stringgetTitle()
Get Title.
public
getTitle() : string
Return values
stringgetViewport()
public
getViewport() : string
Return values
stringisCustomPropertySet()
Check if a Custom Property is defined.
public
isCustomPropertySet(string $propertyName) : bool
Parameters
- $propertyName : string
Return values
boolsetCategory()
Set Category.
public
setCategory(string $category) : $this
Parameters
- $category : string
Return values
$thissetCompany()
Set Company.
public
setCompany(string $company) : $this
Parameters
- $company : string
Return values
$thissetCreated()
Set Created.
public
setCreated(null|float|int|string $timestamp) : $this
Parameters
- $timestamp : null|float|int|string
Return values
$thissetCreator()
Set Creator.
public
setCreator(string $creator) : $this
Parameters
- $creator : string
Return values
$thissetCustomProperty()
Set a Custom Property.
public
setCustomProperty(string $propertyName[, bool|int|float|string|null $propertyValue = '' ][, string|null $propertyType = null ]) : $this
Parameters
- $propertyName : string
- $propertyValue : bool|int|float|string|null = ''
- $propertyType : string|null = null
-
see
self::VALID_PROPERTY_TYPE_LIST
Return values
$thissetDescription()
Set Description.
public
setDescription(string $description) : $this
Parameters
- $description : string
Return values
$thissetHyperlinkBase()
public
setHyperlinkBase(string $hyperlinkBase) : self
Parameters
- $hyperlinkBase : string
Return values
selfsetKeywords()
Set Keywords.
public
setKeywords(string $keywords) : $this
Parameters
- $keywords : string
Return values
$thissetLastModifiedBy()
Set Last Modified By.
public
setLastModifiedBy(string $modifiedBy) : $this
Parameters
- $modifiedBy : string
Return values
$thissetManager()
Set Manager.
public
setManager(string $manager) : $this
Parameters
- $manager : string
Return values
$thissetModified()
Set Modified.
public
setModified(null|float|int|string $timestamp) : $this
Parameters
- $timestamp : null|float|int|string
Return values
$thissetSubject()
Set Subject.
public
setSubject(string $subject) : $this
Parameters
- $subject : string
Return values
$thissetTitle()
Set Title.
public
setTitle(string $title) : $this
Parameters
- $title : string
Return values
$thissetViewport()
public
setViewport(string $viewport) : self
Parameters
- $viewport : string
Return values
selfconvertProperty2()
Convert property to form desired by Excel.
private
static convertProperty2(bool|int|float|string|null $propertyValue, string $type) : bool|int|float|string|null
Parameters
- $propertyValue : bool|int|float|string|null
- $type : string
Return values
bool|int|float|string|nullidentifyPropertyType()
private
identifyPropertyType(bool|int|float|string|null $propertyValue) : string
Parameters
- $propertyValue : bool|int|float|string|null
Return values
stringintOrFloatTimestamp()
private
static intOrFloatTimestamp(null|bool|float|int|string $timestamp) : float|int
Parameters
- $timestamp : null|bool|float|int|string