ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
PHPExcel_DocumentProperties Class Reference
+ Collaboration diagram for PHPExcel_DocumentProperties:

Public Member Functions

 __construct ()
 Create a new PHPExcel_DocumentProperties.
 getCreator ()
 Get Creator.
 setCreator ($pValue= '')
 Set Creator.
 getLastModifiedBy ()
 Get Last Modified By.
 setLastModifiedBy ($pValue= '')
 Set Last Modified By.
 getCreated ()
 Get Created.
 setCreated ($pValue=null)
 Set Created.
 getModified ()
 Get Modified.
 setModified ($pValue=null)
 Set Modified.
 getTitle ()
 Get Title.
 setTitle ($pValue= '')
 Set Title.
 getDescription ()
 Get Description.
 setDescription ($pValue= '')
 Set Description.
 getSubject ()
 Get Subject.
 setSubject ($pValue= '')
 Set Subject.
 getKeywords ()
 Get Keywords.
 setKeywords ($pValue= '')
 Set Keywords.
 getCategory ()
 Get Category.
 setCategory ($pValue= '')
 Set Category.
 getCompany ()
 Get Company.
 setCompany ($pValue= '')
 Set Company.
 getManager ()
 Get Manager.
 setManager ($pValue= '')
 Set Manager.
 getCustomProperties ()
 Get a List of Custom Property Names.
 isCustomPropertySet ($propertyName)
 Check if a Custom Property is defined.
 getCustomPropertyValue ($propertyName)
 Get a Custom Property Value.
 getCustomPropertyType ($propertyName)
 Get a Custom Property Type.
 setCustomProperty ($propertyName, $propertyValue='', $propertyType=NULL)
 Set a Custom Property.
 __clone ()
 Implement PHP __clone to create a deep clone, not just a shallow copy.

Static Public Member Functions

static convertProperty ($propertyValue, $propertyType)
static convertPropertyType ($propertyType)

Data Fields

const PROPERTY_TYPE_BOOLEAN = 'b'
 constants
const PROPERTY_TYPE_INTEGER = 'i'
const PROPERTY_TYPE_FLOAT = 'f'
const PROPERTY_TYPE_DATE = 'd'
const PROPERTY_TYPE_STRING = 's'
const PROPERTY_TYPE_UNKNOWN = 'u'

Private Attributes

 $_creator = 'Unknown Creator'
 $_lastModifiedBy
 $_created
 $_modified
 $_title = 'Untitled Spreadsheet'
 $_description = ''
 $_subject = ''
 $_keywords = ''
 $_category = ''
 $_manager = ''
 $_company = 'Microsoft Corporation'
 $_customProperties = array()

Detailed Description

Definition at line 36 of file DocumentProperties.php.

Constructor & Destructor Documentation

PHPExcel_DocumentProperties::__construct ( )

Create a new PHPExcel_DocumentProperties.

Definition at line 135 of file DocumentProperties.php.

References $_creator.

{
// Initialise values
$this->_lastModifiedBy = $this->_creator;
$this->_created = time();
$this->_modified = time();
}

Member Function Documentation

PHPExcel_DocumentProperties::__clone ( )

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

Definition at line 467 of file DocumentProperties.php.

{
$vars = get_object_vars($this);
foreach ($vars as $key => $value) {
if (is_object($value)) {
$this->$key = clone $value;
} else {
$this->$key = $value;
}
}
}
static PHPExcel_DocumentProperties::convertProperty (   $propertyValue,
  $propertyType 
)
static

Definition at line 478 of file DocumentProperties.php.

Referenced by PHPExcel_Reader_Excel2007\load(), and PHPExcel_Reader_OOCalc\loadIntoExisting().

