maikay/zf2-poeditor-php-client

This package is abandoned and no longer maintained. No replacement package was suggested.

API Client for https://poeditor.com

0.3.1 2016-07-05 06:32 UTC

This package is not auto-updated.

Last update: 2021-11-27 01:41:47 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

Installation

The recommended way to install maikay/zf2-poeditor-php-client is through composer by adding dependency to your composer.json:

{
    "require": {
        "maikay/zf2-poeditor-php-client": "0.3.*"
    }
}

Requirements

Configuration

  1. add PhpClientPoeditor to your Application Modules
  2. copy php-client-poeditor.global.php.dist to your config autoloader folder and remove .dist in filename
  3. update your api_token and project_id in the configuration (you can find this informations here)

Usage

To run the configured strategies

cd path/to/my/zf2-project
php public/index.php php-client-poeditor build

php-client-poeditor build is configured here

Strategies

Existing Strategies

ServiceManagerKey Description
PhpClientPoeditor\Strategy\OneToOneStrategy saved the obtained content 1:1 POEditor - SupportedFormats
PhpClientPoeditor\Strategy\PhpArrayStrategy saved the obtained content to use Zend/I18n/Translator/Loader/PhpArray.php
PhpClientPoeditor\Strategy\JsonKeyValueStrategy saved the obtained content like PhpArrayStrategy - just in json format

Write your own Strategy

To get your own Strategy, just create a Strategy by implementing PhpClientPoeditor\Strategy\StrategyInterface.