<commit_before><?php
/*
 * WellCommerce Open-Source E-Commerce Platform
 *
 * This file is part of the WellCommerce package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information,
 * please view the LICENSE file that was distributed with this source code.
 */

namespace WellCommerce\Bundle\ProductBundle\Controller\Front;

use Doctrine\Common\Util\Debug;
use Symfony\Component\HttpFoundation\Request;
use WellCommerce\Bundle\CoreBundle\Controller\Front\AbstractFrontController;
use WellCommerce\Bundle\CoreBundle\Controller\Front\FrontControllerInterface;
use WellCommerce\Bundle\ProductBundle\Repository\ProductRepositoryInterface;

/**
 * Class ProductController
 *
 * @author  <NAME> <<EMAIL>>
 *
 * @Sensio\Bundle\FrameworkExtraBundle\Configuration\Template()
 */
class ProductController extends AbstractFrontController implements FrontControllerInterface
{
    public function indexAction(Request $request)
    {
        $resource = $this->findOr404($request);

        $this->getManager()->getProvider('product')->setCurrentResource($resource);

        return [
            'product' => $resource
        ];
    }
}<commit_msg>ProductController uses new provider technique<commit_after><?php
/*
 * WellCommerce Open-Source E-Commerce Platform
 *
 * This file is part of the WellCommerce package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information,
 * please view the LICENSE file that was distributed with this source code.
 */

namespace WellCommerce\Bundle\ProductBundle\Controller\Front;

use Symfony\Component\HttpFoundation\Request;
use WellCommerce\Bundle\CoreBundle\Controller\Front\AbstractFrontController;
use WellCommerce\Bundle\CoreBundle\Controller\Front\FrontControllerInterface;

/**
 * Class ProductController
 *
 * @author  <NAME> <<EMAIL>>
 *
 * @Sensio\Bundle\FrameworkExtraBundle\Configuration\Template()
 */
class ProductController extends AbstractFrontController implements FrontControllerInterface
{
    public function indexAction(Request $request)
    {
        $product = $this->findOr404($request);

        $this->getManager()->getProductProvider()->setCurrentProduct($product);

        return [
            'product' => $product
        ];
    }
}
{'fraction_non_alphanumeric': 0.10674408217954444, 'fraction_numerical': 0.0026797677534613666, 'mean_word_length': 4.4106280193236715, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3636091', 'n_tokens_mistral': 587, 'n_tokens_neox': 579, 'n_words': 138}