{
switch ($propertyType) {
case 'empty' : // Empty
return '';
break;
case 'null' : // Null
return NULL;
break;
case 'i1' : // 1-Byte Signed Integer
case 'i2' : // 2-Byte Signed Integer
case 'i4' : // 4-Byte Signed Integer
case 'i8' : // 8-Byte Signed Integer
case 'int' : // Integer
return (int) $propertyValue;
break;
case 'ui1' : // 1-Byte Unsigned Integer
case 'ui2' : // 2-Byte Unsigned Integer
case 'ui4' : // 4-Byte Unsigned Integer
case 'ui8' : // 8-Byte Unsigned Integer
case 'uint' : // Unsigned Integer
return abs((int) $propertyValue);
break;
case 'r4' : // 4-Byte Real Number
case 'r8' : // 8-Byte Real Number
case 'decimal' : // Decimal
return (float) $propertyValue;
break;
case 'lpstr' : // LPSTR
case 'lpwstr' : // LPWSTR
case 'bstr' : // Basic String
return $propertyValue;
break;
case 'date' : // Date and Time
case 'filetime' : // File Time
return strtotime($propertyValue);
break;
case 'bool' : // Boolean
return ($propertyValue == 'true') ? True : False;
break;
case 'cy' : // Currency
case 'error' : // Error Status Code
case 'vector' : // Vector
case 'array' : // Array
case 'blob' : // Binary Blob
case 'oblob' : // Binary Blob Object
case 'stream' : // Binary Stream
case 'ostream' : // Binary Stream Object
case 'storage' : // Binary Storage
case 'ostorage' : // Binary Storage Object
case 'vstream' : // Binary Versioned Stream
case 'clsid' : // Class ID
case 'cf' : // Clipboard Data
return $propertyValue;
break;
}
return $propertyValue;
}

+ Here is the caller graph for this function:

static PHPExcel_DocumentProperties::convertPropertyType (   $propertyType)
static

Definition at line 536 of file DocumentProperties.php.

References PROPERTY_TYPE_BOOLEAN, PROPERTY_TYPE_DATE, PROPERTY_TYPE_FLOAT, PROPERTY_TYPE_INTEGER, PROPERTY_TYPE_STRING, and PROPERTY_TYPE_UNKNOWN.

Referenced by PHPExcel_Reader_Excel2007\load().

{
switch ($propertyType) {
case 'i1' : // 1-Byte Signed Integer
case 'i2' : // 2-Byte Signed Integer
case 'i4' : // 4-Byte Signed Integer
case 'i8' : // 8-Byte Signed Integer
case 'int' : // Integer
case 'ui1' : // 1-Byte Unsigned Integer
case 'ui2' : // 2-Byte Unsigned Integer
case 'ui4' : // 4-Byte Unsigned Integer
case 'ui8' : // 8-Byte Unsigned Integer
case 'uint' : // Unsigned Integer
break;
case 'r4' : // 4-Byte Real Number
case 'r8' : // 8-Byte Real Number
case 'decimal' : // Decimal
break;
case 'empty' : // Empty
case 'null' : // Null
case 'lpstr' : // LPSTR
case 'lpwstr' : // LPWSTR
case 'bstr' : // Basic String
break;
case 'date' : // Date and Time
case 'filetime' : // File Time
break;
case 'bool' : // Boolean
break;
case 'cy' : // Currency
case 'error' : // Error Status Code
case 'vector' : // Vector
case 'array' : // Array
case 'blob' : // Binary Blob
case 'oblob' : // Binary Blob Object
case 'stream' : // Binary Stream
case 'ostream' : // Binary Stream Object
case 'storage' : // Binary Storage
case 'ostorage' : // Binary Storage Object
case 'vstream' : // Binary Versioned Stream
case 'clsid' : // Class ID
case 'cf' : // Clipboard Data
break;
}
}

+ Here is the caller graph for this function:

PHPExcel_DocumentProperties::getCategory ( )

Get Category.

Returns
string

Definition at line 328 of file DocumentProperties.php.

References $_category.

{
}
PHPExcel_DocumentProperties::getCompany ( )

Get Company.

Returns
string

Definition at line 348 of file DocumentProperties.php.

References $_company.

{
}
PHPExcel_DocumentProperties::getCreated ( )

Get Created.

Returns
datetime

Definition at line 188 of file DocumentProperties.php.

References $_created.

{
}
PHPExcel_DocumentProperties::getCreator ( )

Get Creator.

Returns
string

Definition at line 148 of file DocumentProperties.php.

References $_creator.

{
}
PHPExcel_DocumentProperties::getCustomProperties ( )

Get a List of Custom Property Names.

Returns
array of string

Definition at line 388 of file DocumentProperties.php.

{
return array_keys($this->_customProperties);
}
PHPExcel_DocumentProperties::getCustomPropertyType (   $propertyName)

Get a Custom Property Type.

Parameters
string$propertyName
Returns
string

Definition at line 421 of file DocumentProperties.php.

