ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
PHPExcel_DocumentProperties Class Reference
+ Collaboration diagram for PHPExcel_DocumentProperties:

Public Member Functions

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

Static Public Member Functions

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

Data Fields

const PROPERTY_TYPE_BOOLEAN = 'b'
 constants More...
 
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

◆ __construct()

PHPExcel_DocumentProperties::__construct ( )

Create a new PHPExcel_DocumentProperties.

Definition at line 134 of file DocumentProperties.php.

References $_creator, and time.

135  {
136  // Initialise values
137  $this->_lastModifiedBy = $this->_creator;
138  $this->_created = time();
139  $this->_modified = time();
140  }
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.

Member Function Documentation

◆ __clone()

PHPExcel_DocumentProperties::__clone ( )

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

Definition at line 466 of file DocumentProperties.php.

References $key.

466  {
467  $vars = get_object_vars($this);
468  foreach ($vars as $key => $value) {
469  if (is_object($value)) {
470  $this->$key = clone $value;
471  } else {
472  $this->$key = $value;
473  }
474  }
475  }
$key
Definition: croninfo.php:18

◆ convertProperty()

static PHPExcel_DocumentProperties::convertProperty (   $propertyValue,
  $propertyType 
)
static

Definition at line 477 of file DocumentProperties.php.

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

477  {
478  switch ($propertyType) {
479  case 'empty' : // Empty
480  return '';
481  break;
482  case 'null' : // Null
483  return NULL;
484  break;
485  case 'i1' : // 1-Byte Signed Integer
486  case 'i2' : // 2-Byte Signed Integer
487  case 'i4' : // 4-Byte Signed Integer
488  case 'i8' : // 8-Byte Signed Integer
489  case 'int' : // Integer
490  return (int) $propertyValue;
491  break;
492  case 'ui1' : // 1-Byte Unsigned Integer
493  case 'ui2' : // 2-Byte Unsigned Integer
494  case 'ui4' : // 4-Byte Unsigned Integer
495  case 'ui8' : // 8-Byte Unsigned Integer
496  case 'uint' : // Unsigned Integer
497  return abs((int) $propertyValue);
498  break;
499  case 'r4' : // 4-Byte Real Number
500  case 'r8' : // 8-Byte Real Number
501  case 'decimal' : // Decimal
502  return (float) $propertyValue;
503  break;
504  case 'lpstr' : // LPSTR
505  case 'lpwstr' : // LPWSTR
506  case 'bstr' : // Basic String
507  return $propertyValue;
508  break;
509  case 'date' : // Date and Time
510  case 'filetime' : // File Time
511  return strtotime($propertyValue);
512  break;
513  case 'bool' : // Boolean
514  return ($propertyValue == 'true') ? True : False;
515  break;
516  case 'cy' : // Currency
517  case 'error' : // Error Status Code
518  case 'vector' : // Vector
519  case 'array' : // Array
520  case 'blob' : // Binary Blob
521  case 'oblob' : // Binary Blob Object
522  case 'stream' : // Binary Stream
523  case 'ostream' : // Binary Stream Object
524  case 'storage' : // Binary Storage
525  case 'ostorage' : // Binary Storage Object
526  case 'vstream' : // Binary Versioned Stream
527  case 'clsid' : // Class ID
528  case 'cf' : // Clipboard Data
529  return $propertyValue;
530  break;
531  }
532  return $propertyValue;
533  }
+ Here is the caller graph for this function:

◆ convertPropertyType()

static PHPExcel_DocumentProperties::convertPropertyType (   $propertyType)
static

Definition at line 535 of file DocumentProperties.php.

Referenced by PHPExcel_Reader_Excel2007\load().

