<?php
/**
 * ParamProvider that injects unchangeable constants
 * 
 * @author Elze Kool <info@visualmedia.nl>
 */

namespace VisualM\ManagementBundle\AdminList\Param;

use Symfony\Component\HttpFoundation\Request;

/**
 * ParamProvider that injects unchangeable constants
 *
 * @author Elze Kool <info@visualmedia.nl>
 */
class ConstParamProvider implements ParamProviderInterface
{
    /**
     * Options
     * @var array
     */
    private $Options;
    
    /**
     * Params
     * @var array
     */
    private $Params;
    
    /**
     * Constructor
     * 
     * @param string $Options Options to add (Passed to ModelManager)
     * @param string $Params  Params to add (For URLs)
     */
    function __construct($Options = array(), $Params = array())
    {
        $this->Options = $Options;
        $this->Params = $Params;
    }
    
    /**
     * {@inheritdoc}
     */
    public function process(Request $request, array &$params, array &$options) {
        foreach($this->Options as $key => $value) {
            $options[$key] = $value;
        }
        foreach($this->Params as $key => $value) {
            $params[$key] = $value;
        }
    }
    
}