UrlGenerator::generate()

string generate(string $name, mixed $parameters = array(), int $referenceType = self::ABSOLUTE_PATH) Generates a URL or path for a specific route based on the given parameters. Parameters that reference placeholders in the route pattern will substitute them in the path or host. Extra params are added as query string to the URL. When the passed reference type cannot be generated for the route because it requires a different host or scheme than the current one, the method will retu

UrlGenerator

class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInterface UrlGenerator can generate a URL or a path for any route in the RouteCollection based on the passed parameters. Methods __construct(RouteCollection $routes, RequestContext $context, LoggerInterface $logger = null) Constructor. setContext(RequestContext $context) Sets the request context. RequestContext getContext() Gets the request context. setStrictRequirements(bool|null $enabled) Enable

Url

class Url extends Constraint Constants DEFAULT_GROUP The name of the group given to all constraints with no explicit group. CLASS_CONSTRAINT Marks a constraint that can be put onto classes. PROPERTY_CONSTRAINT Marks a constraint that can be put onto properties. INVALID_URL_ERROR Properties mixed $payload Domain-specific data attached to a constraint. from Constraint array $groups The groups that the constraint belongs to from Constraint $message $dnsMessage $proto

UriSigner::sign()

string sign(string $uri) Signs a URI. The given URI is signed by adding a _hash query string parameter which value depends on the URI and the secret. Parameters string $uri A URI to sign Return Value string The signed URI

UriSigner::check()

bool check(string $uri) Checks that a URI contains the correct hash. The _hash query string parameter must be the last one (as it is generated that way by the sign() method, it should never be a problem). Parameters string $uri A signed URI Return Value bool True if the URI is signed correctly, false otherwise

UriSigner

class UriSigner Signs URIs. Methods __construct(string $secret) Constructor. string sign(string $uri) Signs a URI. bool check(string $uri) Checks that a URI contains the correct hash. Details __construct(string $secret) Constructor. Parameters string $secret A secret string sign(string $uri) Signs a URI. The given URI is signed by adding a _hash query string parameter which value depends on

UriSafeTokenGenerator

class UriSafeTokenGenerator implements TokenGeneratorInterface Generates CSRF tokens. Methods __construct(int $entropy = 256) Generates URI-safe CSRF tokens. string generateToken() Generates a CSRF token. Details __construct(int $entropy = 256) Generates URI-safe CSRF tokens. Parameters int $entropy The amount of entropy collected for each token (in bits) string generateToken() Generates a CSRF

UploadValidatorExtension::getExtendedType()

string getExtendedType() Returns the name of the type being extended. Return Value string The name of the type being extended

UploadValidatorExtension::configureOptions()

configureOptions(OptionsResolver $resolver) Configures the options for this type. Parameters OptionsResolver $resolver The resolver for the options

UploadValidatorExtension

class UploadValidatorExtension extends AbstractTypeExtension Methods buildForm(FormBuilderInterface $builder, array $options) Builds the form. from AbstractTypeExtension buildView(FormView $view, FormInterface $form, array $options) Builds the view. from AbstractTypeExtension finishView(FormView $view, FormInterface $form, array $options) Finishes the view. from AbstractTypeExtension configureOptions(OptionsResolver $resolver) Configures the options for this type. __constr