Library Group: parser
Generated by php build/docs/rvn-docs.php. Do not edit this file by hand.
| Symbol | Kind | Summary | @return |
| --- | --- | --- | --- |
| Raven\Lib\Parser\ChannelParser::resolveChannelIdBySlug() | method | Resolves a channel id from a slug string using a caller-provided lookup callback. | int\|null Resolved channel id, or null when slug is empty. |
| Raven\Lib\Parser\FeedParser::__construct() | method | Initializes the feed-content configuration parser. | void |
| Raven\Lib\Parser\FeedParser::feedChannels() | method | Returns the normalized list of channel slugs whose pages appear in feeds. | array<int, string> Normalized channel slug list; ['all'] for all channels. |
| Raven\Lib\Parser\FeedParser::feedItems() | method | Returns the maximum number of items to include in one feed response. | int Item limit, minimum 1. |
| Raven\Lib\Parser\PageBlockParser::__construct() | method | Initializes the shared page-block parser. | void |
| Raven\Lib\Parser\PageBlockParser::decodeStoredBlocks() | method | Decodes one stored JSON content payload into normalized block rows. | array<int, array{type: string, content: string, cssid: string, cssclass: string}> Normalized block rows. |
| Raven\Lib\Parser\PageBlockParser::defaultDefinitions() | method | Returns the stock body-block definitions available without extensions. | array<string, array{label: string, editor: string}> Built-in block definitions keyed by type slug. |
| Raven\Lib\Parser\PageBlockParser::editorMode() | method | Resolves the editor mode for one normalized block type. | string Editor mode key used by the panel and public renderers. |
| Raven\Lib\Parser\PageBlockParser::encodeStoredBlocks() | method | Encodes normalized block rows for page-record persistence. | string JSON payload for the page content column, or an empty string when nothing is stored. |
| Raven\Lib\Parser\PageBlockParser::hasGalleryBlock() | method | Returns true when a normalized block list contains a gallery block. | bool True when at least one block resolves to gallery mode. |
| Raven\Lib\Parser\PageBlockParser::normalizeCssClassList() | method | Normalizes one optional block CSS class list. | string Sanitized space-delimited CSS classes, or an empty string when invalid. |
| Raven\Lib\Parser\PageBlockParser::normalizeCssId() | method | Normalizes one optional block CSS id token. | string Sanitized CSS id, or an empty string when invalid. |
| Raven\Lib\Parser\PageBlockParser::normalizeExtensionDefinitions() | method | Normalizes one extension field list into page body-block definition entries. | array<string, array{label: string, editor: string}> Normalized definition map with extension entries merged in. |
| Raven\Lib\Parser\PageBlockParser::normalizePersistedType() | method | Normalizes a persisted page-block type from storage. | string Supported stored type key, or tinymce when invalid. |
| Raven\Lib\Parser\PageBlockParser::normalizeStoredBlocks() | method | Normalizes one stored block array payload into typed rows. | array<int, array{type: string, content: string, cssid: string, cssclass: string}> Normalized block rows ready for storage. |
| Raven\Lib\Parser\PageBlockParser::normalizeType() | method | Normalizes one block type against a known definition map. | string Normalized type key, or tinymce when unknown. |
| Raven\Lib\Parser\PanelParser::fromConfig() | method | Returns the normalized panel base path read from site config, with an optional suffix appended. | string Root-relative panel path (e.g. '/panel' or '/panel/pages'). |
| Raven\Lib\Parser\PanelParser::fromRaw() | method | Normalizes a raw panel path value and optional suffix into a root-relative path string. | string Root-relative panel path (e.g. '/panel' or '/panel/pages'). |
| Raven\Lib\Parser\RedirectParser::isAllowedHttpOrRootPath() | method | Returns whether one redirect target is a safe root-relative path or HTTP(S) URL. | bool True when target is safe for redirect emission. |
| Raven\Lib\Parser\SetParser::__construct() | method | Prepares the reader for a given set directory and taxonomy type. | void |
| Raven\Lib\Parser\SetParser::defaultSetDescription() | method | Returns the description for the default taxonomy set of a given type. | string Human-readable default set description. |
| Raven\Lib\Parser\SetParser::defaultSetName() | method | Returns the display name for the default taxonomy set of a given type. | string Human-readable default set name. |
| Raven\Lib\Parser\SetParser::isValidSlug() | method | Returns whether a slug string meets the minimum slug format requirements. | bool True when the slug is non-empty and contains only lowercase alphanumerics and hyphens. |
| Raven\Lib\Parser\SetParser::listSetFilePaths() | method | Returns a sorted list of all set file paths in the store directory. | array<int, string> Absolute file paths sorted by set id ascending. |
| Raven\Lib\Parser\SetParser::loadRawById() | method | Loads the raw data array for a set by its id, or an empty array if not found. | array<string, mixed> Raw record data, or [] when the record does not exist. |
| Raven\Lib\Parser\SetParser::loadRawByPath() | method | Loads the raw PHP-array payload from a set file at the given path. | array<string, mixed> Deserialized record data, or [] on missing/invalid file. |
| Raven\Lib\Parser\SetParser::loadRawBySlug() | method | Loads the raw data array for a set by its slug, or an empty array if not found. | array<string, mixed> Raw record data, or [] when the record does not exist. |
| Raven\Lib\Parser\SetParser::loadRecordFromPath() | method | Loads a set record from a file path, returning the id and raw data as a pair. | array{id: int, raw: array<string, mixed>}\|null Record pair, or null if the file is missing or unrecognizable. |
| Raven\Lib\Parser\SetParser::nextAvailableId() | method | Returns the next available set id (one above the current maximum). | int Next id that does not yet correspond to any stored set file. |
| Raven\Lib\Parser\SetParser::normalizeSelection() | method | Normalizes a mixed set-selection value into a sorted array of integer set ids. | array<int, int\|string> Sorted array of set ids, or [ALLSETID] for an all-sets selection. |
| Raven\Lib\Parser\SetParser::normalizeSetId() | method | Normalizes a raw set id value to an integer or null. | int\|null Validated set id, or null if the value is absent/invalid. |
| Raven\Lib\Parser\SetParser::normalizeSlug() | method | Normalizes a raw slug string to lowercase-alphanumeric-hyphen form. | string Cleaned slug, max 160 characters; empty string if input collapses to nothing. |
| Raven\Lib\Parser\SetParser::pathForRecord() | method | Returns the canonical file path for a record given its id and slug. | string Absolute path where this set's PHP file should live. |
| Raven\Lib\Parser\SetParser::selectionIncludesAll() | method | Returns whether a set-selection array includes the all-sets sentinel. | bool True when the selection covers all sets. |
| Raven\Lib\Parser\SetParser::string() | method | (No summary.) | (No @return.) |
| Raven\Lib\Parser\UserContactParser::decode() | method | Decodes a raw JSON contact-profiles column value into a typed array. | array<int, array{type: string, value: string}> |
| Raven\Lib\Parser\UserContactParser::encode() | method | Encodes a normalized contact-profiles array to a JSON string for persistence. | string\|null JSON string, or null when profiles is empty. |
| Raven\Lib\Parser\UserContactParser::int() | method | (No summary.) | (No @return.) |
| Raven\Lib\Parser\UserContactParser::normalize() | method | Normalizes and deduplicates a raw contact-profiles array. | array<int, array{type: string, value: string}> |
| Raven\Lib\Parser\UserProfileParser::__construct() | method | Prepares the profile-contact parser for option normalization and profile decoration. | void |
| Raven\Lib\Parser\UserProfileParser::decorateProfileContacts() | method | Decorates a profile row with normalized, href-resolved contact entries. | array<string, mixed> Profile row with a normalized 'contact' key. |
| Raven\Lib\Parser\UserProfileParser::defaultOptions() | method | Returns the built-in contact option definitions. | array<string, array{label: string, prefix: string}> Keyed by option slug. |
| Raven\Lib\Parser\UserProfileParser::normalizeOptionsConfig() | method | Normalizes a raw contact options config array against the built-in defaults. | array<string, array{label: string, prefix: string}> Normalized option definitions. |
| Raven\Lib\Parser\UserProfileParser::normalizeSubmittedOptions() | method | Normalizes a submitted contact options array from a panel form. | array<string, array{label: string, prefix: string}> Normalized option definitions. |
| Raven\Lib\Parser\UserProfileParser::normalizeSubmittedProfiles() | method | Normalizes a submitted profile contact rows array from a panel form. | array<int, array{type: string, value: string}> Normalized contact rows. |
| Raven\Lib\Parser\UserProfileParser::normalizeTypeSlug() | method | Normalizes a raw contact type slug, mapping legacy aliases to canonical slugs. | string Normalized slug, or '' when invalid. |
| Raven\Lib\Parser\UserProfileParser::requiredOptions() | method | Returns only the contact options that are always required (email, phone, homepage, x). | array<string, array{label: string, prefix: string}> Required option definitions. |
| Raven\Lib\Parser\UserProfileParser::resolveProfileContactHref() | method | Resolves a contact field value to an absolute href using the option's URL prefix. | string\|null Resolved absolute href, or null when not resolvable. |
| Raven\Lib\Parser\UserProfileParser::twitterCreatorFromProfiles() | method | Extracts an X/Twitter @handle from a profile contact entry for use in meta tags. | string '@handle' string, or '' when none found. |
Parameter Details
Raven\Lib\Parser\ChannelParser::resolveChannelIdBySlug()
- File:
private/lib/Parser/ChannelParser.php - Params:
string|null $slug Raw slug to resolve; empty/null returns null without error.callable $idBySlugResolver Callback accepting a normalized slug string and returning int|null.string $missingMessage Exception message when the slug is non-empty but resolves to nothing.
Raven\Lib\Parser\FeedParser::__construct()
- File:
private/lib/Parser/FeedParser.php - Params:
Config $config Runtime site configuration reader.InputSanitizer $input Shared input normalizer used for channel slug normalization.
Raven\Lib\Parser\FeedParser::feedChannels()
- File:
private/lib/Parser/FeedParser.php - Params:
(none)
Raven\Lib\Parser\FeedParser::feedItems()
- File:
private/lib/Parser/FeedParser.php - Params:
(none)
Raven\Lib\Parser\PageBlockParser::__construct()
- File:
private/lib/Parser/PageBlockParser.php - Params:
InputSanitizer|null $input Optional sanitizer used for extension fields and CSS token validation.
Raven\Lib\Parser\PageBlockParser::decodeStoredBlocks()
- File:
private/lib/Parser/PageBlockParser.php - Params:
string $raw Raw stored content value from the page record.
Raven\Lib\Parser\PageBlockParser::defaultDefinitions()
- File:
private/lib/Parser/PageBlockParser.php - Params:
(none)
Raven\Lib\Parser\PageBlockParser::editorMode()
- File:
private/lib/Parser/PageBlockParser.php - Params:
string $type Normalized block type.array<string, array{label: string, editor: string}> $definitions Known block definitions keyed by type slug.
Raven\Lib\Parser\PageBlockParser::encodeStoredBlocks()
- File:
private/lib/Parser/PageBlockParser.php - Params:
array<int, array{type: string, content: string, css_id: string, css_class: string}> $blocks Normalized block rows.
Raven\Lib\Parser\PageBlockParser::hasGalleryBlock()
- File:
private/lib/Parser/PageBlockParser.php - Params:
array<int, array{type: string, content: string, css_id: string, css_class: string}> $blocks Normalized block rows.callable(string): string $editorModeResolver Callback that resolves a block type into its editor mode.
Raven\Lib\Parser\PageBlockParser::normalizeCssClassList()
- File:
private/lib/Parser/PageBlockParser.php - Params:
mixed $value Raw CSS class input from storage or the editor.
Raven\Lib\Parser\PageBlockParser::normalizeCssId()
- File:
private/lib/Parser/PageBlockParser.php - Params:
mixed $value Raw CSS id input from storage or the editor.
Raven\Lib\Parser\PageBlockParser::normalizeExtensionDefinitions()
- File:
private/lib/Parser/PageBlockParser.php - Params:
string $extensionName Extension slug contributing custom block fields.array<int, mixed> $fields Raw extension field definitions.array<string, array{label: string, editor: string}> $existing Existing definition map to append to.
Raven\Lib\Parser\PageBlockParser::normalizePersistedType()
- File:
private/lib/Parser/PageBlockParser.php - Params:
string $value Raw stored block type.
Raven\Lib\Parser\PageBlockParser::normalizeStoredBlocks()
- File:
private/lib/Parser/PageBlockParser.php - Params:
mixed $raw Raw array payload from repository/controller code.
Raven\Lib\Parser\PageBlockParser::normalizeType()
- File:
private/lib/Parser/PageBlockParser.php - Params:
string $value Raw block type value.array<string, array{label: string, editor: string}> $definitions Known block definitions keyed by type slug.
Raven\Lib\Parser\PanelParser::fromConfig()
- File:
private/lib/Parser/PanelParser.php - Params:
Config $config Runtime site configuration.string $suffix Optional path suffix to append after the panel prefix (leading slash optional).
Raven\Lib\Parser\PanelParser::fromRaw()
- File:
private/lib/Parser/PanelParser.php - Params:
mixed $panelPath Raw panel path value from config or caller (cast to string).string $suffix Optional path suffix to append (leading slash optional).
Raven\Lib\Parser\RedirectParser::isAllowedHttpOrRootPath()
- File:
private/lib/Parser/RedirectParser.php - Params:
string $targetUrl Redirect target supplied by config, persistence, or request state.
Raven\Lib\Parser\SetParser::__construct()
- File:
private/lib/Parser/SetParser.php - Params:
string $setDirectory Absolute path to the directory containing set PHP files.string $taxonomyType Taxonomy type label (e.g. 'category', 'tag'); used when generating default-set names.
Raven\Lib\Parser\SetParser::defaultSetDescription()
- File:
private/lib/Parser/SetParser.php - Params:
string $taxonomyType Taxonomy type (e.g. 'tag' or 'category').
Raven\Lib\Parser\SetParser::defaultSetName()
- File:
private/lib/Parser/SetParser.php - Params:
string $taxonomyType Taxonomy type (e.g. 'tag' or 'category').
Raven\Lib\Parser\SetParser::isValidSlug()
- File:
private/lib/Parser/SetParser.php - Params:
string $value Slug to test.
Raven\Lib\Parser\SetParser::listSetFilePaths()
- File:
private/lib/Parser/SetParser.php - Params:
(none)
Raven\Lib\Parser\SetParser::loadRawById()
- File:
private/lib/Parser/SetParser.php - Params:
int $id Set id to look up.
Raven\Lib\Parser\SetParser::loadRawByPath()
- File:
private/lib/Parser/SetParser.php - Params:
string $path Absolute path to the set PHP file.
Raven\Lib\Parser\SetParser::loadRawBySlug()
- File:
private/lib/Parser/SetParser.php - Params:
string $slug Set slug to look up.
Raven\Lib\Parser\SetParser::loadRecordFromPath()
- File:
private/lib/Parser/SetParser.php - Params:
string $path Absolute path to the set PHP file.
Raven\Lib\Parser\SetParser::nextAvailableId()
- File:
private/lib/Parser/SetParser.php - Params:
(none)
Raven\Lib\Parser\SetParser::normalizeSelection()
- File:
private/lib/Parser/SetParser.php - Params:
mixed $value Raw selection; accepts an array, scalar, or null.bool $defaultAll When true and the effective selection is empty, returns [ALL_SET_ID] instead of [].
Raven\Lib\Parser\SetParser::normalizeSetId()
- File:
private/lib/Parser/SetParser.php - Params:
mixed $value Raw value to parse; accepts any scalar or null.bool $allowAll When true, the ALL_SET_ID sentinel (0) is returned as-is instead of being rejected.
Raven\Lib\Parser\SetParser::normalizeSlug()
- File:
private/lib/Parser/SetParser.php - Params:
string $value Raw slug string.
Raven\Lib\Parser\SetParser::pathForRecord()
- File:
private/lib/Parser/SetParser.php - Params:
int $id Set id.string $slug Set slug.
Raven\Lib\Parser\SetParser::selectionIncludesAll()
- File:
private/lib/Parser/SetParser.php - Params:
array<int, int|string> $selection Selection array as returned by normalizeSelection().
Raven\Lib\Parser\SetParser::string()
- File:
private/lib/Parser/SetParser.php - Params:
(none)
Raven\Lib\Parser\UserContactParser::decode()
- File:
private/lib/Parser/UserContactParser.php - Params:
mixed $raw Raw column value from the database.
Raven\Lib\Parser\UserContactParser::encode()
- File:
private/lib/Parser/UserContactParser.php - Params:
array<int, array{type: string, value: string}> $profiles Normalized profiles array.
Raven\Lib\Parser\UserContactParser::int()
- File:
private/lib/Parser/UserContactParser.php - Params:
(none)
Raven\Lib\Parser\UserContactParser::normalize()
- File:
private/lib/Parser/UserContactParser.php - Params:
array<int, mixed> $profiles Raw profile entries from form input or DB decode.
Raven\Lib\Parser\UserProfileParser::__construct()
- File:
private/lib/Parser/UserProfileParser.php - Params:
InputSanitizer $input Shared input sanitizer for contact value and slug normalization.
Raven\Lib\Parser\UserProfileParser::decorateProfileContacts()
- File:
private/lib/Parser/UserProfileParser.php - Params:
array<string, mixed> $profile Profile row to decorate.array<string, array{label: string, prefix: string}> $options Contact option definitions used to build hrefs.
Raven\Lib\Parser\UserProfileParser::defaultOptions()
- File:
private/lib/Parser/UserProfileParser.php - Params:
(none)
Raven\Lib\Parser\UserProfileParser::normalizeOptionsConfig()
- File:
private/lib/Parser/UserProfileParser.php - Params:
mixed $raw Raw value from site config.
Raven\Lib\Parser\UserProfileParser::normalizeSubmittedOptions()
- File:
private/lib/Parser/UserProfileParser.php - Params:
mixed $rawOptions Raw submitted value from the contact options panel form.
Raven\Lib\Parser\UserProfileParser::normalizeSubmittedProfiles()
- File:
private/lib/Parser/UserProfileParser.php - Params:
mixed $rawProfiles Raw submitted value from the profile contact rows form.array<string, array{label: string, prefix: string}> $allowedOptions Allowed option definitions used to validate contact types.
Raven\Lib\Parser\UserProfileParser::normalizeTypeSlug()
- File:
private/lib/Parser/UserProfileParser.php - Params:
string $type Raw contact type string.
Raven\Lib\Parser\UserProfileParser::requiredOptions()
- File:
private/lib/Parser/UserProfileParser.php - Params:
(none)
Raven\Lib\Parser\UserProfileParser::resolveProfileContactHref()
- File:
private/lib/Parser/UserProfileParser.php - Params:
string $value Raw contact field value (e.g. a username, email, or URL).string $urlPrefix Option URL prefix (e.g. 'https://x.com/').
Raven\Lib\Parser\UserProfileParser::twitterCreatorFromProfiles()
- File:
private/lib/Parser/UserProfileParser.php - Params:
array<int, array<string, mixed>> $profiles Profile contact rows.array<string, array{label: string, prefix: string}> $contactOptions Contact option definitions.