{
if (isset($this->_customProperties[$propertyName])) {
return $this->_customProperties[$propertyName]['type'];
}
}
PHPExcel_DocumentProperties::getCustomPropertyValue (   $propertyName)

Get a Custom Property Value.

Parameters
string$propertyName
Returns
string

Definition at line 408 of file DocumentProperties.php.

{
if (isset($this->_customProperties[$propertyName])) {
return $this->_customProperties[$propertyName]['value'];
}
}
PHPExcel_DocumentProperties::getDescription ( )

Get Description.

Returns
string

Definition at line 268 of file DocumentProperties.php.

References $_description.

{
}
PHPExcel_DocumentProperties::getKeywords ( )

Get Keywords.

Returns
string

Definition at line 308 of file DocumentProperties.php.

References $_keywords.

{
}
PHPExcel_DocumentProperties::getLastModifiedBy ( )

Get Last Modified By.

Returns
string

Definition at line 168 of file DocumentProperties.php.

References $_lastModifiedBy.

PHPExcel_DocumentProperties::getManager ( )

Get Manager.

Returns
string

Definition at line 368 of file DocumentProperties.php.

References $_manager.

{
}
PHPExcel_DocumentProperties::getModified ( )

Get Modified.

Returns
datetime

Definition at line 218 of file DocumentProperties.php.

References $_modified.

{
}
PHPExcel_DocumentProperties::getSubject ( )

Get Subject.

Returns
string

Definition at line 288 of file DocumentProperties.php.

References $_subject.

{
}
PHPExcel_DocumentProperties::getTitle ( )

Get Title.

Returns
string

Definition at line 248 of file DocumentProperties.php.

References $_title.

{
return $this->_title;
}
PHPExcel_DocumentProperties::isCustomPropertySet (   $propertyName)

Check if a Custom Property is defined.

Parameters
string$propertyName
Returns
boolean

Definition at line 398 of file DocumentProperties.php.

{
return isset($this->_customProperties[$propertyName]);
}
PHPExcel_DocumentProperties::setCategory (   $pValue = '')

Set Category.

Parameters
string$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 338 of file DocumentProperties.php.

{
$this->_category = $pValue;
return $this;
}
PHPExcel_DocumentProperties::setCompany (   $pValue = '')

Set Company.

Parameters
string$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 358 of file DocumentProperties.php.

{
$this->_company = $pValue;
return $this;
}
PHPExcel_DocumentProperties::setCreated (   $pValue = null)

Set Created.

Parameters
datetime$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 198 of file DocumentProperties.php.

{
if (is_null($pValue)) {
$pValue = time();
} elseif (is_string($pValue)) {
if (is_numeric($pValue)) {
$pValue = intval($pValue);
} else {
$pValue = strtotime($pValue);
}
}
$this->_created = $pValue;
return $this;
}
PHPExcel_DocumentProperties::setCreator (   $pValue = '')

Set Creator.

Parameters
string$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 158 of file DocumentProperties.php.

{
$this->_creator = $pValue;
return $this;
}
PHPExcel_DocumentProperties::setCustomProperty (   $propertyName,
  $propertyValue = '',
  $propertyType = NULL 
)

Set a Custom Property.

Parameters
string$propertyName
mixed$propertyValue
string$propertyType'i' : Integer 'f' : Floating Point 's' : String 'd' : Date/Time 'b' : Boolean
Returns
PHPExcel_DocumentProperties

Definition at line 441 of file DocumentProperties.php.

References PROPERTY_TYPE_BOOLEAN, PROPERTY_TYPE_FLOAT, PROPERTY_TYPE_INTEGER, and PROPERTY_TYPE_STRING.

{
if ((is_null($propertyType)) || (!in_array($propertyType,array(self::PROPERTY_TYPE_INTEGER,
self::PROPERTY_TYPE_FLOAT,
self::PROPERTY_TYPE_STRING,
self::PROPERTY_TYPE_DATE,
self::PROPERTY_TYPE_BOOLEAN)))) {
if (is_null($propertyValue)) {
$propertyType = self::PROPERTY_TYPE_STRING;
} elseif (is_float($propertyValue)) {
$propertyType = self::PROPERTY_TYPE_FLOAT;
} elseif(is_int($propertyValue)) {
$propertyType = self::PROPERTY_TYPE_INTEGER;
} elseif (is_bool($propertyValue)) {
$propertyType = self::PROPERTY_TYPE_BOOLEAN;
} else {
$propertyType = self::PROPERTY_TYPE_STRING;
}
}
$this->_customProperties[$propertyName] = array('value' => $propertyValue, 'type' => $propertyType);
return $this;
}
PHPExcel_DocumentProperties::setDescription (   $pValue = '')

