Skip to content

Commit

Permalink
Merge pull request #1 from ESLKem/1.0.0-dev
Browse files Browse the repository at this point in the history
Initial release
  • Loading branch information
KemTM authored May 31, 2018
2 parents e780eb9 + 7f2e83f commit f29f62a
Show file tree
Hide file tree
Showing 106 changed files with 18,499 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
vendor/
.vscode/
composer.lock
.DS_Store
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# GBX Parser
This component is written to parse Maniaplanet engine's produced GBX Map files and extract useful information from it.
**Note:** this package requires a 64-bit PHP installation to function properly.

# Installation
Just run `$ composer require 'eslkem/gbx-parser'` or add `"eslkem/gbx-parser": "^1.0` line to your composer.json file followed by a `$ composer install` or `$composer update` command.

# Setup and usage
Using the package is straight forward: do not forget to include
```php
require_once __DIR__.'/vendor/autoload.php';
```
and use the following classes:
```php
use ESLKem\GBXParser\Parser;
use ESLKem\GBXParser\Models\Map;
```
Sample usage:
```php
$map = Parser::parse('./path/to/file.gbx');
echo $map->getName();
```
# Documentation
The full documentation is available in the `/docs` folder. A web browser is required to view it locally.

# Testing
This package is tested using PHPUnit. To run the tests, simply execute `$ ./vendor/bin/phpunit`.
27 changes: 27 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "eslkem/gbx-parser",
"description": "This package is made to parse Maniaplanet's GBX files and extract useful information from them.",
"keywords": ["gbx", "parser", "maniaplanet"],
"license": "GPL-3.0-or-later",
"authors": [
{
"name": "Aleksas Legačinskas",
"email": "[email protected]"
}
],
"type": "library",
"require": {
"php-64bit": ">=7.1",
"sabre/xml": "^2.1",
"intervention/image": "^2.4"
},
"require-dev": {
"phpunit/phpunit": "^7",
"phpdocumentor/phpdocumentor": "2.*"
},
"autoload": {
"psr-4": {
"ESLKem\\GBXParser\\": "src/"
}
}
}
5 changes: 5 additions & 0 deletions docs/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Fixes a vulnerability in CentOS: http://stackoverflow.com/questions/20533279/prevent-php-from-parsing-non-php-files-such-as-somefile-php-txt
<FilesMatch \.php\.txt$>
RemoveHandler .php
ForceType text/plain
</FilesMatch>
Binary file not shown.
Binary file added docs/build/phpdoc-cache-2e/phpdoc-cache-settings.dat
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
516 changes: 516 additions & 0 deletions docs/classes/ESLKem.GBXParser.Models.Decoration.html

Large diffs are not rendered by default.

516 changes: 516 additions & 0 deletions docs/classes/ESLKem.GBXParser.Models.Environment.html

Large diffs are not rendered by default.

478 changes: 478 additions & 0 deletions docs/classes/ESLKem.GBXParser.Models.GBX.html

Large diffs are not rendered by default.

2,189 changes: 2,189 additions & 0 deletions docs/classes/ESLKem.GBXParser.Models.Map.html

Large diffs are not rendered by default.

685 changes: 685 additions & 0 deletions docs/classes/ESLKem.GBXParser.Models.Mode.html

Large diffs are not rendered by default.

494 changes: 494 additions & 0 deletions docs/classes/ESLKem.GBXParser.Models.Mood.html

Large diffs are not rendered by default.

553 changes: 553 additions & 0 deletions docs/classes/ESLKem.GBXParser.Models.Type.html

Large diffs are not rendered by default.

1,024 changes: 1,024 additions & 0 deletions docs/classes/ESLKem.GBXParser.Parser.html

Large diffs are not rendered by default.

732 changes: 732 additions & 0 deletions docs/css/bootstrap-combined.no-icons.min.css

Large diffs are not rendered by default.

403 changes: 403 additions & 0 deletions docs/css/font-awesome.min.css

Large diffs are not rendered by default.

65 changes: 65 additions & 0 deletions docs/css/jquery.iviewer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
.viewer {
-ms-touch-action: none;
}

