UrlGenerator::isStrictRequirements()

bool|null isStrictRequirements() Returns whether to throw an exception on incorrect parameters. Null means the requirements check is deactivated completely. Return Value bool|null

UrlGenerator::getRelativePath()

static string getRelativePath(string $basePath, string $targetPath) Returns the target path as relative reference from the base path. Only the URIs path component (no schema, host etc.) is relevant and must be given, starting with a slash. Both paths must be absolute and not contain relative parts. Relative URLs from one resource to another are useful when generating self-contained downloadable document archives. Furthermore, they can be used to reduce the link size in

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

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

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::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

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

UploadedFile::move()

File move(string $directory, string $name = null) Moves the file to a new location. Parameters string $directory The destination folder string $name The new file name Return Value File A File object representing the new file Exceptions FileException if, for any reason, the file could not have been moved