<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace OfficeBrain\Bundle\SolrBundle\Command;

/**
 * Validator functions.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class Validators
{
    public static function validateCulture($culture)
    {
        if (empty($culture)) {
            throw new \InvalidArgumentException('The culture must be en(for English) OR fr(for French).');
        }

        if($culture != 'en' AND $culture != 'fr'){
            throw new \InvalidArgumentException('The culture must be en(for English) OR fr(for French).');
        }
        return $culture;
    }

    public static function validateProductId($productId)
    {
        // Do some validation if required
        
        return $productId;
    }
    
    public static function validateProductSku($productSku)
    {
        // Do some validation if required
        
        return $productSku;
    }
    
    public static function validateSupplierId($supplierId)
    {
        // Do some validation if required
        
        return $supplierId;
    }
    
    public static function validateOffset($offset)
    {
        // Do some validation if required
        
        return $offset;
    }
}
