Skip to content

Commit a1dd83a

Browse files
committed
load filters via classmap instead of require_once.
Should fix errors when added to frameworks.
1 parent 7aeb1ca commit a1dd83a

2 files changed

Lines changed: 53 additions & 47 deletions

File tree

composer.json

Lines changed: 48 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,49 @@
11
{
2-
"name" : "tmw/fpdm",
3-
"description" : "PDF form filling using FPDM Class written by FPDF author Olivier",
4-
"type" : "library",
5-
"license" : "MIT",
6-
"authors" : [{
7-
"name" : "Olivier Plathey",
8-
"email" : "oliver@fpdf.org",
9-
"homepage" : "http://www.fpdf.org/",
10-
"role" : "Author"
11-
}, {
12-
"name" : "codeshell",
13-
"role" : "Developer",
14-
"homepage" : "https://github.com/codeshell/"
15-
}
16-
],
17-
"homepage" : "https://github.com/codeshell/fpdm",
18-
"autoload": {
19-
"classmap": ["fpdm.php"]
20-
},
21-
"repositories" : [{
22-
"type" : "git",
23-
"url" : "https://github.com/codeshell/fpdm",
24-
"name" : "GitHub"
25-
}
26-
],
27-
"require" : {
28-
"php" : ">=5.3.0"
29-
},
30-
"keywords" : [
31-
"FPDM",
32-
"PDF",
33-
"forms",
34-
"fields",
35-
"fill",
36-
"populate",
37-
"FPDF"
38-
],
39-
"support" : {
40-
"issues" : "https://github.com/codeshell/fpdm/issues",
41-
"source" : "https://github.com/codeshell/fpdm/tree/master"
42-
}
43-
}
2+
"name": "tmw/fpdm",
3+
"description": "PDF form filling using FPDM Class written by FPDF author Olivier",
4+
"type": "library",
5+
"license": "MIT",
6+
"authors": [
7+
{
8+
"name": "Olivier Plathey",
9+
"email": "oliver@fpdf.org",
10+
"homepage": "http://www.fpdf.org/",
11+
"role": "Author"
12+
},
13+
{
14+
"name": "codeshell",
15+
"role": "Developer",
16+
"homepage": "https://github.com/codeshell/"
17+
}
18+
],
19+
"homepage": "https://github.com/codeshell/fpdm",
20+
"autoload": {
21+
"classmap": [
22+
"fpdm.php",
23+
"filters/"
24+
]
25+
},
26+
"repositories": [
27+
{
28+
"type": "git",
29+
"url": "https://github.com/codeshell/fpdm",
30+
"name": "GitHub"
31+
}
32+
],
33+
"require": {
34+
"php": ">=5.3.0"
35+
},
36+
"keywords": [
37+
"FPDM",
38+
"PDF",
39+
"forms",
40+
"fields",
41+
"fill",
42+
"populate",
43+
"FPDF"
44+
],
45+
"support": {
46+
"issues": "https://github.com/codeshell/fpdm/issues",
47+
"source": "https://github.com/codeshell/fpdm/tree/master"
48+
}
49+
}

fpdm.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
);
4141

4242
//Major stream filters come from FPDI's stuff but I've added some :)
43-
require_once("filters/FilterASCIIHex.php");
44-
require_once("filters/FilterASCII85.php");
45-
require_once("filters/FilterFlate.php");
46-
require_once("filters/FilterLZW.php");
47-
require_once("filters/FilterStandard.php");
43+
// require_once("filters/FilterASCIIHex.php");
44+
// require_once("filters/FilterASCII85.php");
45+
// require_once("filters/FilterFlate.php");
46+
// require_once("filters/FilterLZW.php");
47+
// require_once("filters/FilterStandard.php");
4848

4949

5050
$__tmp = version_compare(phpversion(), "5") == -1 ? array('FPDM') : array('FPDM', false);

0 commit comments

Comments
 (0)