Set Description.

Parameters
string$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 278 of file DocumentProperties.php.

{
$this->_description = $pValue;
return $this;
}
PHPExcel_DocumentProperties::setKeywords (   $pValue = '')

Set Keywords.

Parameters
string$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 318 of file DocumentProperties.php.

{
$this->_keywords = $pValue;
return $this;
}
PHPExcel_DocumentProperties::setLastModifiedBy (   $pValue = '')

Set Last Modified By.

Parameters
string$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 178 of file DocumentProperties.php.

{
$this->_lastModifiedBy = $pValue;
return $this;
}
PHPExcel_DocumentProperties::setManager (   $pValue = '')

Set Manager.

Parameters
string$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 378 of file DocumentProperties.php.

{
$this->_manager = $pValue;
return $this;
}
PHPExcel_DocumentProperties::setModified (   $pValue = null)

Set Modified.

Parameters
datetime$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 228 of file DocumentProperties.php.

{
if (is_null($pValue)) {
$pValue = time();
} elseif (is_string($pValue)) {
if (is_numeric($pValue)) {
$pValue = intval($pValue);
} else {
$pValue = strtotime($pValue);
}
}
$this->_modified = $pValue;
return $this;
}
PHPExcel_DocumentProperties::setSubject (   $pValue = '')

Set Subject.

Parameters
string$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 298 of file DocumentProperties.php.

{
$this->_subject = $pValue;
return $this;
}
PHPExcel_DocumentProperties::setTitle (   $pValue = '')

Set Title.

Parameters
string$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 258 of file DocumentProperties.php.

{
$this->_title = $pValue;
return $this;
}

Field Documentation

PHPExcel_DocumentProperties::$_category = ''
private

Definition at line 108 of file DocumentProperties.php.

Referenced by getCategory().

PHPExcel_DocumentProperties::$_company = 'Microsoft Corporation'
private

Definition at line 122 of file DocumentProperties.php.

Referenced by getCompany().

PHPExcel_DocumentProperties::$_created
private

Definition at line 66 of file DocumentProperties.php.

Referenced by getCreated().

PHPExcel_DocumentProperties::$_creator = 'Unknown Creator'
private

Definition at line 52 of file DocumentProperties.php.

Referenced by __construct(), and getCreator().

PHPExcel_DocumentProperties::$_customProperties = array()
private

Definition at line 129 of file DocumentProperties.php.

PHPExcel_DocumentProperties::$_description = ''
private

Definition at line 87 of file DocumentProperties.php.

Referenced by getDescription().

PHPExcel_DocumentProperties::$_keywords = ''
private

Definition at line 101 of file DocumentProperties.php.

Referenced by getKeywords().

PHPExcel_DocumentProperties::$_lastModifiedBy
private

Definition at line 59 of file DocumentProperties.php.

Referenced by getLastModifiedBy().

PHPExcel_DocumentProperties::$_manager = ''
private

Definition at line 115 of file DocumentProperties.php.

Referenced by getManager().

PHPExcel_DocumentProperties::$_modified
private

Definition at line 73 of file DocumentProperties.php.

Referenced by getModified().

PHPExcel_DocumentProperties::$_subject = ''
private

Definition at line 94 of file DocumentProperties.php.

Referenced by getSubject().

PHPExcel_DocumentProperties::$_title = 'Untitled Spreadsheet'
private

Definition at line 80 of file DocumentProperties.php.

Referenced by getTitle().

const PHPExcel_DocumentProperties::PROPERTY_TYPE_BOOLEAN = 'b'
const PHPExcel_DocumentProperties::PROPERTY_TYPE_DATE = 'd'
const PHPExcel_DocumentProperties::PROPERTY_TYPE_FLOAT = 'f'
const PHPExcel_DocumentProperties::PROPERTY_TYPE_INTEGER = 'i'
const PHPExcel_DocumentProperties::PROPERTY_TYPE_STRING = 's'
const PHPExcel_DocumentProperties::PROPERTY_TYPE_UNKNOWN = 'u'

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