Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php namespace Drupal\Core\EventSubscriber; use Drupal\Core\ParamConverter\ParamConvert..

Decoded Output download

<?php

namespace Drupal\Core\EventSubscriber;

use Drupal\Core\ParamConverter\ParamConverterManagerInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Drupal\Core\Routing\RoutingEvents;
use Drupal\Core\Routing\RouteBuildEvent;

/**
 * Event subscriber for registering parameter converters with routes.
 */
class ParamConverterSubscriber implements EventSubscriberInterface {

  /**
   * The parameter converter manager.
   *
   * @var \Drupal\Core\ParamConverter\ParamConverterManagerInterface
   */
  protected $paramConverterManager;

  /**
   * Constructs a new ParamConverterSubscriber.
   *
   * @param \Drupal\Core\ParamConverter\ParamConverterManagerInterface $param_converter_manager
   *   The parameter converter manager that will be responsible for upcasting
   *   request attributes.
   */
  public function __construct(ParamConverterManagerInterface $param_converter_manager) {
    $this->paramConverterManager = $param_converter_manager;
  }

  /**
   * Applies parameter converters to route parameters.
   *
   * @param \Drupal\Core\Routing\RouteBuildEvent $event
   *   The event to process.
   */
  public function onRoutingRouteAlterSetParameterConverters(RouteBuildEvent $event) {
    $this->paramConverterManager->setRouteParameterConverters($event->getRouteCollection());
  }

  /**
   * {@inheritdoc}
   */
  public static function getSubscribedEvents(): array {
    // Run after \Drupal\system\EventSubscriber\AdminRouteSubscriber.
    $events[RoutingEvents::ALTER][] = ['onRoutingRouteAlterSetParameterConverters', -220];
    return $events;
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Drupal\Core\EventSubscriber;

use Drupal\Core\ParamConverter\ParamConverterManagerInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Drupal\Core\Routing\RoutingEvents;
use Drupal\Core\Routing\RouteBuildEvent;

/**
 * Event subscriber for registering parameter converters with routes.
 */
class ParamConverterSubscriber implements EventSubscriberInterface {

  /**
   * The parameter converter manager.
   *
   * @var \Drupal\Core\ParamConverter\ParamConverterManagerInterface
   */
  protected $paramConverterManager;

  /**
   * Constructs a new ParamConverterSubscriber.
   *
   * @param \Drupal\Core\ParamConverter\ParamConverterManagerInterface $param_converter_manager
   *   The parameter converter manager that will be responsible for upcasting
   *   request attributes.
   */
  public function __construct(ParamConverterManagerInterface $param_converter_manager) {
    $this->paramConverterManager = $param_converter_manager;
  }

  /**
   * Applies parameter converters to route parameters.
   *
   * @param \Drupal\Core\Routing\RouteBuildEvent $event
   *   The event to process.
   */
  public function onRoutingRouteAlterSetParameterConverters(RouteBuildEvent $event) {
    $this->paramConverterManager->setRouteParameterConverters($event->getRouteCollection());
  }

  /**
   * {@inheritdoc}
   */
  public static function getSubscribedEvents(): array {
    // Run after \Drupal\system\EventSubscriber\AdminRouteSubscriber.
    $events[RoutingEvents::ALTER][] = ['onRoutingRouteAlterSetParameterConverters', -220];
    return $events;
  }

}

Function Calls

None

Variables

None

Stats

MD5 b3b1076c4e9021d49e26a2e9c2c77932
Eval Count 0
Decode Time 95 ms