Skip to content
This repository was archived by the owner on Mar 22, 2020. It is now read-only.

Conversation

@zepich
Copy link

@zepich zepich commented Mar 18, 2019

I needed the ability to add some small changes to the templates. To be able to do that i've added a new argument to the constructor of the Formatter class. With this argument you can specify a custom template directory where you can store your modified templates.

Feel free to merge it into the library if you want.

Example code:

<?php
$a = [
    'city' => 'Testtown',
    'country' => 'United States of America',
    'country_code' => 'US',
    'house_number' => '123',
    'road' => 'Test Road',
    'postcode' => '08000-6000',
    'state' => 'New Jersey'
];
$formatter = new Formatter(__DIR__ . '/templates/conf');
$text = $formatter->formatArray($a, ['country' => 'US']);`

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 95.308% when pulling f2123f0 on zepich:master into c4b4a61 on predicthq:master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants