PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Nathan Bishop   PHP Encoder   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP Encoder
Encode and decode email with quoted-printable
Author: By
Last change: Update of README.md
Date: 2 months ago
Size: 2,363 bytes
 

Contents

Class file image Download

Encoder

Build Status

Table of Contents

<a name="about"></a>About

Encoder is a class that allows encoding/decoding from/to: - Base64 - Quoted Printable - 7bit (Future Feature) - 8bit (Future Feature) - Binary

<a name="getting-started"></a>Getting Started

  1. PHP 5.3.x is required
  2. Install manually

<a name="usage"></a>Usage

Include and instantiate:

require 'path\to\Encoder.php';

$encoder = new Encoder;

Convert text to base64:

$encoder->encode('Hëllo World!', $encoder::BASE_64); // returns 'SOtsbG8gV29ybGQh'

Convert text to quoted-printable:

$encoder->encode('Hëllo World!', $encoder::QUOTED_PRINTABLE); // returns 'H=EBllo World!'

Decode quoted-printable text:

$encoder->decode('=E1=E9=ED=F3=FA', $encoder::QUOTED_PRINTABLE); // returns 'áéíóú'

<a name="api"></a>API

Below is a list of the public methods available for use.

$encoder->
    encode($input, $scheme, $length = 75)   // Encode text to encoding scheme.
    decode($input, $scheme)                 // Decode text from encoded text.

<a name="testing"></a>Testing

This project keeps all tests stored in the /tests folder and uses the PHPUnit testing framework.

<a name="contributors"></a>Contributors

<a name="license"></a>License

(GNU General Public License, version 2)

Copyright &copy; 2013, Nathan Bishop

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see GNU General Public License, version 2.