535  {
536  switch ($propertyType) {
537  case 'i1' : // 1-Byte Signed Integer
538  case 'i2' : // 2-Byte Signed Integer
539  case 'i4' : // 4-Byte Signed Integer
540  case 'i8' : // 8-Byte Signed Integer
541  case 'int' : // Integer
542  case 'ui1' : // 1-Byte Unsigned Integer
543  case 'ui2' : // 2-Byte Unsigned Integer
544  case 'ui4' : // 4-Byte Unsigned Integer
545  case 'ui8' : // 8-Byte Unsigned Integer
546  case 'uint' : // Unsigned Integer
547  return self::PROPERTY_TYPE_INTEGER;
548  break;
549  case 'r4' : // 4-Byte Real Number
550  case 'r8' : // 8-Byte Real Number
551  case 'decimal' : // Decimal
552  return self::PROPERTY_TYPE_FLOAT;
553  break;
554  case 'empty' : // Empty
555  case 'null' : // Null
556  case 'lpstr' : // LPSTR
557  case 'lpwstr' : // LPWSTR
558  case 'bstr' : // Basic String
559  return self::PROPERTY_TYPE_STRING;
560  break;
561  case 'date' : // Date and Time
562  case 'filetime' : // File Time
563  return self::PROPERTY_TYPE_DATE;
564  break;
565  case 'bool' : // Boolean
566  return self::PROPERTY_TYPE_BOOLEAN;
567  break;
568  case 'cy' : // Currency
569  case 'error' : // Error Status Code
570  case 'vector' : // Vector
571  case 'array' : // Array
572  case 'blob' : // Binary Blob
573  case 'oblob' : // Binary Blob Object
574  case 'stream' : // Binary Stream
575  case 'ostream' : // Binary Stream Object
576  case 'storage' : // Binary Storage
577  case 'ostorage' : // Binary Storage Object
578  case 'vstream' : // Binary Versioned Stream
579  case 'clsid' : // Class ID
580  case 'cf' : // Clipboard Data
581  return self::PROPERTY_TYPE_UNKNOWN;
582  break;
583  }
584  return self::PROPERTY_TYPE_UNKNOWN;
585  }
+ Here is the caller graph for this function:

◆ getCategory()

PHPExcel_DocumentProperties::getCategory ( )

Get Category.

Returns
string

Definition at line 327 of file DocumentProperties.php.

References $_category.

327  {
328  return $this->_category;
329  }

◆ getCompany()

PHPExcel_DocumentProperties::getCompany ( )

Get Company.

Returns
string

Definition at line 347 of file DocumentProperties.php.

References $_company.

347  {
348  return $this->_company;
349  }

◆ getCreated()

PHPExcel_DocumentProperties::getCreated ( )

Get Created.

Returns
datetime

Definition at line 187 of file DocumentProperties.php.

References $_created.

187  {
188  return $this->_created;
189  }

◆ getCreator()

PHPExcel_DocumentProperties::getCreator ( )

Get Creator.

Returns
string

Definition at line 147 of file DocumentProperties.php.

References $_creator.

147  {
148  return $this->_creator;
149  }

◆ getCustomProperties()

PHPExcel_DocumentProperties::getCustomProperties ( )

Get a List of Custom Property Names.

Returns
array of string

Definition at line 387 of file DocumentProperties.php.

387  {
388  return array_keys($this->_customProperties);
389  }

◆ getCustomPropertyType()

PHPExcel_DocumentProperties::getCustomPropertyType (   $propertyName)

Get a Custom Property Type.

Parameters
string$propertyName
Returns
string

Definition at line 420 of file DocumentProperties.php.

420  {
421  if (isset($this->_customProperties[$propertyName])) {
422  return $this->_customProperties[$propertyName]['type'];
423  }
424 
425  }

◆ getCustomPropertyValue()

PHPExcel_DocumentProperties::getCustomPropertyValue (   $propertyName)

Get a Custom Property Value.

Parameters
string$propertyName
Returns
string

Definition at line 407 of file DocumentProperties.php.

407  {
408  if (isset($this->_customProperties[$propertyName])) {
409  return $this->_customProperties[$propertyName]['value'];
410  }
411 
412  }

◆ getDescription()

PHPExcel_DocumentProperties::getDescription ( )

Get Description.

Returns
string

Definition at line 267 of file DocumentProperties.php.

References $_description.

267  {
268  return $this->_description;
269  }

◆ getKeywords()

PHPExcel_DocumentProperties::getKeywords ( )

Get Keywords.

Returns
string

Definition at line 307 of file DocumentProperties.php.

References $_keywords.

307  {
308  return $this->_keywords;
309  }

◆ getLastModifiedBy()

PHPExcel_DocumentProperties::getLastModifiedBy ( )

Get Last Modified By.

Returns
string

Definition at line 167 of file DocumentProperties.php.

References $_lastModifiedBy.

◆ getManager()

PHPExcel_DocumentProperties::getManager ( )

Get Manager.

Returns
string

Definition at line 367 of file DocumentProperties.php.

