Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FragmentUriGenerator.php

function FragmentUriGenerator::checkNonScalar

1 call to FragmentUriGenerator::checkNonScalar()
FragmentUriGenerator::generate in vendor/symfony/http-kernel/Fragment/FragmentUriGenerator.php
Generates a fragment URI for a given controller.

File

vendor/symfony/http-kernel/Fragment/FragmentUriGenerator.php, line 76

Class

FragmentUriGenerator
Generates a fragment URI.

Namespace

Symfony\Component\HttpKernel\Fragment

Code

private function checkNonScalar(array $values) : void {
    foreach ($values as $key => $value) {
        if (\is_array($value)) {
            $this->checkNonScalar($value);
        }
        elseif (!\is_scalar($value) && null !== $value) {
            throw new \LogicException(\sprintf('Controller attributes cannot contain non-scalar/non-null values (value for key "%s" is not a scalar or null).', $key));
        }
    }
}
RSS feed
Powered by Drupal