mapper.php

Basically a serialization wrapper for netresearch/jsonmapper
git clone git://git.finwo.net/lib/mapper.php
Log | Files | Refs | README

DriverInterface.php (822B)


      1 <?php
      2 
      3 namespace Finwo\Mapper\Driver;
      4 
      5 interface DriverInterface
      6 {
      7     /**
      8      * encodeSupport()
      9      * Checks if the given data is compatible with encoding technique
     10      * 
     11      * @param mixed $testData
     12      *
     13      * @return boolean
     14      */
     15     public function encodeSupport( $testData );
     16 
     17     /**
     18      * decodeSupport()
     19      * Checks if the given encoded data is of our type
     20      *
     21      * @param string $testData
     22      *
     23      * @return boolean
     24      */
     25     public function decodeSupport( $testData );
     26 
     27     /**
     28      * encode()
     29      * Returns encoded version of the raw data
     30      *
     31      * @return string
     32      */
     33     public function encode( $raw );
     34 
     35     /**
     36      * decode()
     37      * Returns data decoded to assoc array based upon the encoded data
     38      *
     39      * @return array
     40      */
     41     public function decode( $encoded );
     42 }