References $_manager.

367  {
368  return $this->_manager;
369  }

◆ getModified()

PHPExcel_DocumentProperties::getModified ( )

Get Modified.

Returns
datetime

Definition at line 217 of file DocumentProperties.php.

References $_modified.

217  {
218  return $this->_modified;
219  }

◆ getSubject()

PHPExcel_DocumentProperties::getSubject ( )

Get Subject.

Returns
string

Definition at line 287 of file DocumentProperties.php.

References $_subject.

287  {
288  return $this->_subject;
289  }

◆ getTitle()

PHPExcel_DocumentProperties::getTitle ( )

Get Title.

Returns
string

Definition at line 247 of file DocumentProperties.php.

References $_title.

247  {
248  return $this->_title;
249  }

◆ isCustomPropertySet()

PHPExcel_DocumentProperties::isCustomPropertySet (   $propertyName)

Check if a Custom Property is defined.

Parameters
string$propertyName
Returns
boolean

Definition at line 397 of file DocumentProperties.php.

397  {
398  return isset($this->_customProperties[$propertyName]);
399  }

◆ setCategory()

PHPExcel_DocumentProperties::setCategory (   $pValue = '')

Set Category.

Parameters
string$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 337 of file DocumentProperties.php.

337  {
338  $this->_category = $pValue;
339  return $this;
340  }

◆ setCompany()

PHPExcel_DocumentProperties::setCompany (   $pValue = '')

Set Company.

Parameters
string$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 357 of file DocumentProperties.php.

357  {
358  $this->_company = $pValue;
359  return $this;
360  }

◆ setCreated()

PHPExcel_DocumentProperties::setCreated (   $pValue = null)

Set Created.

Parameters
datetime$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 197 of file DocumentProperties.php.

References time.

197  {
198  if ($pValue === NULL) {
199  $pValue = time();
200  } elseif (is_string($pValue)) {
201  if (is_numeric($pValue)) {
202  $pValue = intval($pValue);
203  } else {
204  $pValue = strtotime($pValue);
205  }
206  }
207 
208  $this->_created = $pValue;
209  return $this;
210  }
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.

◆ setCreator()

PHPExcel_DocumentProperties::setCreator (   $pValue = '')

Set Creator.

Parameters
string$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 157 of file DocumentProperties.php.

157  {
158  $this->_creator = $pValue;
159  return $this;
160  }

◆ setCustomProperty()

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 440 of file DocumentProperties.php.

References array.

440  {
441  if (($propertyType === NULL) || (!in_array($propertyType,array(self::PROPERTY_TYPE_INTEGER,
442  self::PROPERTY_TYPE_FLOAT,
443  self::PROPERTY_TYPE_STRING,
444  self::PROPERTY_TYPE_DATE,
445  self::PROPERTY_TYPE_BOOLEAN)))) {
446  if ($propertyValue === NULL) {
447  $propertyType = self::PROPERTY_TYPE_STRING;
448  } elseif (is_float($propertyValue)) {
449  $propertyType = self::PROPERTY_TYPE_FLOAT;
450  } elseif(is_int($propertyValue)) {
451  $propertyType = self::PROPERTY_TYPE_INTEGER;
452  } elseif (is_bool($propertyValue)) {
453  $propertyType = self::PROPERTY_TYPE_BOOLEAN;
454  } else {
455  $propertyType = self::PROPERTY_TYPE_STRING;
456  }
457  }
458 
459  $this->_customProperties[$propertyName] = array('value' => $propertyValue, 'type' => $propertyType);
460  return $this;
461  }
Create styles array
The data for the language used.

◆ setDescription()

PHPExcel_DocumentProperties::setDescription (   $pValue = '')

Set Description.

Parameters
string$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 277 of file DocumentProperties.php.

277  {
278  $this->_description = $pValue;
279  return $this;
280  }

◆ setKeywords()

PHPExcel_DocumentProperties::setKeywords (   $pValue = '')

Set Keywords.

Parameters
string$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 317 of file DocumentProperties.php.

317  {
318  $this->_keywords = $pValue;
319  return $this;
320  }

◆ setLastModifiedBy()

PHPExcel_DocumentProperties::setLastModifiedBy (   $pValue = '')

Set Last Modified By.

Parameters
string$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 177 of file DocumentProperties.php.

177  {
178  $this->_lastModifiedBy = $pValue;
179  return $this;
180  }

