composer update

This commit is contained in:
Manish Verma
2018-12-05 10:50:52 +05:30
parent 9eabcacfa7
commit 4addd1e9c6
3328 changed files with 156676 additions and 138988 deletions

View File

@@ -1,8 +1,9 @@
<?php
/**
* PHPExcel
* PHPExcel_DocumentProperties
*
* Copyright (c) 2006 - 2014 PHPExcel
* Copyright (c) 2006 - 2015 PHPExcel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -20,23 +21,14 @@
*
* @category PHPExcel
* @package PHPExcel
* @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
*/
/**
* PHPExcel_DocumentProperties
*
* @category PHPExcel
* @package PHPExcel
* @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_DocumentProperties
{
/** constants */
const PROPERTY_TYPE_BOOLEAN = 'b';
const PROPERTY_TYPE_BOOLEAN = 'b';
const PROPERTY_TYPE_INTEGER = 'i';
const PROPERTY_TYPE_FLOAT = 'f';
const PROPERTY_TYPE_DATE = 'd';
@@ -48,84 +40,84 @@ class PHPExcel_DocumentProperties
*
* @var string
*/
private $_creator = 'Unknown Creator';
private $creator = 'Unknown Creator';
/**
* LastModifiedBy
*
* @var string
*/
private $_lastModifiedBy;
private $lastModifiedBy;
/**
* Created
*
* @var datetime
*/
private $_created;
private $created;
/**
* Modified
*
* @var datetime
*/
private $_modified;
private $modified;
/**
* Title
*
* @var string
*/
private $_title = 'Untitled Spreadsheet';
private $title = 'Untitled Spreadsheet';
/**
* Description
*
* @var string
*/
private $_description = '';
private $description = '';
/**
* Subject
*
* @var string
*/
private $_subject = '';
private $subject = '';
/**
* Keywords
*
* @var string
*/
private $_keywords = '';
private $keywords = '';
/**
* Category
*
* @var string
*/
private $_category = '';
private $category = '';
/**
* Manager
*
* @var string
*/
private $_manager = '';
private $manager = '';
/**
* Company
*
* @var string
*/
private $_company = 'Microsoft Corporation';
private $company = 'Microsoft Corporation';
/**
* Custom Properties
*
* @var string
*/
private $_customProperties = array();
private $customProperties = array();
/**
@@ -134,9 +126,9 @@ class PHPExcel_DocumentProperties
public function __construct()
{
// Initialise values
$this->_lastModifiedBy = $this->_creator;
$this->_created = time();
$this->_modified = time();
$this->lastModifiedBy = $this->creator;
$this->created = time();
$this->modified = time();
}
/**
@@ -144,8 +136,9 @@ class PHPExcel_DocumentProperties
*
* @return string
*/
public function getCreator() {
return $this->_creator;
public function getCreator()
{
return $this->creator;
}
/**
@@ -154,8 +147,9 @@ class PHPExcel_DocumentProperties
* @param string $pValue
* @return PHPExcel_DocumentProperties
*/
public function setCreator($pValue = '') {
$this->_creator = $pValue;
public function setCreator($pValue = '')
{
$this->creator = $pValue;
return $this;
}
@@ -164,8 +158,9 @@ class PHPExcel_DocumentProperties
*
* @return string
*/
public function getLastModifiedBy() {
return $this->_lastModifiedBy;
public function getLastModifiedBy()
{
return $this->lastModifiedBy;
}
/**
@@ -174,8 +169,9 @@ class PHPExcel_DocumentProperties
* @param string $pValue
* @return PHPExcel_DocumentProperties
*/
public function setLastModifiedBy($pValue = '') {
$this->_lastModifiedBy = $pValue;
public function setLastModifiedBy($pValue = '')
{
$this->lastModifiedBy = $pValue;
return $this;
}
@@ -184,8 +180,9 @@ class PHPExcel_DocumentProperties
*
* @return datetime
*/
public function getCreated() {
return $this->_created;
public function getCreated()
{
return $this->created;
}
/**
@@ -194,8 +191,9 @@ class PHPExcel_DocumentProperties
* @param datetime $pValue
* @return PHPExcel_DocumentProperties
*/
public function setCreated($pValue = null) {
if ($pValue === NULL) {
public function setCreated($pValue = null)
{
if ($pValue === null) {
$pValue = time();
} elseif (is_string($pValue)) {
if (is_numeric($pValue)) {
@@ -205,7 +203,7 @@ class PHPExcel_DocumentProperties
}
}
$this->_created = $pValue;
$this->created = $pValue;
return $this;
}
@@ -214,8 +212,9 @@ class PHPExcel_DocumentProperties
*
* @return datetime
*/
public function getModified() {
return $this->_modified;
public function getModified()
{
return $this->modified;
}
/**
@@ -224,8 +223,9 @@ class PHPExcel_DocumentProperties
* @param datetime $pValue
* @return PHPExcel_DocumentProperties
*/
public function setModified($pValue = null) {
if ($pValue === NULL) {
public function setModified($pValue = null)
{
if ($pValue === null) {
$pValue = time();
} elseif (is_string($pValue)) {
if (is_numeric($pValue)) {
@@ -235,7 +235,7 @@ class PHPExcel_DocumentProperties
}
}
$this->_modified = $pValue;
$this->modified = $pValue;
return $this;
}
@@ -244,8 +244,9 @@ class PHPExcel_DocumentProperties
*
* @return string
*/
public function getTitle() {
return $this->_title;
public function getTitle()
{
return $this->title;
}
/**
@@ -254,8 +255,9 @@ class PHPExcel_DocumentProperties
* @param string $pValue
* @return PHPExcel_DocumentProperties
*/
public function setTitle($pValue = '') {
$this->_title = $pValue;
public function setTitle($pValue = '')
{
$this->title = $pValue;
return $this;
}
@@ -264,8 +266,9 @@ class PHPExcel_DocumentProperties
*
* @return string
*/
public function getDescription() {
return $this->_description;
public function getDescription()
{
return $this->description;
}
/**
@@ -274,8 +277,9 @@ class PHPExcel_DocumentProperties
* @param string $pValue
* @return PHPExcel_DocumentProperties
*/
public function setDescription($pValue = '') {
$this->_description = $pValue;
public function setDescription($pValue = '')
{
$this->description = $pValue;
return $this;
}
@@ -284,8 +288,9 @@ class PHPExcel_DocumentProperties
*
* @return string
*/
public function getSubject() {
return $this->_subject;
public function getSubject()
{
return $this->subject;
}
/**
@@ -294,8 +299,9 @@ class PHPExcel_DocumentProperties
* @param string $pValue
* @return PHPExcel_DocumentProperties
*/
public function setSubject($pValue = '') {
$this->_subject = $pValue;
public function setSubject($pValue = '')
{
$this->subject = $pValue;
return $this;
}
@@ -304,8 +310,9 @@ class PHPExcel_DocumentProperties
*
* @return string
*/
public function getKeywords() {
return $this->_keywords;
public function getKeywords()
{
return $this->keywords;
}
/**
@@ -314,8 +321,9 @@ class PHPExcel_DocumentProperties
* @param string $pValue
* @return PHPExcel_DocumentProperties
*/
public function setKeywords($pValue = '') {
$this->_keywords = $pValue;
public function setKeywords($pValue = '')
{
$this->keywords = $pValue;
return $this;
}
@@ -324,8 +332,9 @@ class PHPExcel_DocumentProperties
*
* @return string
*/
public function getCategory() {
return $this->_category;
public function getCategory()
{
return $this->category;
}
/**
@@ -334,8 +343,9 @@ class PHPExcel_DocumentProperties
* @param string $pValue
* @return PHPExcel_DocumentProperties
*/
public function setCategory($pValue = '') {
$this->_category = $pValue;
public function setCategory($pValue = '')
{
$this->category = $pValue;
return $this;
}
@@ -344,8 +354,9 @@ class PHPExcel_DocumentProperties
*
* @return string
*/
public function getCompany() {
return $this->_company;
public function getCompany()
{
return $this->company;
}
/**
@@ -354,8 +365,9 @@ class PHPExcel_DocumentProperties
* @param string $pValue
* @return PHPExcel_DocumentProperties
*/
public function setCompany($pValue = '') {
$this->_company = $pValue;
public function setCompany($pValue = '')
{
$this->company = $pValue;
return $this;
}
@@ -364,8 +376,9 @@ class PHPExcel_DocumentProperties
*
* @return string
*/
public function getManager() {
return $this->_manager;
public function getManager()
{
return $this->manager;
}
/**
@@ -374,8 +387,9 @@ class PHPExcel_DocumentProperties
* @param string $pValue
* @return PHPExcel_DocumentProperties
*/
public function setManager($pValue = '') {
$this->_manager = $pValue;
public function setManager($pValue = '')
{
$this->manager = $pValue;
return $this;
}
@@ -384,8 +398,9 @@ class PHPExcel_DocumentProperties
*
* @return array of string
*/
public function getCustomProperties() {
return array_keys($this->_customProperties);
public function getCustomProperties()
{
return array_keys($this->customProperties);
}
/**
@@ -394,8 +409,9 @@ class PHPExcel_DocumentProperties
* @param string $propertyName
* @return boolean
*/
public function isCustomPropertySet($propertyName) {
return isset($this->_customProperties[$propertyName]);
public function isCustomPropertySet($propertyName)
{
return isset($this->customProperties[$propertyName]);
}
/**
@@ -404,9 +420,10 @@ class PHPExcel_DocumentProperties
* @param string $propertyName
* @return string
*/
public function getCustomPropertyValue($propertyName) {
if (isset($this->_customProperties[$propertyName])) {
return $this->_customProperties[$propertyName]['value'];
public function getCustomPropertyValue($propertyName)
{
if (isset($this->customProperties[$propertyName])) {
return $this->customProperties[$propertyName]['value'];
}
}
@@ -417,9 +434,10 @@ class PHPExcel_DocumentProperties
* @param string $propertyName
* @return string
*/
public function getCustomPropertyType($propertyName) {
if (isset($this->_customProperties[$propertyName])) {
return $this->_customProperties[$propertyName]['type'];
public function getCustomPropertyType($propertyName)
{
if (isset($this->customProperties[$propertyName])) {
return $this->customProperties[$propertyName]['type'];
}
}
@@ -430,24 +448,25 @@ class PHPExcel_DocumentProperties
* @param string $propertyName
* @param mixed $propertyValue
* @param string $propertyType
* 'i' : Integer
* 'i' : Integer
* 'f' : Floating Point
* 's' : String
* 'd' : Date/Time
* 'b' : Boolean
* @return PHPExcel_DocumentProperties
*/
public function setCustomProperty($propertyName,$propertyValue='',$propertyType=NULL) {
if (($propertyType === NULL) || (!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 ($propertyValue === NULL) {
public function setCustomProperty($propertyName, $propertyValue = '', $propertyType = null)
{
if (($propertyType === null) || (!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 ($propertyValue === null) {
$propertyType = self::PROPERTY_TYPE_STRING;
} elseif (is_float($propertyValue)) {
$propertyType = self::PROPERTY_TYPE_FLOAT;
} elseif(is_int($propertyValue)) {
} elseif (is_int($propertyValue)) {
$propertyType = self::PROPERTY_TYPE_INTEGER;
} elseif (is_bool($propertyValue)) {
$propertyType = self::PROPERTY_TYPE_BOOLEAN;
@@ -456,14 +475,18 @@ class PHPExcel_DocumentProperties
}
}
$this->_customProperties[$propertyName] = array('value' => $propertyValue, 'type' => $propertyType);
$this->customProperties[$propertyName] = array(
'value' => $propertyValue,
'type' => $propertyType
);
return $this;
}
/**
* Implement PHP __clone to create a deep clone, not just a shallow copy.
*/
public function __clone() {
public function __clone()
{
$vars = get_object_vars($this);
foreach ($vars as $key => $value) {
if (is_object($value)) {
@@ -474,114 +497,115 @@ class PHPExcel_DocumentProperties
}
}
public static function convertProperty($propertyValue,$propertyType) {
public static function convertProperty($propertyValue, $propertyType)
{
switch ($propertyType) {
case 'empty' : // Empty
case 'empty': // Empty
return '';
break;
case 'null' : // Null
return NULL;
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
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
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
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
case 'lpstr': // LPSTR
case 'lpwstr': // LPWSTR
case 'bstr': // Basic String
return $propertyValue;
break;
case 'date' : // Date and Time
case 'filetime' : // File Time
case 'date': // Date and Time
case 'filetime': // File Time
return strtotime($propertyValue);
break;
case 'bool' : // Boolean
return ($propertyValue == 'true') ? True : False;
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
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;
}
public static function convertPropertyType($propertyType) {
public static function convertPropertyType($propertyType)
{
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
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
return self::PROPERTY_TYPE_INTEGER;
break;
case 'r4' : // 4-Byte Real Number
case 'r8' : // 8-Byte Real Number
case 'decimal' : // Decimal
case 'r4': // 4-Byte Real Number
case 'r8': // 8-Byte Real Number
case 'decimal': // Decimal
return self::PROPERTY_TYPE_FLOAT;
break;
case 'empty' : // Empty
case 'null' : // Null
case 'lpstr' : // LPSTR
case 'lpwstr' : // LPWSTR
case 'bstr' : // Basic String
case 'empty': // Empty
case 'null': // Null
case 'lpstr': // LPSTR
case 'lpwstr': // LPWSTR
case 'bstr': // Basic String
return self::PROPERTY_TYPE_STRING;
break;
case 'date' : // Date and Time
case 'filetime' : // File Time
case 'date': // Date and Time
case 'filetime': // File Time
return self::PROPERTY_TYPE_DATE;
break;
case 'bool' : // Boolean
case 'bool': // Boolean
return self::PROPERTY_TYPE_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
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 self::PROPERTY_TYPE_UNKNOWN;
break;
}
return self::PROPERTY_TYPE_UNKNOWN;
}
}