diff options
| author | Greg Roach <fisharebest@gmail.com> | 2015-06-01 10:17:37 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2015-06-01 12:38:58 +0100 |
| commit | a6f13a4a2d4f52465c4c6a7bad3a4dbfa1ec5089 (patch) | |
| tree | 78110c3999121e0c136544fcbd9a2b65d0708546 /app/Report/ReportParserBase.php | |
| parent | ef0d468b3df316b4c63606fcd8d2cd5446aa80de (diff) | |
| download | webtrees-a6f13a4a2d4f52465c4c6a7bad3a4dbfa1ec5089.tar.gz webtrees-a6f13a4a2d4f52465c4c6a7bad3a4dbfa1ec5089.tar.bz2 webtrees-a6f13a4a2d4f52465c4c6a7bad3a4dbfa1ec5089.zip | |
Refactor report generation
Diffstat (limited to 'app/Report/ReportParserBase.php')
| -rw-r--r-- | app/Report/ReportParserBase.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/app/Report/ReportParserBase.php b/app/Report/ReportParserBase.php index 36e4b16557..3312566ffa 100644 --- a/app/Report/ReportParserBase.php +++ b/app/Report/ReportParserBase.php @@ -15,16 +15,14 @@ namespace Fisharebest\Webtrees\Report; * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -use Fisharebest\Webtrees\Auth; use Fisharebest\Webtrees\Date; -use Fisharebest\Webtrees\I18N; /** * Class ReportParserBase */ class ReportParserBase { /** @var resource The XML parser */ - private $xml_parser; + protected $xml_parser; /** @var string Text contents of tags */ protected $text = ''; @@ -61,8 +59,8 @@ class ReportParserBase { * @param string $name The name of the xml element parsed * @param string[] $attrs An array of key value pairs for the attributes */ - private function startElement($parser, $name, $attrs) { - $method = strtolower($name) . 'StartHandler'; + public function startElement($parser, $name, $attrs) { + $method = $name . 'StartHandler'; if (method_exists($this, $method)) { $this->$method($attrs); } @@ -74,8 +72,8 @@ class ReportParserBase { * @param resource $parser the resource handler for the xml parser * @param string $name the name of the xml element parsed */ - private function endElement($parser, $name) { - $method = strtolower($name) . 'EndHandler'; + public function endElement($parser, $name) { + $method = $name . 'EndHandler'; if (method_exists($this, $method)) { $this->$method(); } @@ -87,7 +85,7 @@ class ReportParserBase { * @param resource $parser The resource handler for the xml parser * @param string $data The name of the xml element parsed */ - private function characterData($parser, $data) { + public function characterData($parser, $data) { $this->text .= $data; } } |
