Changeset 1044

Show
Ignore:
Timestamp:
11/16/07 15:03:06 (1 year ago)
Author:
mikey
Message:

added base implementation for decorated string encoders
supports pass-thru of method calls on decorated instances

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/php/string/stubRecursiveStringEncoder.php

    r970 r1044  
    99 * @subpackage  php_string 
    1010 */ 
    11 stubClassLoader::load('net.stubbles.php.string.stubAbstractStringEncoder'); 
     11stubClassLoader::load('net.stubbles.php.string.stubAbstractDecoratedStringEncoder'); 
    1212/** 
    1313 * Encoder/decoder that decorates other en-/decoders and applies the en-/decoding 
     
    1717 * @subpackage  php_string 
    1818 */ 
    19 class stubRecursiveStringEncoder extends stubAbstractStringEncoder 
     19class stubRecursiveStringEncoder extends stubAbstractDecoratedStringEncoder 
    2020{ 
    21     /** 
    22      * the decorated encoder 
    23      * 
    24      * @var  stubStringEncoder 
    25      */ 
    26     protected $encoder; 
    27  
    28     /** 
    29      * constructor 
    30      * 
    31      * @param  stubStringEncoder  $encoder  the encoder to apply recursively 
    32      */ 
    33     public function __construct(stubStringEncoder $encoder) 
    34     { 
    35         $this->encoder = $encoder; 
    36     } 
    37  
    3821    /** 
    3922     * encodes a value recursively 
  • trunk/src/test/php/net/stubbles/php/PHPTestSuite.php

    r970 r1044  
    3030         
    3131        // string operations 
     32        $this->addTestFile($dir . '/string/stubAbstractDecoratedStringEncoderTestCase.php'); 
    3233        $this->addTestFile($dir . '/string/stubAbstractStringEncoderTestCase.php'); 
    3334        $this->addTestFile($dir . '/string/stubRecursiveStringEncoderTestCase.php');