src/PHPEncoder.php
public function addEncoder(Encoder\Encoder $encoder, $prepend = false)
    {
        $prepend ? array_unshift($this->encoders, $encoder) : array_push($this->encoders, $encoder);
    }
public function addEncoder(Encoder\Encoder $encoder, $prepend = false)
    {
        $prepend ? array_unshift($this->encoders, $encoder) : array_push($this->encoders, $encoder);
    }
public function addEncoder ( Encoder \ Encoder $ encoder , $ prepend = false ) { $ prepend ? array_unshift ( $ this -> encoders , $ encoder ) : array_push ( $ this -> encoders , $ encoder ) ; }
Adds a new encoder.

Values are always encoded by the first encoder that supports encoding
that type of value. By setting the second optional parameter to true,
you can prepend the encoder to the list to ensure that it will be tested
first.

@param Encoder\Encoder $encoder Encoder for encoding values
@param bool $prepend True to prepend the encoder to the list, false to add it as last
Adds a new encoder .