Skip to content

Reference

phil/slug-bundle
TypeKindRole
Phil\SlugBundle\PhilSlugBundleAbstractBundleThe phil_slug configuration and the services
Phil\SlugBundle\Infrastructure\DependencyInjection\SluggerServicesfinal classRegisters the named sluggers, their aliases and Sluggers
Phil\SlugBundle\Infrastructure\Twig\SlugExtensionTwig runtimeThe phil_slug filter
Phil\SlugBundle\Application\Contract\SlugHistoryinterfaceThe history of former slugs: record(), currentSlug(), formerSlugs(), forget()
Phil\SlugBundle\Domain\SlugHistoryKeysfinal classThe rules of a scope and a subject: scope(), subject()
Phil\SlugBundle\Domain\Exception\InvalidSlugHistoryexceptionA scope or a subject the history cannot hold; an InvalidArgumentException
Phil\SlugBundle\Infrastructure\Doctrine\DoctrineSlugHistoryfinal readonly classThe history on a DBAL connection
Phil\SlugBundle\Infrastructure\Doctrine\SlugHistoryTablefinal classThe table phil_slug_history: configure(Schema)
Phil\SlugBundle\Infrastructure\Doctrine\SlugHistorySchemaListenerlistenerAdds the table to the schema the ORM generates

SluggerServices

ConstantValue
ID_PREFIXphil_slug.slugger.
SLUGGERS_IDPhil\Slug\Sluggers
MAX_LENGTH255, the longest slug

PhilSlugBundle

ConstantValue
HISTORY_IDphil_slug.history, the Doctrine history, aliased as SlugHistory

SlugHistoryKeys

ConstantValue
SCOPE_MAX_LENGTH100 bytes
SUBJECT_MAX_LENGTH191 bytes

SlugHistoryTable

ColumnType
scopestring(100), primary key with former_slug
former_slugstring(255)
subjectstring(191), indexed with scope as phil_slug_history_subject
current_slugstring(255)
recorded_atdatetime_immutable

The types of slugs and sluggers are phil/slug's: see its reference.