src/Synapse/Config/Config.php
public function attach(ReaderInterface $reader, $last = true)
    {
        if ($last) {
            // Add to the end (i.e. read this last, highest merge priority)
            $this->readers[] = $reader;
        } else {
            // Add to the beginning (i.e. read this first, lowest merge priority)
            array_unshift($this->readers, $reader);
        }

        // Clear any cached groups
        $this->groups = [];
    }
public function attach(ReaderInterface $reader, $last = true)
    {
        if ($last) {
            // Add to the end (i.e. read this last, highest merge priority)
            $this->readers[] = $reader;
        } else {
            // Add to the beginning (i.e. read this first, lowest merge priority)
            array_unshift($this->readers, $reader);
        }

        // Clear any cached groups
        $this->groups = [];
    }
public function attach ( ReaderInterface $ reader , $ last = true ) { if ( $ last ) { // Add to the end (i.e. read this last, highest merge priority) $ this -> readers [ ] = $ reader ; } else { // Add to the beginning (i.e. read this first, lowest merge priority) array_unshift ( $ this -> readers , $ reader ) ; } // Clear any cached groups $ this -> groups = [ ] ; }
Attach a new config reader

Readers are accessed in order by their priority. By default, their
priority is the order in which they were attached. Calling
Config::attach($reader) will cause any configs read by it to override any
configs read by previously attached readers.

@param  ReaderInterface $reader
@param  boolean $last
Attach a new config reader