-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
89954c8
commit 252ff3d
Showing
455 changed files
with
74,403 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
/** | ||
* This file is part of PHPWord - A pure PHP library for reading and writing | ||
* word processing documents. | ||
* | ||
* PHPWord is free software distributed under the terms of the GNU Lesser | ||
* General Public License version 3 as published by the Free Software Foundation. | ||
* | ||
* For the full copyright and license information, please read the LICENSE | ||
* file that was distributed with this source code. For the full list of | ||
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors. | ||
* | ||
* @link https://github.com/PHPOffice/PHPWord | ||
* @copyright 2010-2014 PHPWord contributors | ||
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 | ||
*/ | ||
|
||
namespace PhpOffice\PhpWord; | ||
|
||
/** | ||
* Autoloader | ||
*/ | ||
class Autoloader | ||
{ | ||
/** @const string */ | ||
const NAMESPACE_PREFIX = 'PhpOffice\\PhpWord\\'; | ||
|
||
/** | ||
* Register | ||
* | ||
* @param bool $throw | ||
* @param bool $prepend | ||
* @return void | ||
*/ | ||
public static function register($throw = true, $prepend = false) | ||
{ | ||
spl_autoload_register(array(new self, 'autoload'), $throw, $prepend); | ||
} | ||
|
||
/** | ||
* Autoload | ||
* | ||
* @param string $class | ||
* @return void | ||
*/ | ||
public static function autoload($class) | ||
{ | ||
$prefixLength = strlen(self::NAMESPACE_PREFIX); | ||
if (0 === strncmp(self::NAMESPACE_PREFIX, $class, $prefixLength)) { | ||
$file = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, $prefixLength)); | ||
$file = realpath(__DIR__ . (empty($file) ? '' : DIRECTORY_SEPARATOR) . $file . '.php'); | ||
if (file_exists($file)) { | ||
/** @noinspection PhpIncludeInspection Dynamic includes */ | ||
require_once $file; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<?php | ||
/** | ||
* This file is part of PHPWord - A pure PHP library for reading and writing | ||
* word processing documents. | ||
* | ||
* PHPWord is free software distributed under the terms of the GNU Lesser | ||
* General Public License version 3 as published by the Free Software Foundation. | ||
* | ||
* For the full copyright and license information, please read the LICENSE | ||
* file that was distributed with this source code. For the full list of | ||
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors. | ||
* | ||
* @link https://github.com/PHPOffice/PHPWord | ||
* @copyright 2010-2014 PHPWord contributors | ||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL | ||
*/ | ||
|
||
namespace PhpOffice\PhpWord\Collection; | ||
|
||
/** | ||
* Collection abstract class | ||
* | ||
* @since 0.10.0 | ||
*/ | ||
abstract class AbstractCollection | ||
{ | ||
/** | ||
* Items | ||
* | ||
* @var array | ||
*/ | ||
private $items = array(); | ||
|
||
/** | ||
* Get items | ||
* | ||
* @return array | ||
*/ | ||
public function getItems() | ||
{ | ||
return $this->items; | ||
} | ||
|
||
/** | ||
* Get item by index | ||
* | ||
* @param int $index | ||
* @return mixed | ||
*/ | ||
public function getItem($index) | ||
{ | ||
if (array_key_exists($index, $this->items)) { | ||
return $this->items[$index]; | ||
} else { | ||
return null; | ||
} | ||
} | ||
|
||
/** | ||
* Set item. | ||
* | ||
* @param int $index | ||
* @param mixed $item | ||
* @return void | ||
*/ | ||
public function setItem($index, $item) | ||
{ | ||
if (array_key_exists($index, $this->items)) { | ||
$this->items[$index] = $item; | ||
} | ||
} | ||
|
||
/** | ||
* Add new item | ||
* | ||
* @param mixed $item | ||
* @return int | ||
*/ | ||
public function addItem($item) | ||
{ | ||
$index = $this->countItems() + 1; | ||
$this->items[$index] = $item; | ||
|
||
return $index; | ||
} | ||
|
||
/** | ||
* Get item count | ||
* | ||
* @return int | ||
*/ | ||
public function countItems() | ||
{ | ||
return count($this->items); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* This file is part of PHPWord - A pure PHP library for reading and writing | ||
* word processing documents. | ||
* | ||
* PHPWord is free software distributed under the terms of the GNU Lesser | ||
* General Public License version 3 as published by the Free Software Foundation. | ||
* | ||
* For the full copyright and license information, please read the LICENSE | ||
* file that was distributed with this source code. For the full list of | ||
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors. | ||
* | ||
* @link https://github.com/PHPOffice/PHPWord | ||
* @copyright 2010-2014 PHPWord contributors | ||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL | ||
*/ | ||
|
||
namespace PhpOffice\PhpWord\Collection; | ||
|
||
/** | ||
* Bookmarks collection | ||
* | ||
* @since 0.12.0 | ||
*/ | ||
class Bookmarks extends AbstractCollection | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* This file is part of PHPWord - A pure PHP library for reading and writing | ||
* word processing documents. | ||
* | ||
* PHPWord is free software distributed under the terms of the GNU Lesser | ||
* General Public License version 3 as published by the Free Software Foundation. | ||
* | ||
* For the full copyright and license information, please read the LICENSE | ||
* file that was distributed with this source code. For the full list of | ||
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors. | ||
* | ||
* @link https://github.com/PHPOffice/PHPWord | ||
* @copyright 2010-2014 PHPWord contributors | ||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL | ||
*/ | ||
|
||
namespace PhpOffice\PhpWord\Collection; | ||
|
||
/** | ||
* Charts collection | ||
* | ||
* @since 0.12.0 | ||
*/ | ||
class Charts extends AbstractCollection | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* This file is part of PHPWord - A pure PHP library for reading and writing | ||
* word processing documents. | ||
* | ||
* PHPWord is free software distributed under the terms of the GNU Lesser | ||
* General Public License version 3 as published by the Free Software Foundation. | ||
* | ||
* For the full copyright and license information, please read the LICENSE | ||
* file that was distributed with this source code. For the full list of | ||
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors. | ||
* | ||
* @link https://github.com/PHPOffice/PHPWord | ||
* @copyright 2010-2014 PHPWord contributors | ||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL | ||
*/ | ||
|
||
namespace PhpOffice\PhpWord\Collection; | ||
|
||
/** | ||
* Endnotes collection | ||
* | ||
* @since 0.10.0 | ||
*/ | ||
class Endnotes extends AbstractCollection | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* This file is part of PHPWord - A pure PHP library for reading and writing | ||
* word processing documents. | ||
* | ||
* PHPWord is free software distributed under the terms of the GNU Lesser | ||
* General Public License version 3 as published by the Free Software Foundation. | ||
* | ||
* For the full copyright and license information, please read the LICENSE | ||
* file that was distributed with this source code. For the full list of | ||
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors. | ||
* | ||
* @link https://github.com/PHPOffice/PHPWord | ||
* @copyright 2010-2014 PHPWord contributors | ||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL | ||
*/ | ||
|
||
namespace PhpOffice\PhpWord\Collection; | ||
|
||
/** | ||
* Footnotes collection | ||
* | ||
* @since 0.10.0 | ||
*/ | ||
class Footnotes extends AbstractCollection | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* This file is part of PHPWord - A pure PHP library for reading and writing | ||
* word processing documents. | ||
* | ||
* PHPWord is free software distributed under the terms of the GNU Lesser | ||
* General Public License version 3 as published by the Free Software Foundation. | ||
* | ||
* For the full copyright and license information, please read the LICENSE | ||
* file that was distributed with this source code. For the full list of | ||
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors. | ||
* | ||
* @link https://github.com/PHPOffice/PHPWord | ||
* @copyright 2010-2014 PHPWord contributors | ||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL | ||
*/ | ||
|
||
namespace PhpOffice\PhpWord\Collection; | ||
|
||
/** | ||
* Titles collection | ||
* | ||
* @since 0.10.0 | ||
*/ | ||
class Titles extends AbstractCollection | ||
{ | ||
} |
Oops, something went wrong.