<?php
/**
 * ParamProvider that injects unchangeable constants
 * 
 * @author Visual Media 
 */

namespace VisualM\ManagementBundle\AdminList\Param;

use Symfony\Component\HttpFoundation\Request;

/**
 * ParamProvider that injects unchangeable constants
 *
 * @author Visual Media 
 */
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;
        }
    }
    
}