src/Config/Loader/ClassLoader.php
public function loadExtraOptions($extraOptions, $instance)
    {
        foreach ($extraOptions as $name => $value) {
            if ($this->reflected->hasMethod($name)) {
                // There is a method to handle this option
                call_user_func_array(
                    array($instance, $name),
                    is_array($value) ? $value : array($value)
                );
                continue;
            }
            if ($this->reflected->hasProperty($name) &&
                $this->reflected->getProperty($name)->isPublic()
            ) {
                // There is a public member we can set for this option
                $instance->$name = $value;
                continue;
            }

            if ($this->canHandle($name)) {
                // There is a custom handler for that option
                $closure = $this->getExtraOptionsHandler($name);
                $closure($instance, $value);
            }
        }
    }
public function loadExtraOptions($extraOptions, $instance)
    {
        foreach ($extraOptions as $name => $value) {
            if ($this->reflected->hasMethod($name)) {
                // There is a method to handle this option
                call_user_func_array(
                    array($instance, $name),
                    is_array($value) ? $value : array($value)
                );
                continue;
            }
            if ($this->reflected->hasProperty($name) &&
                $this->reflected->getProperty($name)->isPublic()
            ) {
                // There is a public member we can set for this option
                $instance->$name = $value;
                continue;
            }

            if ($this->canHandle($name)) {
                // There is a custom handler for that option
                $closure = $this->getExtraOptionsHandler($name);
                $closure($instance, $value);
            }
        }
    }
public function loadExtraOptions ( $ extraOptions , $ instance ) { foreach ( $ extraOptions as $ name => $ value ) { if ( $ this -> reflected -> hasMethod ( $ name ) ) { // There is a method to handle this option call_user_func_array ( array ( $ instance , $ name ) , is_array ( $ value ) ? $ value : array ( $ value ) ) ; continue ; } if ( $ this -> reflected -> hasProperty ( $ name ) && $ this -> reflected -> getProperty ( $ name ) -> isPublic ( ) ) { // There is a public member we can set for this option $ instance -> $ name = $ value ; continue ; } if ( $ this -> canHandle ( $ name ) ) { // There is a custom handler for that option $ closure = $ this -> getExtraOptionsHandler ( $ name ) ; $ closure ( $ instance , $ value ) ; } } }
Set extra options if any were requested

@param  array $extraOptions Array of extra options (key => value)
@param  mixed $instance Instance you want to set options for
Set extra options if any were requested