.iviewer_common {
position:absolute;
bottom:10px;
border: 1px solid #000;
height: 28px;
z-index: 5000;
}

.iviewer_cursor {
cursor: url(../images/iviewer/hand.cur) 6 8, pointer;
}

.iviewer_drag_cursor {
cursor: url(../images/iviewer/grab.cur) 6 8, pointer;
}

.iviewer_button {
width: 28px;
cursor: pointer;
background-position: center center;
background-repeat: no-repeat;
}

.iviewer_zoom_in {
left: 20px;
background: url(../images/iviewer/iviewer.zoom_in.png);
}

.iviewer_zoom_out {
left: 55px;
background: url(../images/iviewer/iviewer.zoom_out.png);
}

.iviewer_zoom_zero {
left: 90px;
background: url(../images/iviewer/iviewer.zoom_zero.png);
}

.iviewer_zoom_fit {
left: 125px;
background: url(../images/iviewer/iviewer.zoom_fit.png);
}

.iviewer_zoom_status {
left: 160px;
font: 1em/28px Sans;
color: #000;
background-color: #fff;
text-align: center;
width: 60px;
}

.iviewer_rotate_left {
left: 227px;
background: #fff url(../images/iviewer/iviewer.rotate_left.png) center center no-repeat;
}

.iviewer_rotate_right {
left: 262px;
background: #fff url(../images/iviewer/iviewer.rotate_right.png) center center no-repeat;
}
3 changes: 3 additions & 0 deletions docs/css/phpdocumentor-clean-icons/Read Me.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
To modify your generated font, use the *dev.svg* file, located in the *fonts* folder in this package. You can import this dev.svg file to the IcoMoon app. All the tags (class names) and the Unicode points of your glyphs are saved in this file.

See the documentation for more info on how to use this package: http://icomoon.io/#docs/font-face
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
30 changes: 30 additions & 0 deletions docs/css/phpdocumentor-clean-icons/lte-ie7.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* Load this script using conditional IE comments if you need to support IE 7 and IE 6. */

window.onload = function() {
function addIcon(el, entity) {
var html = el.innerHTML;
el.innerHTML = '<span style="font-family: \'phpdocumentor-clean-icons\'">' + entity + '</span>' + html;
}
var icons = {
'icon-trait' : '&#xe000;',
'icon-interface' : '&#xe001;',
'icon-class' : '&#xe002;'
},
els = document.getElementsByTagName('*'),
i, attr, html, c, el;
for (i = 0; ; i += 1) {
el = els[i];
if(!el) {
break;
}
attr = el.getAttribute('data-icon');
if (attr) {
addIcon(el, attr);
}
c = el.className;
c = c.match(/icon-[^\s'"]+/);
if (c && icons[c[0]]) {
addIcon(el, icons[c[0]]);
}
}
};
48 changes: 48 additions & 0 deletions docs/css/phpdocumentor-clean-icons/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
@font-face {
font-family: 'phpdocumentor-clean-icons';
src:url('fonts/phpdocumentor-clean-icons.eot');
src:url('fonts/phpdocumentor-clean-icons.eot?#iefix') format('embedded-opentype'),
url('fonts/phpdocumentor-clean-icons.woff') format('woff'),
url('fonts/phpdocumentor-clean-icons.ttf') format('truetype'),
url('fonts/phpdocumentor-clean-icons.svg#phpdocumentor-clean-icons') format('svg');
font-weight: normal;
font-style: normal;
}

/* Use the following CSS code if you want to use data attributes for inserting your icons */
[data-icon]:before {
font-family: 'phpdocumentor-clean-icons';
content: attr(data-icon);
speak: none;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
}

/* Use the following CSS code if you want to have a class per icon */
/*
Instead of a list of all class selectors,
you can use the generic selector below, but it's slower:
[class*="icon-"] {
*/
.icon-trait, .icon-interface, .icon-class {
font-family: 'phpdocumentor-clean-icons';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
}
.icon-trait:before {
content: "\e000";
}
.icon-interface:before {
content: "\e001";
}
.icon-class:before {
content: "\e002";
}
Loading

0 comments on commit f29f62a

Please sign in to comment.