◆ setManager()

PHPExcel_DocumentProperties::setManager (   $pValue = '')

Set Manager.

Parameters
string$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 377 of file DocumentProperties.php.

377  {
378  $this->_manager = $pValue;
379  return $this;
380  }

◆ setModified()

PHPExcel_DocumentProperties::setModified (   $pValue = null)

Set Modified.

Parameters
datetime$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 227 of file DocumentProperties.php.

References time.

227  {
228  if ($pValue === NULL) {
229  $pValue = time();
230  } elseif (is_string($pValue)) {
231  if (is_numeric($pValue)) {
232  $pValue = intval($pValue);
233  } else {
234  $pValue = strtotime($pValue);
235  }
236  }
237 
238  $this->_modified = $pValue;
239  return $this;
240  }
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.

◆ setSubject()

PHPExcel_DocumentProperties::setSubject (   $pValue = '')

Set Subject.

Parameters
string$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 297 of file DocumentProperties.php.

297  {
298  $this->_subject = $pValue;
299  return $this;
300  }

◆ setTitle()

PHPExcel_DocumentProperties::setTitle (   $pValue = '')

Set Title.

Parameters
string$pValue
Returns
PHPExcel_DocumentProperties

Definition at line 257 of file DocumentProperties.php.

257  {
258  $this->_title = $pValue;
259  return $this;
260  }

Field Documentation

◆ $_category

PHPExcel_DocumentProperties::$_category = ''
private

Definition at line 107 of file DocumentProperties.php.

Referenced by getCategory().

◆ $_company

PHPExcel_DocumentProperties::$_company = 'Microsoft Corporation'
private

Definition at line 121 of file DocumentProperties.php.

Referenced by getCompany().

◆ $_created

PHPExcel_DocumentProperties::$_created
private

Definition at line 65 of file DocumentProperties.php.

Referenced by getCreated().

◆ $_creator

PHPExcel_DocumentProperties::$_creator = 'Unknown Creator'
private

Definition at line 51 of file DocumentProperties.php.

Referenced by __construct(), and getCreator().

◆ $_customProperties

PHPExcel_DocumentProperties::$_customProperties = array()
private

Definition at line 128 of file DocumentProperties.php.

◆ $_description

PHPExcel_DocumentProperties::$_description = ''
private

Definition at line 86 of file DocumentProperties.php.

Referenced by getDescription().

◆ $_keywords

PHPExcel_DocumentProperties::$_keywords = ''
private

Definition at line 100 of file DocumentProperties.php.

Referenced by getKeywords().

◆ $_lastModifiedBy

PHPExcel_DocumentProperties::$_lastModifiedBy
private

Definition at line 58 of file DocumentProperties.php.

Referenced by getLastModifiedBy().

◆ $_manager

PHPExcel_DocumentProperties::$_manager = ''
private

Definition at line 114 of file DocumentProperties.php.

Referenced by getManager().

◆ $_modified

PHPExcel_DocumentProperties::$_modified
private

Definition at line 72 of file DocumentProperties.php.

Referenced by getModified().

◆ $_subject

PHPExcel_DocumentProperties::$_subject = ''
private

Definition at line 93 of file DocumentProperties.php.

Referenced by getSubject().

◆ $_title

PHPExcel_DocumentProperties::$_title = 'Untitled Spreadsheet'
private

Definition at line 79 of file DocumentProperties.php.

Referenced by getTitle().

◆ PROPERTY_TYPE_BOOLEAN

const PHPExcel_DocumentProperties::PROPERTY_TYPE_BOOLEAN = 'b'

◆ PROPERTY_TYPE_DATE

const PHPExcel_DocumentProperties::PROPERTY_TYPE_DATE = 'd'

◆ PROPERTY_TYPE_FLOAT

const PHPExcel_DocumentProperties::PROPERTY_TYPE_FLOAT = 'f'

◆ PROPERTY_TYPE_INTEGER

const PHPExcel_DocumentProperties::PROPERTY_TYPE_INTEGER = 'i'

◆ PROPERTY_TYPE_STRING

const PHPExcel_DocumentProperties::PROPERTY_TYPE_STRING = 's'

◆ PROPERTY_TYPE_UNKNOWN

const PHPExcel_DocumentProperties::PROPERTY_TYPE_UNKNOWN = 'u'

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