diff --git a/.gitignore b/.gitignore index 29a804cb..4abb8c94 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,9 @@ /.settings /.buildpath /.project -/docs \ No newline at end of file +/docs + +*.odt +*.docx +*.rtf +*.txt \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 2cca49ae..5796deca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,14 +26,14 @@ before_script: script: ## PHP_CodeSniffer - - phpcs --standard=PSR1 src/ - - phpcs --standard=PSR2 src/ + - phpcs --standard=PSR1 Classes/ + - phpcs --standard=PSR2 Classes/ ## PHP Copy/Paste Detector - - php phpcpd.phar --verbose src/ + - php phpcpd.phar --verbose Classes/ ## PHP Mess Detector - - phpmd src/ text codesize,unusedcode,naming,design + - phpmd Classes/ text codesize,unusedcode,naming,design ## PHPLOC - - php phploc.phar src/ + - php phploc.phar Classes/ notifications: email: diff --git a/src/PHPWord.php b/Classes/PHPWord.php similarity index 100% rename from src/PHPWord.php rename to Classes/PHPWord.php diff --git a/src/PHPWord/Autoloader.php b/Classes/PHPWord/Autoloader.php similarity index 100% rename from src/PHPWord/Autoloader.php rename to Classes/PHPWord/Autoloader.php diff --git a/src/PHPWord/DocumentProperties.php b/Classes/PHPWord/DocumentProperties.php similarity index 100% rename from src/PHPWord/DocumentProperties.php rename to Classes/PHPWord/DocumentProperties.php diff --git a/src/PHPWord/Exception.php b/Classes/PHPWord/Exception.php similarity index 100% rename from src/PHPWord/Exception.php rename to Classes/PHPWord/Exception.php diff --git a/src/PHPWord/HashTable.php b/Classes/PHPWord/HashTable.php similarity index 100% rename from src/PHPWord/HashTable.php rename to Classes/PHPWord/HashTable.php diff --git a/src/PHPWord/IOFactory.php b/Classes/PHPWord/IOFactory.php similarity index 100% rename from src/PHPWord/IOFactory.php rename to Classes/PHPWord/IOFactory.php diff --git a/src/PHPWord/Media.php b/Classes/PHPWord/Media.php similarity index 100% rename from src/PHPWord/Media.php rename to Classes/PHPWord/Media.php diff --git a/src/PHPWord/Section.php b/Classes/PHPWord/Section.php similarity index 100% rename from src/PHPWord/Section.php rename to Classes/PHPWord/Section.php diff --git a/src/PHPWord/Section/Footer.php b/Classes/PHPWord/Section/Footer.php similarity index 100% rename from src/PHPWord/Section/Footer.php rename to Classes/PHPWord/Section/Footer.php diff --git a/src/PHPWord/Section/Footer/PreserveText.php b/Classes/PHPWord/Section/Footer/PreserveText.php similarity index 100% rename from src/PHPWord/Section/Footer/PreserveText.php rename to Classes/PHPWord/Section/Footer/PreserveText.php diff --git a/src/PHPWord/Section/Header.php b/Classes/PHPWord/Section/Header.php similarity index 100% rename from src/PHPWord/Section/Header.php rename to Classes/PHPWord/Section/Header.php diff --git a/src/PHPWord/Section/Image.php b/Classes/PHPWord/Section/Image.php similarity index 100% rename from src/PHPWord/Section/Image.php rename to Classes/PHPWord/Section/Image.php diff --git a/src/PHPWord/Section/Link.php b/Classes/PHPWord/Section/Link.php similarity index 100% rename from src/PHPWord/Section/Link.php rename to Classes/PHPWord/Section/Link.php diff --git a/src/PHPWord/Section/ListItem.php b/Classes/PHPWord/Section/ListItem.php similarity index 100% rename from src/PHPWord/Section/ListItem.php rename to Classes/PHPWord/Section/ListItem.php diff --git a/src/PHPWord/Section/MemoryImage.php b/Classes/PHPWord/Section/MemoryImage.php similarity index 100% rename from src/PHPWord/Section/MemoryImage.php rename to Classes/PHPWord/Section/MemoryImage.php diff --git a/src/PHPWord/Section/Object.php b/Classes/PHPWord/Section/Object.php similarity index 100% rename from src/PHPWord/Section/Object.php rename to Classes/PHPWord/Section/Object.php diff --git a/src/PHPWord/Section/PageBreak.php b/Classes/PHPWord/Section/PageBreak.php similarity index 100% rename from src/PHPWord/Section/PageBreak.php rename to Classes/PHPWord/Section/PageBreak.php diff --git a/src/PHPWord/Section/Settings.php b/Classes/PHPWord/Section/Settings.php similarity index 100% rename from src/PHPWord/Section/Settings.php rename to Classes/PHPWord/Section/Settings.php diff --git a/src/PHPWord/Section/Table.php b/Classes/PHPWord/Section/Table.php similarity index 100% rename from src/PHPWord/Section/Table.php rename to Classes/PHPWord/Section/Table.php diff --git a/src/PHPWord/Section/Table/Cell.php b/Classes/PHPWord/Section/Table/Cell.php similarity index 100% rename from src/PHPWord/Section/Table/Cell.php rename to Classes/PHPWord/Section/Table/Cell.php diff --git a/src/PHPWord/Section/Text.php b/Classes/PHPWord/Section/Text.php similarity index 100% rename from src/PHPWord/Section/Text.php rename to Classes/PHPWord/Section/Text.php diff --git a/src/PHPWord/Section/TextBreak.php b/Classes/PHPWord/Section/TextBreak.php similarity index 100% rename from src/PHPWord/Section/TextBreak.php rename to Classes/PHPWord/Section/TextBreak.php diff --git a/src/PHPWord/Section/TextRun.php b/Classes/PHPWord/Section/TextRun.php similarity index 100% rename from src/PHPWord/Section/TextRun.php rename to Classes/PHPWord/Section/TextRun.php diff --git a/src/PHPWord/Section/Title.php b/Classes/PHPWord/Section/Title.php similarity index 100% rename from src/PHPWord/Section/Title.php rename to Classes/PHPWord/Section/Title.php diff --git a/src/PHPWord/Shared/Drawing.php b/Classes/PHPWord/Shared/Drawing.php similarity index 100% rename from src/PHPWord/Shared/Drawing.php rename to Classes/PHPWord/Shared/Drawing.php diff --git a/src/PHPWord/Shared/File.php b/Classes/PHPWord/Shared/File.php similarity index 100% rename from src/PHPWord/Shared/File.php rename to Classes/PHPWord/Shared/File.php diff --git a/src/PHPWord/Shared/Font.php b/Classes/PHPWord/Shared/Font.php similarity index 100% rename from src/PHPWord/Shared/Font.php rename to Classes/PHPWord/Shared/Font.php diff --git a/src/PHPWord/Shared/String.php b/Classes/PHPWord/Shared/String.php similarity index 100% rename from src/PHPWord/Shared/String.php rename to Classes/PHPWord/Shared/String.php diff --git a/src/PHPWord/Shared/XMLWriter.php b/Classes/PHPWord/Shared/XMLWriter.php similarity index 100% rename from src/PHPWord/Shared/XMLWriter.php rename to Classes/PHPWord/Shared/XMLWriter.php diff --git a/src/PHPWord/Shared/ZipStreamWrapper.php b/Classes/PHPWord/Shared/ZipStreamWrapper.php similarity index 100% rename from src/PHPWord/Shared/ZipStreamWrapper.php rename to Classes/PHPWord/Shared/ZipStreamWrapper.php diff --git a/src/PHPWord/Style.php b/Classes/PHPWord/Style.php similarity index 100% rename from src/PHPWord/Style.php rename to Classes/PHPWord/Style.php diff --git a/src/PHPWord/Style/Cell.php b/Classes/PHPWord/Style/Cell.php similarity index 100% rename from src/PHPWord/Style/Cell.php rename to Classes/PHPWord/Style/Cell.php diff --git a/src/PHPWord/Style/Font.php b/Classes/PHPWord/Style/Font.php similarity index 100% rename from src/PHPWord/Style/Font.php rename to Classes/PHPWord/Style/Font.php diff --git a/src/PHPWord/Style/Image.php b/Classes/PHPWord/Style/Image.php similarity index 100% rename from src/PHPWord/Style/Image.php rename to Classes/PHPWord/Style/Image.php diff --git a/src/PHPWord/Style/ListItem.php b/Classes/PHPWord/Style/ListItem.php similarity index 100% rename from src/PHPWord/Style/ListItem.php rename to Classes/PHPWord/Style/ListItem.php diff --git a/src/PHPWord/Style/Paragraph.php b/Classes/PHPWord/Style/Paragraph.php similarity index 100% rename from src/PHPWord/Style/Paragraph.php rename to Classes/PHPWord/Style/Paragraph.php diff --git a/src/PHPWord/Style/TOC.php b/Classes/PHPWord/Style/TOC.php similarity index 100% rename from src/PHPWord/Style/TOC.php rename to Classes/PHPWord/Style/TOC.php diff --git a/src/PHPWord/Style/Table.php b/Classes/PHPWord/Style/Table.php similarity index 100% rename from src/PHPWord/Style/Table.php rename to Classes/PHPWord/Style/Table.php diff --git a/src/PHPWord/Style/TableFull.php b/Classes/PHPWord/Style/TableFull.php similarity index 100% rename from src/PHPWord/Style/TableFull.php rename to Classes/PHPWord/Style/TableFull.php diff --git a/src/PHPWord/TOC.php b/Classes/PHPWord/TOC.php similarity index 100% rename from src/PHPWord/TOC.php rename to Classes/PHPWord/TOC.php diff --git a/src/PHPWord/Template.php b/Classes/PHPWord/Template.php similarity index 100% rename from src/PHPWord/Template.php rename to Classes/PHPWord/Template.php diff --git a/src/PHPWord/Writer/IWriter.php b/Classes/PHPWord/Writer/IWriter.php similarity index 100% rename from src/PHPWord/Writer/IWriter.php rename to Classes/PHPWord/Writer/IWriter.php diff --git a/src/PHPWord/Writer/ODText.php b/Classes/PHPWord/Writer/ODText.php similarity index 100% rename from src/PHPWord/Writer/ODText.php rename to Classes/PHPWord/Writer/ODText.php diff --git a/src/PHPWord/Writer/ODText/Content.php b/Classes/PHPWord/Writer/ODText/Content.php similarity index 100% rename from src/PHPWord/Writer/ODText/Content.php rename to Classes/PHPWord/Writer/ODText/Content.php diff --git a/src/PHPWord/Writer/ODText/Manifest.php b/Classes/PHPWord/Writer/ODText/Manifest.php similarity index 100% rename from src/PHPWord/Writer/ODText/Manifest.php rename to Classes/PHPWord/Writer/ODText/Manifest.php diff --git a/src/PHPWord/Writer/ODText/Meta.php b/Classes/PHPWord/Writer/ODText/Meta.php similarity index 100% rename from src/PHPWord/Writer/ODText/Meta.php rename to Classes/PHPWord/Writer/ODText/Meta.php diff --git a/src/PHPWord/Writer/ODText/Mimetype.php b/Classes/PHPWord/Writer/ODText/Mimetype.php similarity index 100% rename from src/PHPWord/Writer/ODText/Mimetype.php rename to Classes/PHPWord/Writer/ODText/Mimetype.php diff --git a/src/PHPWord/Writer/ODText/Styles.php b/Classes/PHPWord/Writer/ODText/Styles.php similarity index 100% rename from src/PHPWord/Writer/ODText/Styles.php rename to Classes/PHPWord/Writer/ODText/Styles.php diff --git a/src/PHPWord/Writer/ODText/WriterPart.php b/Classes/PHPWord/Writer/ODText/WriterPart.php similarity index 100% rename from src/PHPWord/Writer/ODText/WriterPart.php rename to Classes/PHPWord/Writer/ODText/WriterPart.php diff --git a/src/PHPWord/Writer/RTF.php b/Classes/PHPWord/Writer/RTF.php similarity index 100% rename from src/PHPWord/Writer/RTF.php rename to Classes/PHPWord/Writer/RTF.php diff --git a/src/PHPWord/Writer/Word2007.php b/Classes/PHPWord/Writer/Word2007.php similarity index 100% rename from src/PHPWord/Writer/Word2007.php rename to Classes/PHPWord/Writer/Word2007.php diff --git a/src/PHPWord/Writer/Word2007/Base.php b/Classes/PHPWord/Writer/Word2007/Base.php similarity index 100% rename from src/PHPWord/Writer/Word2007/Base.php rename to Classes/PHPWord/Writer/Word2007/Base.php diff --git a/src/PHPWord/Writer/Word2007/ContentTypes.php b/Classes/PHPWord/Writer/Word2007/ContentTypes.php similarity index 100% rename from src/PHPWord/Writer/Word2007/ContentTypes.php rename to Classes/PHPWord/Writer/Word2007/ContentTypes.php diff --git a/src/PHPWord/Writer/Word2007/DocProps.php b/Classes/PHPWord/Writer/Word2007/DocProps.php similarity index 100% rename from src/PHPWord/Writer/Word2007/DocProps.php rename to Classes/PHPWord/Writer/Word2007/DocProps.php diff --git a/src/PHPWord/Writer/Word2007/Document.php b/Classes/PHPWord/Writer/Word2007/Document.php similarity index 100% rename from src/PHPWord/Writer/Word2007/Document.php rename to Classes/PHPWord/Writer/Word2007/Document.php diff --git a/src/PHPWord/Writer/Word2007/DocumentRels.php b/Classes/PHPWord/Writer/Word2007/DocumentRels.php similarity index 100% rename from src/PHPWord/Writer/Word2007/DocumentRels.php rename to Classes/PHPWord/Writer/Word2007/DocumentRels.php diff --git a/src/PHPWord/Writer/Word2007/Footer.php b/Classes/PHPWord/Writer/Word2007/Footer.php similarity index 100% rename from src/PHPWord/Writer/Word2007/Footer.php rename to Classes/PHPWord/Writer/Word2007/Footer.php diff --git a/src/PHPWord/Writer/Word2007/Header.php b/Classes/PHPWord/Writer/Word2007/Header.php similarity index 100% rename from src/PHPWord/Writer/Word2007/Header.php rename to Classes/PHPWord/Writer/Word2007/Header.php diff --git a/src/PHPWord/Writer/Word2007/Rels.php b/Classes/PHPWord/Writer/Word2007/Rels.php similarity index 100% rename from src/PHPWord/Writer/Word2007/Rels.php rename to Classes/PHPWord/Writer/Word2007/Rels.php diff --git a/src/PHPWord/Writer/Word2007/Styles.php b/Classes/PHPWord/Writer/Word2007/Styles.php similarity index 100% rename from src/PHPWord/Writer/Word2007/Styles.php rename to Classes/PHPWord/Writer/Word2007/Styles.php diff --git a/src/PHPWord/Writer/Word2007/WriterPart.php b/Classes/PHPWord/Writer/Word2007/WriterPart.php similarity index 100% rename from src/PHPWord/Writer/Word2007/WriterPart.php rename to Classes/PHPWord/Writer/Word2007/WriterPart.php diff --git a/src/PHPWord/_staticDocParts/_doc.png b/Classes/PHPWord/_staticDocParts/_doc.png similarity index 100% rename from src/PHPWord/_staticDocParts/_doc.png rename to Classes/PHPWord/_staticDocParts/_doc.png diff --git a/src/PHPWord/_staticDocParts/_ppt.png b/Classes/PHPWord/_staticDocParts/_ppt.png similarity index 100% rename from src/PHPWord/_staticDocParts/_ppt.png rename to Classes/PHPWord/_staticDocParts/_ppt.png diff --git a/src/PHPWord/_staticDocParts/_xls.png b/Classes/PHPWord/_staticDocParts/_xls.png similarity index 100% rename from src/PHPWord/_staticDocParts/_xls.png rename to Classes/PHPWord/_staticDocParts/_xls.png diff --git a/src/PHPWord/_staticDocParts/fontTable.xml b/Classes/PHPWord/_staticDocParts/fontTable.xml similarity index 100% rename from src/PHPWord/_staticDocParts/fontTable.xml rename to Classes/PHPWord/_staticDocParts/fontTable.xml diff --git a/src/PHPWord/_staticDocParts/numbering.xml b/Classes/PHPWord/_staticDocParts/numbering.xml similarity index 100% rename from src/PHPWord/_staticDocParts/numbering.xml rename to Classes/PHPWord/_staticDocParts/numbering.xml diff --git a/src/PHPWord/_staticDocParts/settings.xml b/Classes/PHPWord/_staticDocParts/settings.xml similarity index 100% rename from src/PHPWord/_staticDocParts/settings.xml rename to Classes/PHPWord/_staticDocParts/settings.xml diff --git a/src/PHPWord/_staticDocParts/theme1.xml b/Classes/PHPWord/_staticDocParts/theme1.xml similarity index 100% rename from src/PHPWord/_staticDocParts/theme1.xml rename to Classes/PHPWord/_staticDocParts/theme1.xml diff --git a/src/PHPWord/_staticDocParts/webSettings.xml b/Classes/PHPWord/_staticDocParts/webSettings.xml similarity index 100% rename from src/PHPWord/_staticDocParts/webSettings.xml rename to Classes/PHPWord/_staticDocParts/webSettings.xml diff --git a/changelog.txt b/changelog.txt index 72b9644c..028aea1c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -30,4 +30,5 @@ Fixed in branch for release 0.7 : - General: (deds) - add indentation support to paragraphs - General: (Progi1984) GH-27 - Support for Composer - General: (Progi1984) - Basic CI with Travis -- General: (Progi1984) - Added PHPWord_Exception and exception when could not copy the template \ No newline at end of file +- General: (Progi1984) - Added PHPWord_Exception and exception when could not copy the template +- General: (Progi1984) - IMPROVED : Moved examples out of Classes directory \ No newline at end of file diff --git a/composer.json b/composer.json index 75678888..28060794 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ }, "autoload": { "psr-0": { - "PHPWord": "src/" + "PHPWord": "Classes/" } } } diff --git a/samples/.gitignore b/samples/.gitignore deleted file mode 100644 index f3b243cb..00000000 --- a/samples/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ - -*.odt -*.docx -*.rtf -*.txt \ No newline at end of file diff --git a/samples/Sample_01_SimpleText.php b/samples/Sample_01_SimpleText.php index 4bf9d343..d421c37d 100644 --- a/samples/Sample_01_SimpleText.php +++ b/samples/Sample_01_SimpleText.php @@ -9,7 +9,7 @@ else { define('EOL', '
'); } -require_once '../src/PHPWord.php'; +require_once '../Classes/PHPWord.php'; // New Word Document echo date('H:i:s') , " Create new PHPWord object" , EOL; diff --git a/src/Examples/AdvancedTable.php b/samples/old/AdvancedTable.php similarity index 97% rename from src/Examples/AdvancedTable.php rename to samples/old/AdvancedTable.php index 5a2088ff..e83c4e98 100644 --- a/src/Examples/AdvancedTable.php +++ b/samples/old/AdvancedTable.php @@ -1,5 +1,5 @@