Grav API

Table of contents


Class: \Grav\Common\Taxonomy

The Taxonomy object is a singleton that holds a reference to a 'taxonomy map'. This map is constructed as a multidimensional array. uses the taxonomy defined in the site.yaml file and is built when the page objects are recursed. Basically every time a page is found that has taxonomy references, an entry to the page is stored in the taxonomy map. The map has the following format: [taxonomy_type][taxonomy_value][page_path] For example: [category][blog][path/to/item1] [tag][grav][path/to/item1] [tag][grav][path/to/item2] [tag][dog][path/to/item3]

Visibility Function
public __construct(\Grav\Common\Grav $grav) : void
Constructor that resets the map
public addTaxonomy(\Grav\Common\Page\Page $page, array $page_taxonomy=null) : void
Takes an individual page and processes the taxonomies configured in its header. It then adds those taxonomies to the map
public findTaxonomy(array $taxonomies, string $operator='and') : Collection Collection object set to contain matches found in the taxonomy map
Returns a new Page object with the sub-pages containing all the values set for a particular taxonomy.
public getTaxonomyItemKeys(string $taxonomy) : array keys of this taxonomy
Gets item keys per taxonomy
public taxonomy(array $var=null) : array the taxonomy map
Gets and Sets the taxonomy map


Class: \Grav\Common\Themes

Visibility Function
public __construct(\Grav\Common\Grav $grav) : void
Themes constructor.
public all() : array
Return list of all theme data with their blueprints.
public configure() : void
Configure and prepare streams for current template.
public current() : string
Return name of the current theme.
public get(string $name) : \Grav\Common\Data\Data
Get theme configuration or throw exception if it cannot be found.
public init() : void
public initTheme() : void
public load() : \Grav\Common\Theme
Load current theme.
protected autoloadTheme(string $class) : mixed false FALSE if unable to load $class; Class name if $class is successfully loaded
Autoload theme classes for inheritance
protected loadConfiguration(string $name, \Grav\Common\Config\Config $config) : mixed
Load theme configuration.
protected loadLanguages(\Grav\Common\Config\Config $config) : mixed
Load theme languages.

This class extends \Grav\Common\Iterator

This class implements \Serializable, \Countable, \Traversable, \Iterator, \ArrayAccess


Class: \Grav\Common\Cache

The GravCache object is used throughout Grav to store and retrieve cached data. It uses DoctrineCache library and supports a variety of caching mechanisms. Those include: APCu APC XCache RedisCache MemCache MemCacheD FileSystem

Visibility Function
public __construct(\Grav\Common\Grav $grav) : void
Constructor
public static clearCache(string $remove='standard') : array
Helper method to clear all Grav caches
public contains(string $id) : bool true if the cached items exists
Returns a boolean state of whether or not the item exists in the cache based on id key
public delete(string $id) : bool true if the item was deleted successfully
Deletes an item in the cache based on the id
public fetch(string $id) : object/bool returns the cached entry, can be any type, or false if doesn't exist
Gets a cached entry if it exists based on an id. If it does not exist, it returns false
public getCacheDriver() : DoctrineCache\CacheProvider The cache driver to use
Automatically picks the cache mechanism to use. If you pick one manually it will use that If there is no config option for $driver in the config, or it's set to 'auto', it will pick the best option based on which cache extensions are installed.
public getCacheStatus() : string
Get cache state
public getDriverName() : mixed
Returns the current driver name
public getDriverSetting() : mixed
Returns the current driver setting
public getEnabled() : bool
Returns the current enabled state
public getKey() : mixed
Getter method to get the cache key
public getLifetime() : mixed
Retrieve the cache lifetime (in seconds)
public init(\Grav\Common\Grav $grav) : void
Initialization that sets a base key and the driver based on configuration settings
public isVolatileDriver(mixed $setting) : bool
is this driver a volatile driver in that it resides in PHP process memory
public save(string $id, array/object $data, int $lifetime=null) : void
Stores a new cached entry.
public setEnabled(mixed $enabled) : void
Public accessor to set the enabled state of the cache
public setKey(mixed $key) : void
Setter method to set key (Advanced)
public setLifetime(int $future) : void
Set the cache lifetime programmatically

This class extends \Grav\Common\Getters

This class implements \Countable, \ArrayAccess


Class: \Grav\Common\Session

Visibility Function
public __get(string $name) : mixed
Returns session variable.
public __isset(string $name) : bool
Checks if session variable is defined.
public __set(string $name, mixed $value) : void
Sets session variable.
public __unset(string $name) : void
Removes session variable.
public all() : array Attributes
DEPRECATED - 1.5 Use getAll() method instead
public clear() : \Grav\Framework\Session\$this
Free all session variables.
public close() : \Grav\Framework\Session\$this
Force the session to be saved and closed
public getAll() : array
Returns all session variables.
public getFlashCookieObject(string $name) : mixed/null
Return object and remove it from the cookie.
public getFlashObject(string $name) : mixed
Return object and remove it from session.
public getId() : string/null Session ID
Get session ID
public static getInstance() : \Grav\Framework\Session\Session
Get current session instance.
public getIterator() : \ArrayIterator Return an ArrayIterator of $_SESSION
Retrieve an external iterator
public getName() : string/null
Get session name
public init() : void
Initialize session. Code in this function has been moved into SessionServiceProvider class.
public static instance() : \Grav\Framework\Session\Session
DEPRECATED - 1.5 Use getInstance() method instead
public invalidate() : \Grav\Framework\Session\$this
Invalidates the current session.
public isStarted() : Boolean
Checks if the session was started.
public setAutoStart(bool $auto) : \Grav\Common\$this
public setFlashCookieObject(string $name, mixed $object, int $time=60) : \Grav\Common\$this
Store something in cookie temporarily.
public setFlashObject(string $name, mixed $object) : \Grav\Common\$this
Store something in session temporarily.
public setId(string $id) : \Grav\Framework\Session\$this
Set session ID
public setName(string $name) : \Grav\Framework\Session\$this
Set session name
public setOptions(array $options) : void
Sets session.* ini variables.
public start(bool $readonly=false) : \Grav\Framework\Session\$this
Starts the session storage
public started() : Boolean
DEPRECATED - 1.5 Use isStarted() method instead

This class extends \Grav\Framework\Session\Session

This class implements \IteratorAggregate, \Traversable, \Grav\Framework\Session\SessionInterface


Class: \Grav\Common\Plugin

Visibility Function
public __construct(string $name, \Grav\Common\Grav $grav, \Grav\Common\Config\Config $config=null) : void
Constructor.
public config() : array
Get configuration of the plugin.
public getBlueprint() : mixed
Simpler getter for the plugin blueprint
public static getSubscribedEvents() : array
By default assign all methods as listeners using the default priority.
public isAdmin() : bool
Determine if this is running under the admin
public offsetExists(mixed $offset) : bool Returns TRUE on success or FALSE on failure.
Whether or not an offset exists.
public offsetGet(mixed $offset) : mixed Can return all value types.
Returns the value at specified offset.
public offsetSet(mixed $offset, mixed $value) : void
Assigns a value to the specified offset.
public offsetUnset(mixed $offset) : void
Unsets an offset.
public static saveConfig(string $plugin_name) : true
Persists to disk the plugin parameters currently stored in the Grav Config object
public setConfig(\Grav\Common\Config\Config $config) : \Grav\Common\$this
protected disable(array $events) : void
protected enable(array $events) : void
protected isPluginActiveAdmin(mixed $plugin_route) : bool
Determine if this route is in Admin and active for the plugin
protected loadBlueprint() : mixed
Load blueprints.
protected mergeConfig(\Grav\Common\Page\Page $page, bool/mixed $deep=false, array $params=array(), string $type='plugins') : \Grav\Common\Data\Data
Merge global and page configurations. plugin settings. merge with the plugin settings.
protected parseLinks(string $content, callable $function, string $internal_regex='(.*)') : string
This function will search a string for markdown links in a specific format. The link value can be optionally compared against via the $internal_regex and operated on by the callback $function provided. format: plugin:myplugin_name

This class implements \RocketTheme\Toolbox\Event\EventSubscriberInterface, \Symfony\Component\EventDispatcher\EventSubscriberInterface, \ArrayAccess


Class: \Grav\Common\Theme

Visibility Function
public __construct(\Grav\Common\Grav $grav, \Grav\Common\Config\Config $config, string $name) : void
Constructor.
public config() : \Grav\Common\Config\Config
Get configuration of the plugin.
public getBlueprint() : mixed
Simpler getter for the theme blueprint
public static saveConfig(string $theme_name) : true
Persists to disk the theme parameters currently stored in the Grav Config object
protected loadBlueprint() : mixed
Load blueprints.
protected mergeConfig(\Grav\Common\Page\Page $page, string $deep='merge', array $params=array(), string $type='themes') : void
Override the mergeConfig method to work for themes

This class extends \Grav\Common\Plugin

This class implements \ArrayAccess, \Symfony\Component\EventDispatcher\EventSubscriberInterface, \RocketTheme\Toolbox\Event\EventSubscriberInterface


Class: \Grav\Common\Plugins

Visibility Function
public __construct() : void
public add(mixed $plugin) : void
Add a plugin
public static all() : array
Return list of all plugin data with their blueprints.
public static get(string $name) : \Grav\Common\Data/null
Get a plugin by name
public init() : array/Plugin[] array of Plugin objects
Registers all plugins.
public setup() : \Grav\Common\$this
protected loadPlugin(mixed $name) : mixed

This class extends \Grav\Common\Iterator

This class implements \Serializable, \Countable, \Traversable, \Iterator, \ArrayAccess


Class: \Grav\Common\Debugger

Visibility Function
public __construct() : void
Debugger constructor.
public addAssets() : \Grav\Common\$this
Add the debugger assets to the Grav Assets
public addCollector(mixed $collector) : \Grav\Common\$this
Adds a data collector
public addException(\Exception $e) : \Grav\Common\Debugger
Dump exception into the Messages tab of the Debug Bar
public addMessage(mixed $message, string $label='info', bool $isString=true) : \Grav\Common\$this
Dump variables into the Messages tab of the Debug Bar
public deprecatedErrorHandler(int $errno, string $errstr, string $errfile, int $errline) : bool
public enabled(bool $state=null) : null
Set/get the enabled state of the debugger
public getCaller(mixed $limit=2) : mixed
public getCollector(mixed $collector) : \DebugBar\DataCollector\DataCollectorInterface
Returns a data collector
public getData() : array
Returns collected debugger data.
public init() : \Grav\Common\$this
Initialize the debugger
public render() : \Grav\Common\$this
Displays the debug bar
public sendDataInHeaders() : \Grav\Common\$this
Sends the data through the HTTP headers
public setErrorHandler() : void
public startTimer(mixed $name, string/null $description=null) : \Grav\Common\$this
Start a timer with an associated name and description
public stopTimer(string $name) : \Grav\Common\$this
Stop the named timer
protected addDeprecations() : void
protected getDepracatedMessage(mixed $deprecated) : mixed
protected getFunction(mixed $trace) : mixed


Class: \Grav\Common\Composer

Visibility Function
public static getComposerExecutor() : string
Return the composer executable file path
public static getComposerLocation() : string
Returns the location of composer.


Class: \Grav\Common\Uri

Visibility Function
public __construct(string/array $env=null) : void
Uri constructor.
public __toString() : void
public static addNonce(string $url, string $action, string $nonceParamName='nonce') : string the url with the nonce
Adds the nonce to a URL for a specific action
public base() : String The base of the URI
Return the base of the URI
public baseIncludingLanguage() : String The base of the URI
Return the base relative URL including the language prefix or the base relative url if multi-language is not enabled
public basename() : String The basename of the URI
Return the basename of the URI
public static buildParams(array $params) : string
public static buildUrl(array $parsed_url) : string
The opposite of built-in PHP method parse_url()
public static cleanPath(mixed $path) : mixed/string
Removes extra double slashes and fixes back-slashes
public static convertUrl(\Grav\Common\Page\Page $page, string/array $url, string $type='link', bool $absolute=false, bool $route_only=false) : string the more friendly formatted url
Converts links from absolute '/' or relative (../..) to a Grav friendly format
public static convertUrlOld(\Grav\Common\Page\Page $page, string $markdown_url, string $type='link', null $relative=null) : string the more friendly formatted url
Converts links from absolute '/' or relative (../..) to a Grav friendly format
public currentPage() : int
Return current page number.
public environment() : String
Gets the environment name
public extension(string/null $default=null) : string The extension of the URI
Return the Extension of the URI
public static extractParams(mixed $uri, mixed $delimiter) : void
public static filterPath(string $path) : string The RFC 3986 percent-encoded uri path.
Filter Uri path. This method percent-encodes all reserved characters in the provided path string. This method will NOT double-encode characters that are already percent-encoded.
public static filterQuery(string $query) : string The percent-encoded query string.
Filters the query string or fragment of a URI.
public static filterUserInfo(string $info) : string The percent-encoded user or password string.
Filters the user info string.
public fragment(string $fragment=null) : string/null
Gets the Fragment portion of a URI (eg #target)
public static getCurrentRoute() : \Grav\Framework\Route\Route
Returns current route.
public static getCurrentUri() : \Grav\Framework\Uri\Uri
Returns current Uri.
public host() : string/null The host of the URI
Return the host of the URI
public init() : void
Initializes the URI object based on the url set on the object
public initializeWithUrl(string $url='') : \Grav\Common\$this
Initialize the URI class with a url passed via parameter. Used for testing purposes.
public initializeWithUrlAndRootPath(string $url, string $root_path) : \Grav\Common\$this
Initialize the URI class by providing url and root_path arguments
public static ip() : string ip address
Return the IP address of the current user
public static isExternal(string $url) : boolean is eternal state
Is this an external URL? if it starts with http then yes, else false
public static isValidUrl(mixed $url) : bool
Is the passed in URL a valid URL?
public method() : void
public param(string $id) : bool/string
Get URI parameter.
public params(string $id=null, bool/boolean $array=false) : null/string/array
Return all or a single query parameter as a URI compatible string.
public static paramsRegex() : string
Calculate the parameter regex based on the param_sep setting
public static parseUrl(mixed $url) : void
public password() : string/null
Return password
public path() : String The path of the URI
Return the Path
public paths(string $id=null) : string/string[]
Return URI path.
public port(bool $raw=false) : int/null
Return the port number if it can be figured out
public post(string $element=null, string $filter_type=null) : array/mixed/null
Get's post from either $_POST or JSON response object By default returns all data, or can return a single item
public query(string $id=null, bool $raw=false) : string/array Returns an array if $id = null and $raw = true
Return full query string or a single query attribute.
public referrer(string $default=null, string $attributes=null) : string
Return relative path to the referrer defaulting to current or given page.
public rootUrl(bool $include_host=false) : mixed
Return root URL to the site.
public route(bool $absolute=false, bool $domain=false) : string
Return route to the current URI. By default route doesn't include base path.
public scheme(bool $raw=false) : string The scheme of the URI
Return the scheme of the URI
public toArray() : void
public uri(bool $include_root=true) : mixed
Return the full uri
public url(bool $include_host=false) : string
Return URL.
public user() : string/null
Return user
public validateHostname(string $hostname) : boolean
Validate a hostname
protected createFromEnvironment(array $env) : mixed
protected createFromString(string $url) : mixed
protected hasStandardPort() : bool
Does this Uri use a standard port?
protected reset() : void


Class: \Grav\Common\Yaml (abstract)

Visibility Function
public static dump(mixed $data, mixed $inline=null, mixed $indent=null) : void
public static parse(mixed $data) : void


Class: \Grav\Common\Utils (abstract)

Visibility Function
public static arrayFilterRecursive(array $source, callable $fn) : array
Recursively filter an array, filtering values by processing them through the $fn function argument
public static arrayFlatten(array $array) : array
Flatten an array
public static arrayMergeRecursiveUnique(mixed $array1, mixed $array2) : mixed
Recursive Merge with uniqueness
public static checkFilename(string $filename) : bool
Returns true if filename is considered safe.
public static contains(string $haystack, string/string[] $needle) : bool
Check if the $haystack string contains the substring $needle
public static date2timestamp(string $date, string $format=null) : int the timestamp
Get the timestamp of a date strtotime argument
public static dateFormats() : array
Return the Grav date formats allowed
public static download(string $file, bool $force_download=true, int $sec, int $bytes=1024) : void
Provides the ability to download a file to the browser
public static endsWith(string $haystack, string/string[] $needle) : bool
Check if the $haystack string ends with the substring $needle
public static generateRandomString(int $length=5) : string
Generate a random string of a given length
public static getDotNotation(mixed $array, mixed $key, null $default=null) : mixed
Get a portion of an array (passed by reference) with dot-notation key
public static getExtensionByMime(string $mime, string $default='html') : string
Return the mimetype based on filename extension
public static getMimeByExtension(string $extension, string $default='application/octet-stream') : string
Return the mimetype based on filename extension
public static getMimeByFilename(string $filename, string $default='application/octet-stream') : string
Return the mimetype based on filename
public static getMimeByLocalFile(string $filename, string $default='application/octet-stream') : string/bool
Return the mimetype based on existing local file
public static getNonce(string $action, bool $previousTick=false) : string the nonce
Creates a hashed nonce tied to the passed action. Tied to the current user and time. The nonce for a given action is the same for 12 hours.
public static getPagePathFromToken(mixed $path, \Grav\Common\Page/null $page=null) : string
Get's path based on a token
public static getUploadLimit() : mixed
public static isAdminPlugin() : bool
Simple helper method to get whether or not the admin plugin is active
public static isApache() : bool
Utility to determine if the server running PHP is Apache
public static isFunctionDisabled(string $function) : bool
Check whether a function is disabled in the PHP settings
public static isPositive(string $value) : boolean
Checks if a value is positive
public static isWindows() : bool
Utility method to determine if the current OS is Windows
public static mergeObjects(object $obj1, object $obj2) : object
Merge two objects into one.
public static multibyteParseUrl(mixed $url) : mixed
Multibyte-safe Parse URL function
public static normalizePath(string $path) : string
Normalize path by processing relative . and .. syntax and merging path
public static parseSize(mixed $size) : int
Parse a readable file size and return a value in bytes
public static pathPrefixedByLangCode(string $string) : bool
Checks if the passed path contains the language code prefix
public static replaceFirstOccurrence(mixed $search, mixed $replace, mixed $subject) : mixed
Utility method to replace only the first occurrence in a string
public static replaceLastOccurrence(mixed $search, mixed $replace, mixed $subject) : mixed
Utility method to replace only the last occurrence in a string
public static resolve(array $array, string $path, null $default=null) : mixed
DEPRECATED - Use getDotNotation() method instead
public static safeTruncate(string $string, int $limit=150) : string
Truncate text by number of characters in a "word-safe" manor.
public static safeTruncateHtml(string $text, int $length=25, string $ellipsis='...') : string
Truncate HTML by number of characters in a "word-safe" manor.
public static setDotNotation(mixed $array, mixed $key, mixed $value, bool $merge=false) : mixed
Set portion of array (passed by reference) for a dot-notation key and set the value
public static sortArrayByArray(array $array, array $orderArray) : array
Sort a multidimensional array by another array of ordered keys
public static sortArrayByKey(mixed $array, mixed $array_key, int $direction=3, int $sort_flags) : array
Sort an array by a key value in the array
public static startsWith(string $haystack, string/string[] $needle) : bool
Check if the $haystack string starts with the substring $needle
public static substrToString(mixed $haystack, mixed $needle) : string
Returns the substring of a string up to a specified needle. if not found, return the whole haystack
public static timezones() : array
Get the formatted timezones list
public static truncate(string $string, int $limit=150, bool $up_to_break=false, string $break=' ', string $pad='…') : string
Truncate text by number of characters but can cut off words.
public static truncateHtml(string $text, int $length=100, string $ellipsis='...') : string
Truncate HTML by number of characters. not "word-safe"!
public static url(mixed $input, bool $domain=false) : bool/null/string
Simple helper method to make getting a Grav URL easier
public static verifyNonce(string/string[] $nonce, string $action) : boolean verified or not
Verify the passed nonce for the give action


Class: \Grav\Common\Grav

Visibility Function
public __call(mixed $method, mixed $args) : void
Magic Catch All Function Used to call closures like measureTime on the instance. Source: http://stackoverflow.com/questions/419804/closures-as-class-members
public fallbackUrl(mixed $path) : void
This attempts to find media, other files, and download them
public fireEvent(string $eventName, \RocketTheme\Toolbox\Event\Event $event=null) : \RocketTheme\Toolbox\Event\Event
Fires an event with optional parameters.
public header() : void
Set response header.
public static instance(array $values=array()) : \Grav\Common\Grav
Return the Grav instance. Create it if it's not already instanced
public process() : void
Process a request
public redirect(string $route, int $code=null) : void
Redirect browser to another location.
public redirectLangSafe(string $route, int $code=null) : void
Redirect browser to another location taking language into account (preferred)
public static resetInstance() : void
Reset the Grav instance.
public setLocale() : void
Set the system locale based on the language and configuration
public shutdown() : void
Set the final content length for the page and flush the buffer
protected static load(array $values) : \Grav\Common\static
Initialize and return a Grav instance
protected registerService(string $serviceKey, string $serviceClass) : void
Register a service with the container.
protected registerServiceProvider(string $serviceClass) : void
Register a service provider with the container.
protected registerServices() : void
Register all services Services are defined in the diMap. They can either only the class of a Service Provider or a pair of serviceKey => serviceClass that gets directly mapped into the container.

This class extends \RocketTheme\Toolbox\DI\Container

This class implements \ArrayAccess


Class: \Grav\Common\Browser

Internally uses the PhpUserAgent package https://github.com/donatj/PhpUserAgent

Visibility Function
public __construct() : void
Browser constructor.
public getBrowser() : string the lowercase browser name
Get the current browser identifier Currently detected browsers: Android Browser BlackBerry Browser Camino Kindle / Silk Firefox / Iceweasel Safari Internet Explorer IEMobile Chrome Opera Midori Vivaldi TizenBrowser Lynx Wget Curl
public getLongVersion() : string the browser full version identifier
Get the current full version identifier
public getPlatform() : string the lowercase platform name
Get the current platform identifier Currently detected platforms: Desktop -> Windows -> Linux -> Macintosh -> Chrome OS Mobile -> Android -> iPhone -> iPad / iPod Touch -> Windows Phone OS -> Kindle -> Kindle Fire -> BlackBerry -> Playbook -> Tizen Console -> Nintendo 3DS -> New Nintendo 3DS -> Nintendo Wii -> Nintendo WiiU -> PlayStation 3 -> PlayStation 4 -> PlayStation Vita -> Xbox 360 -> Xbox One
public getVersion() : string the browser major version identifier
Get the current major version identifier
public isHuman() : bool
Determine if the request comes from a human, or from a bot/crawler


Class: \Grav\Common\Security

Visibility Function
public static detectXss(string $string) : boolean/string Type of XSS vector if the given $string may contain XSS, false otherwise. Copies the code from: https://github.com/symphonycms/xssfilter/blob/master/extension.driver.php#L138
Determine if string potentially has a XSS attack. This simple function does not catch all XSS and it is likely to return false positives because of it tags all potentially dangerous HTML tags and attributes without looking into their content.
public static detectXssFromArray(array $array, string $prefix='') : array Returns flatten list of potentially dangerous input values, such as 'data.content'.
public static detectXssFromPages(mixed $pages, \callable $status=null) : void


Class: \Grav\Common\Inflector

This file was originally part of the Akelos Framework

Visibility Function
public camelize(string $word) : string UpperCamelCasedWord
Returns given word as CamelCased Converts a word like "send_email" to "SendEmail". It will remove non alphanumeric character from the word, so "who's online" will be converted to "WhoSOnline"
public classify(string $table_name) : string SingularClassName
Converts a table name to its class name according to rails naming conventions. Converts "people" to "Person"
public humanize(string $word, string $uppercase='') : string Human-readable word
Returns a human-readable string from $word Returns a human-readable string from $word, by replacing underscores with a space, and by upper-casing the initial character by default. If you need to uppercase all the words you just have to pass 'all' as a second parameter. instead of just the first one.
public hyphenize(string $word) : string hyphenized word
Converts a word "into-it-s-hyphenated-version" Convert any "CamelCased" or "ordinary Word" into an "hyphenated-word". This can be really useful for creating friendly URLs.
public init() : void
public monthize(int $days) : int
Converts a number of days to a number of months
public ordinalize(integer $number) : string Ordinal representation of given string.
Converts number to its ordinal English form. This method converts 13 to 13th, 2 to 2nd ...
public pluralize(string $word, int $count=2) : string Plural noun
Pluralizes English nouns.
public singularize(string $word, int $count=1) : string Singular noun.
Singularizes English nouns.
public tableize(string $class_name) : string plural_table_name
Converts a class name to its table name according to rails naming conventions. Converts "Person" to "people"
public titleize(string $word, string $uppercase='') : string Text formatted as title
Converts an underscored or CamelCase word into a English sentence. The titleize public function converts text like "WelcomePage", "welcome_page" or "welcome page" to this "Welcome Page". If second parameter is set to 'first' it will only capitalize the first character of the title. first character. Otherwise it will uppercase all the words in the title.
public underscorize(string $word) : string Underscored word
Converts a word "into_it_s_underscored_version" Convert any "CamelCased" or "ordinary Word" into an "underscored_word". This can be really useful for creating friendly URLs.
public variablize(string $word) : string Returns a lowerCamelCasedWord
Same as camelize but first char is underscored Converts a word like "send_email" to "sendEmail". It will remove non alphanumeric character from the word, so "who's online" will be converted to "whoSOnline"


Class: \Grav\Common\Iterator

Visibility Function
public __call(string $key, mixed $args) : mixed
Convert function calls for the existing keys into their values.
public __clone() : void
Clone the iterator.
public __construct(array $items=array()) : void
Constructor to initialize array.
public __get(mixed $offset) : mixed Asset value
Magic getter method
public __isset(mixed $offset) : boolean True if the value is set
Magic method to determine if the attribute is set
public __set(mixed $offset, mixed $value) : void
Magic setter method
public __toString() : string
Convents iterator to a comma separated list.
public __unset(mixed $offset) : void
Magic method to unset the attribute
public append(array/\Grav\Common\Iterator $items) : \Grav\Common\$this
Append new elements to the list.
public count() : int
Implements Countable interface.
public current() : mixed Can return any type.
Returns the current element.
public filter(\callable $callback=null) : \Grav\Common\$this
Filter elements from the list filter status
public first() : mixed
Get the first item
public indexOf(mixed $needle) : string/bool Key if found, otherwise false.
public key() : mixed Returns scalar on success, or NULL on failure.
Returns the key of the current element.
public last() : mixed
Get the last item
public next() : void
Moves the current position to the next element.
public nth(int $key) : mixed/bool
Return nth item.
public offsetExists(mixed $offset) : bool Returns TRUE on success or FALSE on failure.
Whether or not an offset exists.
public offsetGet(mixed $offset) : mixed Can return all value types.
Returns the value at specified offset.
public offsetSet(mixed $offset, mixed $value) : void
Assigns a value to the specified offset.
public offsetUnset(mixed $offset) : void
Unsets an offset.
public prev() : mixed
Return previous item.
public random(int $num=1) : \Grav\Common\$this
Pick one or more random entries.
public remove(mixed $key) : void
Remove item from the list.
public reverse() : \Grav\Common\$this
Reverse the Iterator
public rewind() : void
Rewinds back to the first element of the Iterator.
public serialize() : string Returns the string representation of the object.
Returns string representation of the object.
public shuffle() : \Grav\Common\$this
Shuffle items.
public slice(int $offset, int $length=null) : \Grav\Common\$this
Slice the list.
public sort(\callable $callback=null, bool $desc=false) : \Grav\Common\$this/array
Sorts elements from the list and returns a copy of the list in the proper order
public toArray() : array
Convert object into an array.
public toJson() : string
Convert object into JSON string.
public toYaml(int $inline=3, int $indent=2) : string A YAML string representing the object.
Convert object into YAML string.
public unserialize(string $serialized) : void
Called during unserialization of the object.
public valid() : bool Returns TRUE on success or FALSE on failure.
This method is called after Iterator::rewind() and Iterator::next() to check if the current position is valid.

This class implements \ArrayAccess, \Iterator, \Traversable, \Countable, \Serializable


Class: \Grav\Common\Getters (abstract)

Visibility Function
public __get(mixed $offset) : mixed Medium value
Magic getter method
public __isset(mixed $offset) : boolean True if the value is set
Magic method to determine if the attribute is set
public __set(mixed $offset, mixed $value) : void
Magic setter method
public __unset(mixed $offset) : void
Magic method to unset the attribute
public count() : int
public offsetExists(mixed $offset) : bool
public offsetGet(mixed $offset) : mixed
public offsetSet(mixed $offset, mixed $value) : void
public offsetUnset(mixed $offset) : void
public toArray() : array
Returns an associative array of object properties.

This class implements \ArrayAccess, \Countable


Class: \Grav\Common\Assets

Visibility Function
public __construct(array $options=array()) : void
Assets constructor.
public __toString() : string
public add(mixed $asset, int $priority=null, bool $pipeline=true) : \Grav\Common\$this
Add an asset or a collection of assets. It automatically detects the asset type (JavaScript, CSS or collection). You may add more than one asset passing an array as argument.
public addAsyncJs(mixed $asset, int $priority=null, bool $pipeline=true, string $group=null) : \Grav\Common\Assets
DEPRECATED - Please use dynamic method with ['loading' => 'async']
public addCss(mixed $asset, int $priority=null, bool $pipeline=true, string $group=null, string $loading=null) : \Grav\Common\$this
Add a CSS asset. It checks for duplicates. You may add more than one asset passing an array as argument. The second argument may alternatively contain an array of options which take precedence over positional arguments.
public addDeferJs(mixed $asset, int $priority=null, bool $pipeline=true, string $group=null) : \Grav\Common\Assets
DEPRECATED - Please use dynamic method with ['loading' => 'defer']
public addDir(string $directory, string $pattern='/.\.(css|js)$/i') : \Grav\Common\$this
Add all assets matching $pattern within $directory.
public addDirCss(string $directory) : \Grav\Common\$this
Add all CSS assets within $directory
public addDirJs(string $directory) : \Grav\Common\$this
Add all JavaScript assets within $directory
public addInlineCss(mixed $asset, int $priority=null, null $group=null) : \Grav\Common\$this
Add an inline CSS asset. It checks for duplicates. For adding chunks of string-based inline CSS
public addInlineJs(mixed $asset, int $priority=null, string $group=null, null $attributes=null) : \Grav\Common\$this
Add an inline JS asset. It checks for duplicates. For adding chunks of string-based inline JS
public addJs(mixed $asset, int $priority=null, bool $pipeline=true, string $loading=null, string $group=null) : \Grav\Common\$this
Add a JavaScript asset. It checks for duplicates. You may add more than one asset passing an array as argument. The second argument may alternatively contain an array of options which take precedence over positional arguments.
public addTo(array $assembly, mixed $asset, int $priority=null, bool $pipeline=true, string $loading=null, string $group=null) : \Grav\Common\$this
Add an asset to its assembly. It checks for duplicates. You may add more than one asset passing an array as argument. The third argument may alternatively contain an array of options which take precedence over positional arguments.
public config(array $config) : \Grav\Common\$this
Set up configuration options. All the class properties except 'js' and 'css' are accepted here. Also, an extra option 'autoload' may be passed containing an array of assets and/or collections that will be automatically added on startup.
public css(string $group='head', array $attributes=array()) : string
Build the CSS link tags.
public exists(mixed $asset) : bool
Determines if an asset exists as a collection, CSS or JS reference
public getCollections() : array
Return the array of all the registered collections
public getCss(null/string $key=null) : array
Return the array of all the registered CSS assets If a $key is provided, it will try to return only that asset else it will return null
public getJs(null/string $key=null) : array
Return the array of all the registered JS assets If a $key is provided, it will try to return only that asset else it will return null
public getQuerystring(mixed $asset) : string
public getTimestamp(bool $include_join=true) : string
Get the timestamp for assets
public init() : void
Initialization called in the Grav lifecycle to initialize the Assets with appropriate configuration
public js(string $group='head', array $attributes=array()) : string
Build the JavaScript script tags.
public registerCollection(string $collectionName, array $assets, bool $overwrite=false) : \Grav\Common\$this
Add/replace collection.
public removeCss(string $key) : void
Removes an item from the CSS array if set
public removeJs(string $key) : void
Removes an item from the JS array if set
public reset() : \Grav\Common\$this
Reset all assets.
public resetCss() : \Grav\Common\$this
Reset CSS assets.
public resetJs() : \Grav\Common\$this
Reset JavaScript assets.
public setCollection(mixed $collections) : void
Set the array of collections explicitly
public setCss(mixed $css) : void
Set the whole array of CSS assets
public setCssPipeline(boolean $value) : void
Sets the state of CSS Pipeline
public setJs(mixed $js) : void
Set the whole array of JS assets
public setJsPipeline(boolean $value) : void
Sets the state of JS Pipeline
public setTimestamp(mixed $value) : void
Explicitly set's a timestamp for assets
protected attributes(array $attributes) : string
Build an HTML attribute string from an array.
protected buildLocalLink(string $asset, bool $absolute=false) : string the final link url to the asset
Build local links including grav asset shortcodes
protected cssRewrite(string $file, string $relative_path) : mixed
Finds relative CSS urls() and rewrites the URL with an absolute one
protected gatherLinks(array $links, bool $css=true) : string
Download and concatenate the content of several links.
protected getLastModificationTime(string $asset) : string the last modifcation time or false on error
Get the last modification time of asset
protected isRemoteLink(string $link) : bool
Determine whether a link is local or remote. Understands both "http://" and "https://" as well as protocol agnostic links "//"
protected moveImports(string $file) : string the modified file with any @imports at the top of the file
Moves @import statements to the top of the file per the CSS specification
protected pipelineCss(string $group='head', bool $returnURL=true) : bool/string URL or generated content if available, else false
Minify and concatenate CSS
protected pipelineJs(string $group='head', bool $returnURL=true) : bool/string URL or generated content if available, else false
Minify and concatenate JS files.
protected rglob(string $directory, string $pattern, string $ltrim=null) : array
Recursively get files matching $pattern within $directory.
protected sortAssetsByPriorityThenOrder(mixed $a, mixed $b) : mixed


Class: \Grav\Common\Backup\ZipBackup

Visibility Function
public static backup(string/null $destination=null, \callable $messager=null) : null/string
Backup


Class: \Grav\Common\Config\CompiledLanguages

Visibility Function
public modified() : void
Function gets called when cached configuration is saved.
protected createObject(array $data=array()) : mixed
Create configuration object.
protected finalizeObject() : void
Finalize configuration object.
protected loadFile(string $name, string $filename) : mixed
Load single configuration file and append it to the correct position.

This class extends \Grav\Common\Config\CompiledBase


Class: \Grav\Common\Config\CompiledConfig

Visibility Function
public load(bool $withDefaults=false) : mixed
public modified() : void
Function gets called when cached configuration is saved.
public setBlueprints(\callable $blueprints) : \Grav\Common\Config\$this
Set blueprints for the configuration.
protected createObject(array $data=array()) : mixed
Create configuration object.
protected finalizeObject() : void
Finalize configuration object.
protected loadFile(string $name, string $filename) : mixed
Load single configuration file and append it to the correct position.

This class extends \Grav\Common\Config\CompiledBase


Class: \Grav\Common\Config\Languages

Visibility Function
public checksum(mixed $checksum=null) : void
public mergeRecursive(array $data) : void
public modified(mixed $modified=null) : void
public reformat() : void
public timestamp(mixed $timestamp=null) : void

This class extends \Grav\Common\Data\Data

This class implements \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \Countable, \ArrayAccess, \Grav\Common\Data\DataInterface


Class: \Grav\Common\Config\CompiledBase (abstract)

Visibility Function
public __construct(string $cacheFolder, array $files, string $path) : void
public checksum() : bool/string
Returns checksum from the configuration files. You can set $this->checksum = false to disable this check.
public load() : mixed
Load the configuration.
public modified() : void
Function gets called when cached configuration is saved.
public name(string $name=null) : \Grav\Common\Config\$this
Get filename for the compiled PHP file.
public timestamp() : int Timestamp of compiled configuration
Get timestamp of compiled configuration
protected createFilename() : mixed
protected abstract createObject(array $data=array()) : mixed
Create configuration object.
protected abstract finalizeObject() : void
Finalize configuration object.
protected getState() : mixed
protected loadCompiledFile(string $filename) : bool
Load compiled file.
protected abstract loadFile(string $name, string $filename) : mixed
Load single configuration file and append it to the correct position.
protected loadFiles() : bool
Load and join all configuration files.
protected saveCompiledFile(string $filename) : void
Save compiled file.


Class: \Grav\Common\Config\Config

Visibility Function
public checksum(mixed $checksum=null) : void
public debug() : void
public getLanguages() : mixed
public init() : void
public key() : void
public modified(mixed $modified=null) : void
public reload() : void
public timestamp(mixed $timestamp=null) : void

This class extends \Grav\Common\Data\Data

This class implements \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \Countable, \ArrayAccess, \Grav\Common\Data\DataInterface


Class: \Grav\Common\Config\Setup

Visibility Function
public __construct(\Grav\Common\Config\Container/array $container) : void
public getStreams() : array
Get available streams and their types from the configuration.
public init() : \Grav\Common\Config\$this
public initializeLocator(\RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator $locator) : void
Initialize resource locator by using the configuration.
protected check(\RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator $locator) : void

This class extends \Grav\Common\Data\Data

This class implements \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \Countable, \ArrayAccess, \Grav\Common\Data\DataInterface


Class: \Grav\Common\Config\ConfigFileFinder

Visibility Function
public getFiles(array $paths, string $pattern='|\.yaml$|', int $levels=-1) : array
Return all locations for all the files with a timestamp.
public listFiles(array $paths, string $pattern='|\.yaml$|', int $levels=-1) : array
Return all paths for all the files with a timestamp.
public locateFile(array $paths, string $name, string $ext='.yaml') : array
Return all existing locations for a single file with a timestamp.
public locateFileInFolder(string $filename, array $folders) : array
Find filename from a list of folders. Note: Only finds the last override.
public locateFiles(array $paths, string $pattern='|\.yaml$|', int $levels=-1) : array
Return all locations for all the files with a timestamp.
public locateInFolders(array $folders, string $filename=null) : array
Find filename from a list of folders.
public setBase(string $base) : \Grav\Common\Config\$this
protected detectAll(string $folder, string $pattern, int $levels) : array
Detects all plugins with a configuration file and returns them with last modification time.
protected detectInFolder(string $folder, string $lookup=null) : array
Detects all directories with the lookup file and returns them with last modification time.
protected detectRecursive(string $folder, string $pattern, int $levels) : array
Detects all directories with a configuration file and returns them with last modification time.


Class: \Grav\Common\Config\CompiledBlueprints

Visibility Function
public checksum() : bool/string
Returns checksum from the configuration files. You can set $this->checksum = false to disable this check.
protected createObject(array $data=array()) : mixed
Create configuration object.
protected finalizeObject() : void
Finalize configuration object.
protected getState() : mixed
protected getTypes() : array
Get list of form field types.
protected loadFile(string $name, array $files) : mixed
Load single configuration file and append it to the correct position.
protected loadFiles() : bool
Load and join all configuration files.

This class extends \Grav\Common\Config\CompiledBase


Class: \Grav\Common\Data\Blueprint

Visibility Function
public extra(array $data, string $prefix='') : array
Return data fields that do not exist in blueprints.
public filter(array $data) : array
Filter data by using blueprints.
public getDefaults() : array
Get nested structure containing default values defined in the blueprints. Fields without default value are ignored in the list.
public mergeData(array $data1, array $data2, string $name=null, string $separator='.') : array
Merge two arrays by using blueprints.
public schema() : \Grav\Common\Data\BlueprintSchema
Return blueprint data schema.
public setTypes(array $types) : \Grav\Common\Data\$this
Set default values for field types.
public validate(array $data) : void
Validate data against blueprints.
protected dynamicConfig(array $field, string $property, array $call) : void
protected dynamicData(array $field, string $property, array $call) : void
protected getFiles(string/array $path, string $context=null) : array
protected initInternals() : void
Initialize validator.
protected loadFile(string $filename) : string

This class extends \RocketTheme\Toolbox\Blueprints\BlueprintForm

This class implements \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \ArrayAccess


Class: \Grav\Common\Data\Blueprints

Visibility Function
public __construct(string/string/array $search='blueprints://') : void
public get(string $type) : \Grav\Common\Data\Blueprint
Get blueprint.
public types() : array List of type=>name
Get all available blueprint types.
protected loadFile(string $name) : \Grav\Common\Data\Blueprint
Load blueprint file.


Interface: \Grav\Common\Data\DataInterface

Visibility Function
public blueprints() : void
Return blueprints.
public extra() : void
Get extra items which haven't been defined in blueprints.
public file(\RocketTheme\Toolbox\File\FileInterface $storage=null) : \RocketTheme\Toolbox\File\FileInterface
Set or get the data storage.
public filter() : void
Filter all items by using blueprints.
public merge(array $data) : mixed
Merge external data.
public save() : void
Save data into the file.
public validate() : void
Validate by blueprints.
public value(string $name, mixed $default=null, string $separator='.') : mixed Value.
Get value by using dot notation for nested arrays/objects.
Examples of DataInterface::value()
$value = $data->value('this.is.my.nested.variable');


Class: \Grav\Common\Data\ValidationException

Visibility Function
public getMessages() : mixed
public setMessages(array $messages=array()) : void

This class extends \RuntimeException

This class implements \Throwable


Class: \Grav\Common\Data\Data

Visibility Function
public __construct(array $items=array(), \Grav\Common\Data\Blueprint/callable $blueprints=null) : void
public __get(mixed $offset) : mixed Asset value
Magic getter method
public __isset(mixed $offset) : boolean True if the value is set
Magic method to determine if the attribute is set
public __set(mixed $offset, mixed $value) : void
Magic setter method
public __unset(mixed $offset) : void
Magic method to unset the attribute
public blueprints() : \Grav\Common\Data\Blueprint
Return blueprints.
public count() : int
Implements Countable interface.
public def(string $name, mixed $default=null, string $separator=null) : \Grav\Common\Data\$this
Set default value by using dot notation for nested arrays/objects.
public exists() : bool
Returns whether the data already exists in the storage. NOTE: This method does not check if the data is current.
public extra() : array
Get extra items which haven't been defined in blueprints.
public file(\RocketTheme\Toolbox\File\FileInterface $storage=null) : \RocketTheme\Toolbox\File\FileInterface
Set or get the data storage.
public filter() : $this Filter all items by using blueprints.
public get(string $name, mixed $default=null, string $separator=null) : mixed Value.
Get value by using dot notation for nested arrays/objects.
public getDefaults() : array
Get nested structure containing default values defined in the blueprints. Fields without default value are ignored in the list.
public getJoined(string $name, array $value, string $separator='.') : array
Get value from the configuration and join it with given data.
public join(string $name, mixed $value, string $separator='.') : \Grav\Common\Data\$this
Join nested values together by using blueprints.
public joinDefaults(string $name, mixed $value, string $separator='.') : \Grav\Common\Data\$this
Set default values by using blueprints.
public merge(array $data) : \Grav\Common\Data\$this
Merge two configurations together.
public offsetExists(mixed $offset) : bool Returns TRUE on success or FALSE on failure.
Whether or not an offset exists.
public offsetGet(mixed $offset) : mixed Can return all value types.
Returns the value at specified offset.
public offsetSet(mixed $offset, mixed $value) : void
Assigns a value to the specified offset.
public offsetUnset(mixed $offset) : void
Unsets variable at specified offset.
public raw() : string
Return unmodified data as raw string. NOTE: This function only returns data which has been saved to the storage.
public save() : void
Save data if storage has been defined.
public set(string $name, mixed $value, string $separator=null) : \Grav\Common\Data\$this
Set value by using dot notation for nested arrays/objects.
public setDefaults(array $data) : \Grav\Common\Data\$this
Set default values to the configuration if variables were not set.
public toArray() : array
Convert object into an array.
public toJson() : string
Convert object into JSON string.
public toYaml(int $inline=3, int $indent=2) : string A YAML string representing the object.
Convert object into YAML string.
public undef(string $name, string $separator=null) : \Grav\Common\Data\$this
Unset value by using dot notation for nested arrays/objects.
public validate() : \Grav\Common\Data\$this
Validate by blueprints.
public value(string $name, mixed $default=null, string $separator='.') : mixed Value.
Get value by using dot notation for nested arrays/objects.
Examples of Data::def()
$data->def('this.is.my.nested.variable', 'default');
Examples of Data::get()
$value = $this->get('this.is.my.nested.variable');
Examples of Data::set()
$data->set('this.is.my.nested.variable', $value);
Examples of Data::undef()
$data->undef('this.is.my.nested.variable');
Examples of Data::value()
$value = $data->value('this.is.my.nested.variable');

This class implements \Grav\Common\Data\DataInterface, \ArrayAccess, \Countable, \RocketTheme\Toolbox\ArrayTraits\ExportInterface


Class: \Grav\Common\Data\Validation

Visibility Function
public static filter(mixed $value, array $field) : mixed Filtered value.
Filter value against a blueprint field definition.
public static filterIgnore(mixed $value, array $params, array $field) : void
public static filterItem_List(mixed $value, mixed $params) : void
public static filterYaml(mixed $value, mixed $params) : void
public static typeArray(mixed $value, array $params, array $field) : bool True if validation succeeded.
Custom input: array
public static typeBool(mixed $value, mixed $params) : void
public static typeCheckbox(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: checkbox
public static typeCheckboxes(mixed $value, array $params, array $field) : bool True if validation succeeded.
Custom input: checkbox list
public static typeColor(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: color
public static typeCommaList(mixed $value, array $params, array $field) : void
public static typeDate(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: date
public static typeDatetime(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: datetime
public static typeDatetimeLocal(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: datetime-local
public static typeEmail(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: email
public static typeFile(mixed $value, array $params, array $field) : bool True if validation succeeded.
Custom input: file
public static typeHidden(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: hidden
public static typeIgnore(mixed $value, array $params, array $field) : bool True if validation succeeded.
Custom input: ignore (will not validate)
public static typeList(mixed $value, array $params, array $field) : void
public static typeMonth(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: month
public static typeNumber(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: number
public static typePassword(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: password
public static typeRadio(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: radio
public static typeRange(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: range
public static typeSelect(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: select
public static typeText(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: text
public static typeTextarea(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: textarea
public static typeTime(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: time
public static typeToggle(mixed $value, array $params, array $field) : bool True if validation succeeded.
Custom input: toggle
public static typeUrl(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: url
public static typeWeek(mixed $value, array $params, array $field) : bool True if validation succeeded.
HTML5 input: week
public static validate(mixed $value, array $field) : array
Validate value against a blueprint field definition.
public static validateAlnum(mixed $value, mixed $params) : void
public static validateAlpha(mixed $value, mixed $params) : void
public static validateArray(mixed $value, mixed $params) : void
public static validateBool(mixed $value, mixed $params) : void
public static validateDigit(mixed $value, mixed $params) : void
public static validateFloat(mixed $value, mixed $params) : void
public static validateHex(mixed $value, mixed $params) : void
public static validateInt(mixed $value, mixed $params) : void
public static validateJson(mixed $value, mixed $params) : void
public static validatePattern(mixed $value, mixed $params) : void
public static validateRequired(mixed $value, mixed $params) : void
protected static filterArray(mixed $value, mixed $params, mixed $field) : void
protected static filterBool(mixed $value, mixed $params) : void
protected static filterCheckboxes(mixed $value, array $params, array $field) : void
protected static filterCommaList(mixed $value, array $params, array $field) : void
protected static filterDateTime(mixed $value, array $params, array $field) : void
protected static filterFile(mixed $value, array $params, array $field) : void
protected static filterFloat(mixed $value, mixed $params) : void
protected static filterInt(mixed $value, mixed $params) : void
protected static filterList(mixed $value, array $params, array $field) : void
protected static filterLower(mixed $value, array $params) : void
protected static filterNumber(mixed $value, array $params, array $field) : void
protected static filterRange(mixed $value, array $params, array $field) : void
protected static filterText(mixed $value, array $params, array $field) : void
protected static filterUpper(mixed $value, array $params) : void


Class: \Grav\Common\Data\BlueprintSchema

Visibility Function
public filter(array $data) : array
Filter data by using blueprints.
public toArray() : array
Convert object into an array.
public toJson() : string
Convert object into JSON string.
public toYaml(int $inline=3, int $indent=2) : string A YAML string representing the object.
Convert object into YAML string.
public validate(array $data) : void
Validate data against blueprints.
protected checkRequired(array $data, array $fields) : array
protected dynamicConfig(array $field, string $property, array $call) : void
protected filterArray(array $data, array $rules) : array
protected validateArray(array $data, array $rules) : void

This class extends \RocketTheme\Toolbox\Blueprints\BlueprintSchema

This class implements \RocketTheme\Toolbox\ArrayTraits\ExportInterface


Class: \Grav\Common\Errors\BareHandler

Visibility Function
public handle() : int/null

This class extends \Whoops\Handler\Handler

This class implements \Whoops\Handler\HandlerInterface


Class: \Grav\Common\Errors\Errors

Visibility Function
public resetHandlers() : void


Class: \Grav\Common\Errors\SystemFacade

Visibility Function
public handleShutdown() : void
Special case to deal with Fatal errors and the like.
public registerShutdownFunction(\callable $function) : void

This class extends \Whoops\Util\SystemFacade


Class: \Grav\Common\Errors\SimplePageHandler

Visibility Function
public __construct() : void
public addResourcePath(mixed $path) : void
public getResourcePaths() : mixed
public handle() : int/null
protected getResource(mixed $resource) : string

This class extends \Whoops\Handler\Handler

This class implements \Whoops\Handler\HandlerInterface


Class: \Grav\Common\File\CompiledJsonFile

Visibility Function
public __sleep() : void
Serialize file.
public __wakeup() : void
Unserialize file.
public content(mixed $var=null) : string
Get/set parsed file contents.
protected decode(string $var, bool $assoc=true) : array mixed
Decode RAW string into contents.

This class extends \RocketTheme\Toolbox\File\JsonFile

This class implements \RocketTheme\Toolbox\File\FileInterface


Class: \Grav\Common\File\CompiledYamlFile

Visibility Function
public __sleep() : void
Serialize file.
public __wakeup() : void
Unserialize file.
public content(mixed $var=null) : string
Get/set parsed file contents.

This class extends \RocketTheme\Toolbox\File\YamlFile

This class implements \RocketTheme\Toolbox\File\FileInterface


Class: \Grav\Common\File\CompiledMarkdownFile

Visibility Function
public __sleep() : void
Serialize file.
public __wakeup() : void
Unserialize file.
public content(mixed $var=null) : string
Get/set parsed file contents.

This class extends \RocketTheme\Toolbox\File\MarkdownFile

This class implements \RocketTheme\Toolbox\File\FileInterface


Class: \Grav\Common\Filesystem\RecursiveFolderFilterIterator

Visibility Function
public __construct(\RecursiveIterator $iterator) : void
Create a RecursiveFilterIterator from a RecursiveIterator
public accept() : bool true if the current element is acceptable, otherwise false.
Check whether the current element of the iterator is acceptable

This class extends \RecursiveFilterIterator

This class implements \RecursiveIterator, \OuterIterator, \Traversable, \Iterator


Class: \Grav\Common\Filesystem\Folder (abstract)

Visibility Function
public static all(string $path, array $params=array()) : array
Return recursive list of all files and directories under given path.
public static copy(string $source, string $target, string $ignore=null) : void
Recursively copy directory in filesystem.
public static create(string $folder) : mixed
public static delete(string $target, bool $include_target=true) : bool
Recursively delete directory from filesystem.
public static getRelativePath(string $path, string/mixed/string $base='/Users/rhuk/workspace/grav-learn') : string
Get relative path between target and base path. If path isn't relative, return full path.
public static getRelativePathDotDot(string $path, string $base) : string
Get relative path between target and base path. If path isn't relative, return full path.
public static hashAllFiles(mixed $path) : string
Recursively md5 hash all files in a path
public static lastModifiedFile(string $path, string $extensions='md|yaml') : int
Recursively find the last modified time under given path by file.
public static lastModifiedFolder(string $path) : int
Recursively find the last modified time under given path.
public static mkdir(string $folder) : void
public static move(string $source, string $target) : void
Move directory in filesystem.
public static rcopy(mixed $src, mixed $dest) : bool
Recursive copy of one directory to another
public static shift(string $path) : string
Shift first directory out of the path.
protected static doDelete(string $folder, bool $include_target=true) : bool


Class: \Grav\Common\GPM\Response

Visibility Function
public static get(string $uri='', array $options=array(), callable $callback=null) : string The response of the request
Makes a request to the URL by using the preferred method
public static isCurlAvailable() : boolean
Checks if cURL is available
public static isFopenAvailable() : boolean
Checks if the remote fopen request is enabled in PHP
public static isRemote(mixed $file) : bool
Is this a remote file or not
public static progress() : void
Progress normalized for cURL and Fopen Accepts a variable length of arguments passed in by stream method
public static setMethod(string $method='auto') : \Grav\Common\GPM\Response
Sets the preferred method to use for making HTTP calls.


Class: \Grav\Common\GPM\AbstractCollection (abstract)

Visibility Function
public toArray() : void
public toJson() : void

This class extends \Grav\Common\Iterator

This class implements \Serializable, \Countable, \Traversable, \Iterator, \ArrayAccess


Class: \Grav\Common\GPM\Upgrader

Class Upgrader

Visibility Function
public __construct(bool/boolean $refresh=false, callable $callback=null) : void
Creates a new GPM instance with Local and Remote packages available
public getAssets() : array
Returns an array of assets available to download remotely
public getChangelog(string $diff=null) : array return the changelog list for each version
Returns the changelog list for each version of Grav
public getLocalVersion() : string
Returns the version of the installed Grav
public getReleaseDate() : string
Returns the release date of the latest version of Grav
public getRemoteVersion() : string
Returns the version of the remotely available Grav
public isSymlink() : boolean True if Grav is symlinked, False otherwise.
Checks if Grav is currently symbolically linked
public isUpgradable() : boolean True if it's upgradable, False otherwise.
Checks if the currently installed Grav is upgradable to a newer version
public meetsRequirements() : bool
Make sure this meets minimum PHP requirements
public minPHPVersion() : null
Get minimum PHP version from remote


Class: \Grav\Common\GPM\Licenses

Class Licenses

Visibility Function
public static get(mixed $slug=null) : string
Returns the license for a Premium package
public static getLicenseFile() : \RocketTheme\Toolbox\File\FileInterface
Get's the License File object
public static set(mixed $slug, mixed $license) : boolean
Returns the license for a Premium package
public static validate(mixed $license=null) : bool
Validates the License format


Class: \Grav\Common\GPM\Installer

Visibility Function
public static copyInstall(mixed $source_path, mixed $install_path) : bool
public static getMessage() : string The message
Returns the last message added by the installer
public static install(string $zip, string $destination, array $options=array(), string $extracted=null) : bool True if everything went fine, False otherwise.
Installs a given package to a given destination.
public static isGravInstance(string $target) : boolean True if is a Grav Instance. False otherwise
Validates if the given path is a Grav Instance
public static isValidDestination(string $destination, array $exclude=array()) : boolean True if validation passed. False otherwise
Runs a set of checks on the destination and sets the Error if any
public static lastErrorCode() : integer The code of the last error
Returns the last error code of the occurred error
public static lastErrorMsg() : string The message of the last error
Returns the last error occurred in a string message format
public static moveInstall(mixed $source_path, mixed $install_path) : bool
public static setError(int/string $error) : void
Allows to manually set an error
public static sophisticatedInstall(mixed $source_path, mixed $install_path, array $ignores=array()) : bool
public static unZip(mixed $zip_file, mixed $destination) : bool/string
Unzip a file to somewhere
public static uninstall(string $path, array $options=array()) : boolean True if everything went fine, False otherwise.
Uninstalls one or more given package


Class: \Grav\Common\GPM\GPM

Visibility Function
public __construct(bool/boolean $refresh=false, callable $callback=null) : void
Creates a new GPM instance with Local and Remote packages available
public calculateMergedDependenciesOfPackages(array $packages) : mixed
Calculates and merges the dependencies of the passed packages
public calculateVersionNumberFromDependencyVersion(string $version) : null/string
Returns the actual version from a dependency version string. Examples: $versionInformation == '~2.0' => returns '2.0' $versionInformation == '>=2.0.2' => returns '2.0.2' $versionInformation == '2.0.2' => returns '2.0.2' $versionInformation == '*' => returns null $versionInformation == '' => returns null
public checkNextSignificantReleasesAreCompatible(string $version1, string $version2) : bool
Check if two releases are compatible by next significant release ~1.2 is equivalent to >=1.2 <2.0.0 ~1.2.3 is equivalent to >=1.2.3 <1.3.0 In short, allows the last digit specified to go up
public checkNoOtherPackageNeedsTheseDependenciesInALowerVersion(mixed $dependencies_slugs) : void
public checkNoOtherPackageNeedsThisDependencyInALowerVersion(string $slug, string $version_with_operator, array $ignore_packages_list) : bool
Check the package identified by $slug can be updated to the version passed as argument. Thrown an exception if it cannot be updated because another package installed requires it to be at an older version.
public checkPackagesCanBeInstalled(mixed $packages_names_list) : void
Check the passed packages list can be updated
public static copyPackage(mixed $package_file, mixed $tmp) : null/string
Copy the local zip package to tmp
public countInstalled() : integer Amount of installed packages
Returns the amount of locally installed packages
public countUpdates() : integer Amount of available updates
Returns the amount of updates available
public static downloadPackage(mixed $package_file, mixed $tmp) : null/string
Download the zip package via the URL
public findPackage(string $search, bool $ignore_exception=false) : \Grav\Common\GPM\Remote\Package/bool Package if found, FALSE if not
Searches for a Package in the repository
public findPackages(array $searches=array()) : array Array of found Packages Format: ['total' => int, 'not_found' => array, ]
Searches for a list of Packages in the repository
public static getBlueprints(mixed $source) : array/bool
Find/Parse the blueprint file
public getDependencies(array $packages) : mixed
Fetch the dependencies, check the installed packages and return an array with the list of packages with associated an information on what to do: install, update or ignore. ignore means the package is already installed and can be safely left as-is. install means the package is not installed and must be installed. update means the package is already installed and must be updated as a dependency needs a higher version.
public static getInstallPath(mixed $type, mixed $name) : string
Get the install path for a name and a particular type of package
public getInstallable(array $list_type_installed=array()) : array The installed packages
Returns the Locally installable packages
public getInstalled() : \Grav\Common\GPM\Local\Packages
Return the locally installed packages
public getInstalledPackage(string $slug) : Local\Package The instance of the Package
Return the instance of a specific Package
public getInstalledPlugin(string $slug) : Local\Package The instance of the Plugin
Return the instance of a specific Plugin
public getInstalledPlugins() : Iterator The installed plugins
Returns the Locally installed plugins
public getInstalledTheme(string $slug) : Local\Package The instance of the Theme
Return the instance of a specific Theme
public getInstalledThemes() : Iterator The installed themes
Returns the Locally installed themes
public getLatestVersionOfPackage(mixed $package_name) : string/null
Get the latest release of a package from the GPM
public static getPackageName(mixed $source) : bool/string
Try to guess the package name from the source files
public static getPackageType(mixed $source) : bool/string
Try to guess the package type from the source files
public getPackagesThatDependOnPackage(string $slug) : array
Return the list of packages that have the passed one as dependency
public getReleaseType(mixed $package_name) : string/null
Get the release type of a package (stable / testing)
public getRepository() : Remote\Packages Available Plugins and Themes Format: ['plugins' => array, 'themes' => array]
Returns the list of Plugins and Themes available in the repository
public getRepositoryPlugin(string $slug) : mixed Package if found, NULL if not
Returns a Plugin from the repository
public getRepositoryPlugins() : Iterator The Plugins remotely available
Returns the list of Plugins available in the repository
public getRepositoryTheme(string $slug) : mixed Package if found, NULL if not
Returns a Theme from the repository
public getRepositoryThemes() : Iterator The Themes remotely available
Returns the list of Themes available in the repository
public getUpdatable(array $list_type_update=array()) : array Array of updatable Plugins and Themes. Format: ['total' => int, 'plugins' => array, 'themes' => array]
Returns an array of Plugins and Themes that can be updated. Plugins and Themes are extended with the available property that relies to the remote version
public getUpdatablePlugins() : array Array of updatable Plugins
Returns an array of Plugins that can be updated. The Plugins are extended with the available property that relies to the remote version
public getUpdatableThemes() : array Array of updatable Themes
Returns an array of Themes that can be updated. The Themes are extended with the available property that relies to the remote version
public getVersionOfDependencyRequiredByPackage(mixed $package_slug, mixed $dependency_slug) : mixed
Get the required version of a dependency of a package
public isPluginInstalled(string $slug) : boolean True if the Plugin has been installed. False otherwise
Checks if a Plugin is installed
public isPluginInstalledAsSymlink(mixed $slug) : bool
public isPluginUpdatable(string $plugin) : boolean True if the Plugin is updatable. False otherwise
Checks if a Plugin is updatable
public isStableRelease(mixed $package_name) : boolean
Returns true if the package latest release is stable
public isTestingRelease(mixed $package_name) : boolean
Returns true if the package latest release is testing
public isThemeInstalled(string $slug) : boolean True if the Theme has been installed. False otherwise
Checks if a Theme is installed
public isThemeUpdatable(string $theme) : boolean True if the Theme is updatable. False otherwise
Checks if a Theme is Updatable
public isUpdatable(string $slug) : boolean True if updatable. False otherwise or if not found
Check if a Plugin or Theme is updatable
public versionFormatIsEqualOrHigher(mixed $version) : bool
Check if the passed version information contains equal or higher operator Example: returns true for $version: '>=2.0'
public versionFormatIsNextSignificantRelease(mixed $version) : bool
Check if the passed version information contains next significant release (tilde) operator Example: returns true for $version: '~2.0'

This class extends \Grav\Common\Iterator

This class implements \Serializable, \Countable, \Traversable, \Iterator, \ArrayAccess


Class: \Grav\Common\GPM\Common\AbstractPackageCollection (abstract)

Visibility Function
public toArray() : void
public toJson() : void

This class extends \Grav\Common\Iterator

This class implements \Serializable, \Countable, \Traversable, \Iterator, \ArrayAccess


Class: \Grav\Common\GPM\Common\Package

Visibility Function
public __construct(\Grav\Common\Data\Data $package, mixed $type=null) : void
public __get(mixed $key) : void
public __isset(mixed $key) : void
public __toString() : void
public getData() : mixed
public toArray() : void
public toJson() : void


Class: \Grav\Common\GPM\Common\CachedCollection

Visibility Function
public __construct(mixed $items) : void

This class extends \Grav\Common\Iterator

This class implements \Serializable, \Countable, \Traversable, \Iterator, \ArrayAccess


Class: \Grav\Common\GPM\Local\AbstractPackageCollection (abstract)

Visibility Function
public __construct(mixed $items) : void

This class extends \Grav\Common\GPM\Common\AbstractPackageCollection

This class implements \ArrayAccess, \Iterator, \Traversable, \Countable, \Serializable


Class: \Grav\Common\GPM\Local\Package

Visibility Function
public __construct(\Grav\Common\Data\Data $package, mixed $package_type=null) : void
public isEnabled() : mixed

This class extends \Grav\Common\GPM\Common\Package


Class: \Grav\Common\GPM\Local\Themes

Visibility Function
public __construct() : void
Local Themes Constructor

This class extends \Grav\Common\GPM\Local\AbstractPackageCollection

This class implements \Serializable, \Countable, \Traversable, \Iterator, \ArrayAccess


Class: \Grav\Common\GPM\Local\Plugins

Visibility Function
public __construct() : void
Local Plugins Constructor

This class extends \Grav\Common\GPM\Local\AbstractPackageCollection

This class implements \Serializable, \Countable, \Traversable, \Iterator, \ArrayAccess


Class: \Grav\Common\GPM\Local\Packages

Visibility Function
public __construct() : void

This class extends \Grav\Common\GPM\Common\CachedCollection

This class implements \ArrayAccess, \Iterator, \Traversable, \Countable, \Serializable


Class: \Grav\Common\GPM\Remote\AbstractPackageCollection

Visibility Function
public __construct(null $repository=null, bool $refresh=false, null $callback=null) : void
AbstractPackageCollection constructor.
public fetch(bool $refresh=false, mixed $callback=null) : mixed

This class extends \Grav\Common\GPM\Common\AbstractPackageCollection

This class implements \ArrayAccess, \Iterator, \Traversable, \Countable, \Serializable


Class: \Grav\Common\GPM\Remote\Package

Visibility Function
public __construct(mixed $package, mixed $package_type=null) : void

This class extends \Grav\Common\GPM\Common\Package


Class: \Grav\Common\GPM\Remote\Themes

Visibility Function
public __construct(bool $refresh=false, callable $callback=null) : void
Local Themes Constructor

This class extends \Grav\Common\GPM\Remote\AbstractPackageCollection

This class implements \Serializable, \Countable, \Traversable, \Iterator, \ArrayAccess


Class: \Grav\Common\GPM\Remote\Plugins

Visibility Function
public __construct(bool $refresh=false, callable $callback=null) : void
Local Plugins Constructor

This class extends \Grav\Common\GPM\Remote\AbstractPackageCollection

This class implements \Serializable, \Countable, \Traversable, \Iterator, \ArrayAccess


Class: \Grav\Common\GPM\Remote\Packages

Visibility Function
public __construct(bool $refresh=false, mixed $callback=null) : void

This class extends \Grav\Common\GPM\Common\CachedCollection

This class implements \ArrayAccess, \Iterator, \Traversable, \Countable, \Serializable


Class: \Grav\Common\GPM\Remote\GravCore

Visibility Function
public __construct(bool $refresh=false, null $callback=null) : void
public getAssets() : array list of assets
Returns the list of assets associated to the latest version of Grav
public getChangelog(string $diff=null) : array changelog list for each version
Returns the changelog list for each version of Grav
public getDate() : string
Return the release date of the latest Grav
public getMinPHPVersion() : null/string
Returns the minimum PHP version
public getVersion() : string
Returns the latest version of Grav available remotely
public isSymlink() : bool
Is this installation symlinked?
public isUpdatable() : mixed
Determine if this version of Grav is eligible to be updated

This class extends \Grav\Common\GPM\Remote\AbstractPackageCollection

This class implements \Serializable, \Countable, \Traversable, \Iterator, \ArrayAccess


Class: \Grav\Common\Helpers\Excerpts

Visibility Function
public static getExcerptFromHtml(string $html, string $tag) : array/null returns nested array excerpt
Get an Excerpt array from a chunk of HTML
public static getHtmlFromExcerpt(mixed $excerpt) : string
Rebuild HTML tag from an excerpt array
public static processImageExcerpt(array $excerpt, \Grav\Common\Page\Page $page) : mixed
Process an image excerpt
public static processImageHtml(string $html, \Grav\Common\Page\Page $page) : string Returns final HTML string
Process Grav image media URL from HTML tag
public static processLinkExcerpt(mixed $excerpt, \Grav\Common\Page\Page $page, string $type='link') : mixed
Process a Link excerpt
public static processMediaActions(mixed $medium, mixed $url) : mixed
Process media actions
protected static parseUrl(string $url) : array/bool
Variation of parse_url() which works also with local streams.
protected static resolveStream(mixed $url) : void


Class: \Grav\Common\Helpers\Base32

Visibility Function
public static decode(mixed $base32) : string
Decode in Base32
public static encode(mixed $bytes) : string
Encode in Base32


Class: \Grav\Common\Helpers\Truncator

This file is part of https://github.com/Bluetel-Solutions/twig-truncate-extension Copyright (c) 2015 Bluetel Solutions [email protected] Copyright (c) 2015 Alex Wilson [email protected] For the full copyright and license information, please view the LICENSE file that was distributed with this source code.

Visibility Function
public static htmlToDomDocument(string $html) : void
Builds a DOMDocument object from a string containing HTML.
public static truncateLetters(string $html, integer $limit, string $ellipsis='') : string Safe truncated HTML.
Safely truncates HTML by a given number of letters.
public static truncateWords(string $html, integer $limit, string $ellipsis='') : string Safe truncated HTML.
Safely truncates HTML by a given number of words.


Class: \Grav\Common\Helpers\Exif

Visibility Function
public __construct() : void
Exif constructor.
public getReader() : mixed


Class: \Grav\Common\Language\Language

Visibility Function
public __construct(\Grav\Common\Grav $grav) : void
Constructor
public enabled() : bool
Ensure that languages are enabled
public getActive() : mixed
Gets current active language
public getAvailable() : string
Gets a pipe-separated string of available languages
public getBrowserLanguages(array $accept_langs=array()) : array
Get the browser accepted languages
public getDefault() : mixed
Gets current default language
public getFallbackLanguages() : array
Gets an array of languages with active first, then fallback languages
public getFallbackPageExtensions(string/null $file_ext=null) : array
Gets an array of valid extensions with active first, then fallback extensions
public getLanguage() : mixed
Gets language, active if set, else default
public getLanguageURLPrefix(null $lang=null) : string
Get's a URL prefix based on configuration
public getLanguages() : array
Gets the array of supported languages
public getTranslation(string $lang, string $key, bool $array_support=false) : string
Lookup the translation text for a given lang and key
public init() : void
Initialize the default and enabled languages
public isIncludeDefaultLanguage(null $lang=null) : bool
Test to see if language is default and language should be included in the URL
public isLanguageInUrl() : bool
Simple getter to tell if a language was found in the URL
public resetFallbackPageExtensions() : void
Resets the page_extensions value. Useful to re-initialize the pages and change site language at runtime, example: $this->grav['language']->setActive('it'); $this->grav['language']->resetFallbackPageExtensions(); $this->grav['pages']->init();
public setActive(mixed $lang) : bool
Sets active language manually
public setActiveFromUri(mixed $uri) : mixed
Sets the active language based on the first part of the URL
public setDefault(mixed $lang) : bool
Sets default language manually
public setLanguages(mixed $langs) : void
Sets the current supported languages manually
public translate(mixed $args, array $languages=null, bool $array_support=false, bool $html_out=false) : string
Translate a key and possibly arguments into a string using current lang and fallbacks Other arguments can be passed and replaced in the translation with sprintf syntax
public translateArray(mixed $key, mixed $index, null $languages=null, bool $html_out=false) : string
Translate Array
public validate(mixed $lang) : bool
Ensures the language is valid and supported


Class: \Grav\Common\Language\LanguageCodes

Visibility Function
public static getName(mixed $code) : mixed
public static getNames(array $keys) : mixed
public static getNativeName(mixed $code) : mixed
public static getOrientation(mixed $code) : mixed
public static isRtl(mixed $code) : bool
protected static get(mixed $code, mixed $type) : mixed


Class: \Grav\Common\Markdown\Parsedown

Visibility Function
public __call(mixed $method, mixed $args) : void
public __construct(mixed $page, mixed $defaults) : void
Parsedown constructor.
public addBlockType(mixed $type, mixed $tag, bool $continuable=false, bool $completable=false, mixed $index=null) : void
Be able to define a new Block type or override an existing one
public addInlineType(mixed $type, mixed $tag, mixed $index=null) : void
Be able to define a new Inline type or override an existing one
public elementToHtml(array $Element) : string markup
Make the element function publicly accessible, Medium uses this to render from Twig
public setSpecialChars(mixed $special_chars) : \Grav\Common\Markdown\$this
Setter for special chars
protected blockTwigTag(array $line) : array/null
Ensure Twig tags are treated as block level items with no

tags
protected init(mixed $page, mixed $defaults) : void
Initialization function to setup key variables needed by the MarkdownGravLinkTrait
protected inlineImage(mixed $excerpt) : void
protected inlineLink(mixed $excerpt) : void
protected inlineSpecialCharacter(mixed $excerpt) : void
protected isBlockCompletable(mixed $Type) : bool
Overrides the default behavior to allow for plugin-provided blocks to be completable
protected isBlockContinuable(mixed $Type) : bool
Overrides the default behavior to allow for plugin-provided blocks to be continuable

This class extends \Parsedown


Class: \Grav\Common\Markdown\ParsedownExtra

Visibility Function
public __call(mixed $method, mixed $args) : void
public __construct(mixed $page, mixed $defaults) : void
ParsedownExtra constructor.
public addBlockType(mixed $type, mixed $tag, bool $continuable=false, bool $completable=false, mixed $index=null) : void
Be able to define a new Block type or override an existing one
public addInlineType(mixed $type, mixed $tag, mixed $index=null) : void
Be able to define a new Inline type or override an existing one
public elementToHtml(array $Element) : string markup
Make the element function publicly accessible, Medium uses this to render from Twig
public setSpecialChars(mixed $special_chars) : \Grav\Common\Markdown\$this
Setter for special chars
protected blockTwigTag(array $line) : array/null
Ensure Twig tags are treated as block level items with no

tags
protected init(mixed $page, mixed $defaults) : void
Initialization function to setup key variables needed by the MarkdownGravLinkTrait
protected inlineImage(mixed $excerpt) : void
protected inlineLink(mixed $excerpt) : void
protected inlineSpecialCharacter(mixed $excerpt) : void
protected isBlockCompletable(mixed $Type) : bool
Overrides the default behavior to allow for plugin-provided blocks to be completable
protected isBlockContinuable(mixed $Type) : bool
Overrides the default behavior to allow for plugin-provided blocks to be continuable

This class extends \ParsedownExtra


Interface: \Grav\Common\Media\Interfaces\MediaObjectInterface

Class implements media object interface.

Visibility Function


Interface: \Grav\Common\Media\Interfaces\MediaInterface

Class implements media interface.

Visibility Function
public getMedia() : MediaCollectionInterface Collection of associated media.
Gets the associated media collection.
public getMediaFolder() : string/null Media path or null if the object doesn't have media folder.
Get filesystem path to the associated media.
public getMediaOrder() : array Empty array means default ordering.
Get display order for the associated media.


Interface: \Grav\Common\Media\Interfaces\MediaCollectionInterface

Class implements media collection interface.

Visibility Function


Class: \Grav\Common\Page\Header

Visibility Function
public __construct(array $items=array()) : void
Constructor to initialize array.
public def(string $name, mixed $default=null, string $separator=null) : \Grav\Common\Page\$this
Set default value by using dot notation for nested arrays/objects.
public get(string $name, mixed $default=null, string $separator=null) : mixed Value.
Get value by using dot notation for nested arrays/objects.
public offsetExists(mixed $offset) : bool Returns TRUE on success or FALSE on failure.
Whether or not an offset exists.
public offsetGet(mixed $offset) : mixed Can return all value types.
Returns the value at specified offset.
public offsetSet(mixed $offset, mixed $value) : void
Assigns a value to the specified offset.
public offsetUnset(mixed $offset) : void
Unsets variable at specified offset.
public set(string $name, mixed $value, string $separator=null) : \Grav\Common\Page\$this
Set value by using dot notation for nested arrays/objects.
public undef(string $name, string $separator=null) : \Grav\Common\Page\$this
Unset value by using dot notation for nested arrays/objects.
Examples of Header::def()
$data->def('this.is.my.nested.variable', 'default');
Examples of Header::get()
$value = $this->get('this.is.my.nested.variable');
Examples of Header::set()
$data->set('this.is.my.nested.variable', $value);
Examples of Header::undef()
$data->undef('this.is.my.nested.variable');

This class implements \ArrayAccess


Class: \Grav\Common\Page\Collection

Visibility Function
public __construct(array $items=array(), array $params=array(), \Grav\Common\Page\Pages/null/\Grav\Common\Page\Pages $pages=null) : void
Collection constructor.
public add(mixed $path, mixed $slug) : \Grav\Common\Page\$this
Add a page with path and slug
public addPage(\Grav\Common\Page\Page $page) : \Grav\Common\Page\$this
Add a single page to a collection
public adjacentSibling(string $path, integer $direction=1) : Page The sibling item.
Returns the adjacent sibling based on a direction.
public batch(mixed $size) : array/\Grav\Common\Page\Collection[]
Split collection into array of smaller collections.
public copy() : \Grav\Common\Page\static
Create a copy of this collection
public current() : \Grav\Common\Page\Page
Returns current page.
public currentPosition(string $path) : Integer the index of the current page.
Returns the item in the current position.
public dateRange(mixed $startDate, bool $endDate=false, bool/mixed $field=false) : \Grav\Common\Page\$this
Returns the items between a set of date ranges of either the page date field (default) or an arbitrary datetime page field where end date is optional Dates can be passed in as text that strtotime() can process http://php.net/manual/en/function.strtotime.php
public intersect(\Grav\Common\Page\Collection $collection) : \Grav\Common\Page\$this
Intersect another collection with the current collection
public isFirst(string $path) : boolean True if item is first.
Check to see if this item is the first in the collection.
public isLast(string $path) : boolean True if item is last.
Check to see if this item is the last in the collection.
public key() : mixed
Returns current slug.
public merge(\Grav\Common\Page\Collection $collection) : \Grav\Common\Page\$this
Merge another collection with the current collection
public modular() : Collection The collection with only modular pages
Creates new collection with only modular pages
public nextSibling(string $path) : Page The next item.
Gets the next sibling based on current position.
public nonModular() : Collection The collection with only non-modular pages
Creates new collection with only non-modular pages
public nonPublished() : Collection The collection with only non-published pages
Creates new collection with only non-published pages
public nonRoutable() : Collection The collection with only non-routable pages
Creates new collection with only non-routable pages
public nonVisible() : Collection The collection with only non-visible pages
Creates new collection with only non-visible pages
public ofOneOfTheseAccessLevels(mixed $accessLevels) : Collection The collection
Creates new collection with only pages of one of the specified access levels
public ofOneOfTheseTypes(mixed $types) : Collection The collection
Creates new collection with only pages of one of the specified types
public ofType(mixed $type) : Collection The collection
Creates new collection with only pages of the specified type
public offsetGet(mixed $offset) : mixed Can return all value types.
Returns the value at specified offset.
public order(string $by, string $dir='asc', array $manual=null, string $sort_flags=null) : \Grav\Common\Page\$this
Reorder collection.
public params() : array
Get the collection params
public prevSibling(string $path) : Page The previous item.
Gets the previous sibling based on current position.
public published() : Collection The collection with only published pages
Creates new collection with only published pages
public remove(\Grav\Common\Page\Page/string/null $key=null) : \Grav\Common\Page\$this
Remove item from the list.
public routable() : Collection The collection with only routable pages
Creates new collection with only routable pages
public setParams(array $params) : \Grav\Common\Page\$this
Set parameters to the Collection
public toExtendedArray() : array
Get the extended version of this Collection with each page keyed by route
public visible() : Collection The collection with only visible pages
Creates new collection with only visible pages

This class extends \Grav\Common\Iterator

This class implements \Serializable, \Countable, \Traversable, \Iterator, \ArrayAccess


Class: \Grav\Common\Page\Types

Visibility Function
public __construct(array $items=array()) : void
Constructor to initialize array.
public count() : int
Implements Countable interface.
public current() : mixed Can return any type.
Returns the current element.
public key() : mixed Returns scalar on success, or NULL on failure.
Returns the key of the current element.
public modularSelect() : void
public next() : void
Moves the current position to the next element.
public offsetExists(mixed $offset) : bool Returns TRUE on success or FALSE on failure.
Whether or not an offset exists.
public offsetGet(mixed $offset) : mixed Can return all value types.
Returns the value at specified offset.
public offsetSet(mixed $offset, mixed $value) : void
Assigns a value to the specified offset.
public offsetUnset(mixed $offset) : void
Unsets an offset.
public pageSelect() : void
public register(mixed $type, mixed $blueprint=null) : void
public rewind() : void
Rewinds back to the first element of the Iterator.
public scanBlueprints(mixed $uri) : void
public scanTemplates(mixed $uri) : void
public toArray() : array
Convert object into an array.
public toJson() : string
Convert object into JSON string.
public toYaml(int $inline=3, int $indent=2) : string A YAML string representing the object.
Convert object into YAML string.
public valid() : bool Returns TRUE on success or FALSE on failure.
This method is called after Iterator::rewind() and Iterator::next() to check if the current position is valid.

This class implements \ArrayAccess, \Iterator, \Traversable, \Countable


Class: \Grav\Common\Page\Page

Visibility Function
public __construct() : void
Page Object Constructor
public active() : bool True if it is active
Returns whether or not this page is the currently active page requested via the URL.
public activeChild() : bool True if active child exists
Returns whether or not this URI's URL contains the URL of the active page. Or in other words, is this page's URL in the current URL
public addContentMeta(mixed $name, mixed $value) : void
Add an entry to the page's contentMeta array
public adjacentSibling(integer $direction=1) : \Grav\Common\Page\Page/bool the sibling page
Returns the adjacent sibling based on a direction.
public ancestor(bool $lookup=null) : \Grav\Common\Page\Page page you were looking for if it exists
Helper method to return an ancestor page.
public blueprintName() : string
Get the blueprint name for this page. Use the blueprint form field if set
public blueprints() : \Grav\Common\Data\Blueprint
Get blueprints for the page.
public cacheControl(null $var=null) : null
Gets and sets the cache-control property. If not set it will return the default value (null) https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control for more details on valid options
public cachePageContent() : void
Fires the onPageContentProcessed event, and caches the page content using a unique ID for the page
public canonical(bool $include_lang=true) : string
Returns the canonical URL for a page
public childType() : string
Returns child page type.
public children() : \Grav\Common\Page\Collection
Returns children of this page.
public collection(string/string/array $params='content', bool/boolean $pagination=true) : \Grav\Common\Page\Collection
Get a collection of pages in the current context.
public content(string $var=null) : string Content
Gets and Sets the content based on content portion of the .md file
public contentMeta() : mixed
Get the contentMeta array and initialize content first if it's not already
public copy(\Grav\Common\Page\Page $parent) : \Grav\Common\Page\$this
Prepare a copy from the page. Copies also everything that's under the current page. Returns a new Page object for the copy. You need to call $this->save() in order to perform the move.
public currentPosition() : Integer the index of the current page.
Returns the item in the current position.
public date(string $var=null) : int unix timestamp representation of the date
Gets and sets the date for this Page object. This is typically passed in via the page headers
public dateformat(string $var=null) : string string representation of a date format
Gets and sets the date format for this Page object. This is typically passed in via the page headers using typical PHP date string structure - http://php.net/manual/en/function.date.php
public debugger() : mixed
Returns the state of the debugger override etting for this page
public eTag(boolean $var=null) : boolean show etag header
Gets and sets the option to show the etag header for the page.
public evaluate(string/array $value, bool $only_published=true) : mixed
public exists() : bool
Returns whether the page exists in the filesystem.
public expires(int $var=null) : int The expires value
Gets and sets the expires field. If not set will return the default
public extension(null $var=null) : null/string
Gets and sets the extension field.
public extra() : array
Get unknown header variables.
public file() : \Grav\Common\Page\MarkdownFile/null
Get file object to the page.
public filePath(string $var=null) : string/null the file path
Gets and sets the path to the .md file for this Page object.
public filePathClean() : string The relative file path
Gets the relative path to the .md file
public filter() : void
Filter page header from illegal contents.
public find(string $url, bool $all=false) : \Grav\Common\Page\Page page you were looking for if it exists
Helper method to return a page.
public folder(string $var=null) : string/null
Get/set the folder.
public folderExists() : bool
Returns whether or not the current folder exists
public frontmatter(string/null $var=null) : string
Gets and Sets the page frontmatter
public getAction() : string The Action string.
Gets the action.
public getContentMeta(null $name=null) : mixed
Return the whole contentMeta array as it currently stands
public getMedia() : MediaCollectionInterface Representation of associated media.
Gets the associated media collection.
public getMediaFolder() : string/null
Get filesystem path to the associated media.
public getMediaOrder() : array Empty array means default ordering.
Get display order for the associated media.
public getMediaUri() : null/string
Get URI ot the associated media. Method will return null if path isn't URI.
public getOriginal() : Page The original version of the page.
Gets the Page Unmodified (original) version of the page.
public getRawContent() : string the current page content
Needed by the onPageContentProcessed event to get the raw page content
public header(object/array $var=null) : object the current YAML configuration
Gets and Sets the header based on the YAML configuration at the top of the .md file
public home() : bool True if it is the homepage
Returns whether or not this page is the currently configured home page.
public id(string $var=null) : string the identifier
Gets and sets the identifier for this Page object.
public inherited(string $field) : \Grav\Common\Page\Page
Helper method to return an ancestor page to inherit from. The current page object is returned.
public inheritedField(string $field) : array
Helper method to return an ancestor field only to inherit from. The first occurrence of an ancestor field will be returned if at all.
public init(\SplFileInfo $file, string $extension=null) : \Grav\Common\Page\$this
Initializes the page instance variables based on a file
public isDir() : bool True if its a directory
Returns whether or not this Page object is a directory or a page.
public isFirst() : boolean True if item is first.
Check to see if this item is the first in an array of sub-pages.
public isLast() : boolean True if item is last
Check to see if this item is the last in an array of sub-pages.
public isPage() : bool True if its a page with a .md file associated
Returns whether or not this Page object has a .md file associated with it or if its just a directory.
public language(mixed $var=null) : mixed
Get page language
public lastModified(boolean $var=null) : boolean show last_modified header
Gets and sets the option to show the last_modified header for the page.
public link(bool $include_host=false) : string the permalink
Gets the URL for a page - alias of url().
public maxCount(int $var=null) : int the maximum number of sub-pages
Gets and sets the maxCount field which describes how many sub-pages should be displayed if the sub_pages header property is set for this page object.
public media(\Grav\Common\Page\Media $var=null) : Media Representation of associated media.
Gets and sets the associated media as found in the page folder.
public menu(string $var=null) : string the menu field for the page
Gets and sets the menu name for this Page. This is the text that can be used specifically for navigation. If no menu field is set, it will use the title()
public metadata(array $var=null) : array an Array of metadata values for the page
Function to merge page metadata tags and build an array of Metadata objects that can then be rendered in the page.
public modified(int $var=null) : int modified unix timestamp
Gets and sets the modified timestamp.
public modifyHeader(mixed $key, mixed $value) : void
Modify a header value directly
public modular(bool $var=null) : bool true if modular_twig
Gets and sets the modular var that helps identify this page is a modular child
public modularTwig(bool $var=null) : bool true if modular_twig
Gets and sets the modular_twig var that helps identify this page as a modular child page that will need twig processing handled differently from a regular page.
public move(\Grav\Common\Page\Page $parent) : \Grav\Common\Page\$this
Prepare move page to new location. Moves also everything that's under the current page. You need to call $this->save() in order to perform the move.
public name(string $var=null) : string The name of this page.
Gets and sets the name field. If no name field is set, it will return 'default.md'.
public nextSibling() : Page the next Page item
Gets the next sibling based on current position.
public order(int $var=null) : int/bool
Get/set order number of this page.
public orderBy(string $var=null) : string supported options include "default", "title", "date", and "folder"
Gets and sets the order by which the sub-pages should be sorted. default - is the order based on the file system, ie 01.Home before 02.Advark title - is the order based on the title set in the pages date - is the order based on the date set in the pages folder - is the order based on the name of the folder with any numerics omitted
public orderDir(string $var=null) : string the order, either "asc" or "desc"
Gets and sets the order by which any sub-pages should be sorted.
public orderManual(string $var=null) : array
Gets the manual order set in the header.
public parent(\Grav\Common\Page\Page $var=null) : \Grav\Common\Page\Page/null the parent page object if it exists.
Gets and Sets the parent object for this page
public path(string $var=null) : string/null the path
Gets and sets the path to the folder where the .md for this Page object resides. This is equivalent to the filePath but without the filename.
public permalink() : string The permalink.
Gets the URL with host information, aka Permalink.
public prevSibling() : Page the previous Page item
Gets the previous sibling based on current position.
public process(array $var=null) : array an Array of name value pairs where the name is the process and value is true or false
Gets and Sets the process setup for this Page. This is multi-dimensional array that consists of a simple array of arrays with the form array("markdown"=>true) for example
public publishDate(string $var=null) : int unix timestamp representation of the date
Gets and Sets the Page publish date
public published(bool $var=null) : bool true if the page is published
Gets and Sets whether or not this Page is considered published
public raw(string $var=null) : string Raw content string
Gets and Sets the raw data
public rawMarkdown(null $var=null) : null
Gets and Sets the Page raw content
public rawRoute(null $var=null) : null/string
Gets and Sets the page raw route
public redirect(string $var=null) : string
Gets the redirect set in the header.
public relativePagePath() : void
Returns the clean path to the page file
public root() : bool True if it is the root
Returns whether or not this page is the root node of the pages tree.
public routable(bool $var=null) : bool true if the page is routable
Gets and Sets whether or not this Page is routable, ie you can reach it via a URL. The page must be routable and published
public route(string $var=null) : string The route for the Page.
Gets the route for the page based on the route headers if available, else from the parents route and the current Page's slug.
public routeAliases(array $var=null) : array The route aliases for the Page.
Gets the route aliases for the page based on page headers.
public routeCanonical(null $var=null) : bool/string
Gets the canonical route for this page if its set. If provided it will use that value, else if it's true it will use the default route.
public save(bool/bool/mixed $reorder=true) : void
Save page if there's a file assigned to it.
public setContentMeta(mixed $content_meta) : mixed
Sets the whole content meta array in one shot
public setRawContent(mixed $content) : void
Needed by the onPageContentProcessed event to set the raw page content
public setSummary(string $summary) : void
Sets the summary of the page
public shouldProcess(string $process) : bool whether or not the processing method is enabled for this Page
Gets the configured state of the processing method.
public slug(string $var=null) : string the slug
Gets and Sets the slug for the Page. The slug is used in the URL routing. If not set it uses the parent folder from the path
public ssl(mixed $var=null) : void
public summary(int $size=null, bool/boolean $textOnly=false) : string
Get the summary.
public taxonomy(array $var=null) : array an array of taxonomies
Gets and sets the taxonomy array which defines which taxonomies this page identifies itself with.
public template(string $var=null) : string the template name
Gets and sets the template field. This is used to find the correct Twig template file to render. If no field is set, it will return the name without the .md extension
public templateFormat(null $var=null) : null
Allows a page to override the output render format, usually the extension provided in the URL. (e.g. html, json, xml, etc).
public title(string $var=null) : string the title of the Page
Gets and sets the title for this Page. If no title is set, it will use the slug() to get a name
public toArray() : array
Convert page to an array.
public toJson() : string
Convert page to JSON encoded string.
public toYaml() : string
Convert page to YAML encoded string.
public topParent() : \Grav\Common\Page\Page/null the top parent page object if it exists.
Gets the top parent object for this page
public translatedLanguages(bool $onlyPublished=false) : array the page translated languages
Return an array with the routes of other translated languages
public unpublishDate(string $var=null) : int/null unix timestamp representation of the date
Gets and Sets the Page unpublish date
public unsetRouteSlug() : void
Helper method to clear the route out so it regenerates next time you use it
public untranslatedLanguages(bool $includeUnpublished=false) : array the page untranslated languages
Return an array listing untranslated languages available
public url(bool $include_host=false, bool $canonical=false, bool $include_base=true, bool $raw_route=false) : string The url.
Gets the url for the Page.
public urlExtension() : string The extension of this page. For example .html
Returns the page extension, got from the page url_extension config and falls back to the system config system.pages.append_url_extension.
public validate() : void
Validate page header.
public value(string $name, mixed $default=null) : mixed
Get value from a page variable (used mostly for creating edit forms).
public visible(bool $var=null) : bool true if the page is visible
Gets and Sets whether or not this Page is visible for navigation
protected adjustRouteCase(mixed $route) : void
protected cleanPath(string $path) : string the path
Cleans the path.
protected clearMediaCache() : void
Clear media cache.
protected doRelocation() : void
Moves or copies the page in filesystem.
protected doReorder(mixed $new_order) : void
Reorders all siblings according to a defined order
protected getCacheKey() : string
protected getInheritedParams(string $field) : array
Method that contains shared logic for inherited() and inheritedField()
protected getMediaCache() : \Grav\Common\Cache
protected processFrontmatter() : void
protected processMarkdown() : void
Process the Markdown content. Uses Parsedown or Parsedown Extra depending on configuration
protected setMedia(\Grav\Common\Media\Interfaces\MediaCollectionInterface $media) : \Grav\Common\Page\$this
Sets the associated media collection.
protected setPublishState() : void

This class implements \Grav\Common\Page\Interfaces\PageInterface


Class: \Grav\Common\Page\Media

Visibility Function
public __construct(string $path, array $media_order=null) : void
public __wakeup() : void
Initialize static variables on unserialize.
public offsetExists(mixed $offset) : bool
public offsetGet(mixed $offset) : mixed
public path() : mixed
Enable accessing the media path
protected init() : void
Initialize class.

This class extends \Grav\Common\Page\Medium\AbstractMedia

This class implements \Grav\Common\Media\Interfaces\MediaCollectionInterface, \ArrayAccess, \Countable


Class: \Grav\Common\Page\Pages

Visibility Function
public __construct(\Grav\Common\Grav $c) : void
Constructor
public accessLevels() : array
Get access levels of the site pages
public addPage(\Grav\Common\Page\Page $page, string $route=null) : void
Adds a page and assigns a route to it.
public all(\Grav\Common\Page\Page $current=null) : \Grav\Common\Page\Collection
Get all pages
public ancestor(string $route, string $path=null) : \Grav\Common\Page\Page/null
Get a page ancestor.
public base(string $path=null) : string
Get or set base path for the pages.
public baseRoute(string $lang=null) : string
Get base route for Grav pages.
public baseUrl(string $lang=null, bool/null $absolute=null) : string
Get base URL for Grav pages.
public blueprints(string $type) : \Grav\Common\Data\Blueprint
Get a blueprint for a page type.
public children(string $path) : \Grav\Common\Page\Collection
Get children of the path.
public dispatch(string $route, bool $all=false, bool $redirect=true) : \Grav\Common\Page\Page/null
Dispatch URI to a page.
public find(string $route, bool $all=false) : \Grav\Common\Page\Page/null
alias method to return find a page.
public get(string $path) : \Grav\Common\Page\Page
Get a page instance.
public static getHomeRoute() : string
Gets the home route
public getList(\Grav\Common\Page\Page $current=null, int $level, bool $rawRoutes=false, bool $showAll=true, bool $showFullpath=false, bool $showSlug=false, bool $showModular=false, bool $limitLevels=false) : array
Get list of route/title of all pages.
public getPagesCacheId() : mixed
Get the Pages cache ID this is particularly useful to know if pages have changed and you want to sync another cache with pages cache - works best in onPagesInitialized()
public static getTypes() : \Grav\Common\Page\Types
Get available page types.
public homeUrl(string $lang=null, bool $absolute=null) : string
Get home URL for Grav site.
public inherited(string $route, string $field=null) : \Grav\Common\Page\Page/null
Get a page ancestor trait.
public init() : void
Class initialization. Must be called before using this class.
public instances() : array/\Grav\Common\Page\Page[]
Returns a list of all pages.
public lastModified(int $modified=null) : int/null
Get or set last modification time.
public static modularTypes() : array
Get available page types.
public static pageTypes() : array
Get template types based on page type (standard or modular)
public static parents() : array
Get available parents routes
public static parentsRawRoutes() : array
Get available parents raw routes.
public static resetHomeRoute() : void
Needed for testing where we change the home route via config
public resetPages(mixed $pages_dir) : void
Accessible method to manually reset the pages cache
public root() : \Grav\Common\Page\Page
Get root page.
public route(string $route='/', string $lang=null) : string
Get route for Grav site.
public routes() : array
Returns a list of all routes.
public sort(\Grav\Common\Page\Page $page, string $order_by=null, string $order_dir=null, mixed $sort_flags=null) : array
Sort sub-pages in a page.
public sortCollection(\Grav\Common\Page\Collection $collection, mixed $orderBy, string $orderDir='asc', null $orderManual=null, mixed $sort_flags=null) : array
public static types() : array
Get available page types.
public url(string $route='/', string $lang=null, bool $absolute=null) : string
Get URL for Grav site.
protected arrayShuffle(array $list) : array
Shuffles an associative array
protected buildPages() : void
Builds pages.
protected buildRoutes() : void
protected buildSort(string $path, array $pages, string $order_by='default', array $manual=null, int $sort_flags=null) : void
protected recurse(string $directory, \Grav\Common\Page\Page/null/\Grav\Common\Page\Page $parent=null) : \Grav\Common\Page\Page
Recursive function to load & build page relationships.


Interface: \Grav\Common\Page\Interfaces\PageInterface

Class implements page interface.

Visibility Function


Class: \Grav\Common\Page\Medium\VideoMedium

Visibility Function
public autoplay(bool $status=false) : \Grav\Common\Page\Medium\$this
Allows to set the autoplay attribute
public controls(bool $display=true) : \Grav\Common\Page\Medium\$this
Allows to set or remove the HTML5 default controls
public loop(bool $status=false) : \Grav\Common\Page\Medium\$this
Allows to set the loop attribute
public muted(bool $status=false) : \Grav\Common\Page\Medium\$this
Allows to set the muted attribute
public playsinline(bool $status=false) : \Grav\Common\Page\Medium\$this
Allows to set the playsinline attribute
public poster(mixed $urlImage) : \Grav\Common\Page\Medium\$this
Allows to set the video's poster image
public reset() : \Grav\Common\Page\Medium\$this
Reset medium.
public resize(int $width=null, int $height=null) : \Grav\Common\Page\Medium\$this
Resize media by setting attributes
protected sourceParsedownElement(array $attributes, bool/boolean $reset=true) : array
Parsedown element for source display mode

This class extends \Grav\Common\Page\Medium\Medium

This class implements \Grav\Common\Media\Interfaces\MediaObjectInterface, \Grav\Common\Page\Medium\RenderableInterface, \Grav\Common\Data\DataInterface, \ArrayAccess, \Countable, \RocketTheme\Toolbox\ArrayTraits\ExportInterface


Class: \Grav\Common\Page\Medium\MediumFactory

Visibility Function
public static fromArray(array $items=array(), \Grav\Common\Page\Medium\Blueprint/null/\Grav\Common\Data\Blueprint $blueprint=null) : \Grav\Common\Page\Medium\Medium
Create Medium from array of parameters
public static fromFile(string $file, array $params=array()) : \Grav\Common\Page\Medium\Medium
Create Medium from a file
public static scaledFromMedium(\Grav\Common\Page\Medium\ImageMedium $medium, int $from, int $to) : \Grav\Common\Page\Medium\Medium/array
Create a new ImageMedium by scaling another ImageMedium object.


Visibility Function
public __call(string $method, mixed $args) : mixed
Forward the call to the source element
public __construct(array $attributes, \Grav\Common\Page\Medium\Medium $medium) : void
Construct.
public html(string $title=null, string $alt=null, string $class=null, string $id=null, bool $reset=true) : string
Return HTML markup from the medium.
public parsedownElement(string $title=null, string $alt=null, string $class=null, string $id=null, bool/boolean $reset=true) : array
Get an element (is array) that can be rendered by the Parsedown engine

This class implements \Grav\Common\Page\Medium\RenderableInterface


Class: \Grav\Common\Page\Medium\ImageFile

Visibility Function
public __destruct() : void
public cacheFile(string $type='jpg', int $quality=80, bool $actual=false) : string
This is the same as the Gregwar Image class except this one fires a Grav Event on creation of new cached file
public clearOperations() : void
Clear previously applied operations

This class extends \Gregwar\Image\Image


Class: \Grav\Common\Page\Medium\Medium

Visibility Function
public __call(string $method, mixed $args) : \Grav\Common\Page\Medium\$this
Allow any action to be called on this medium from twig or markdown
public __clone() : void
public __construct(array $items=array(), \Grav\Common\Data\Blueprint $blueprint=null) : void
Construct.
public __toString() : string
Return string representation of the object (html).
public addAlternative(mixed $ratio, \Grav\Common\Page\Medium\Medium $alternative) : void
Add alternative Medium to this Medium.
public addMetaFile(mixed $filepath) : void
Add meta file for the medium.
public classes() : \Grav\Common\Page\Medium\$this
Add a class to the element from Markdown or Twig Example: Example or Example
public copy() : \Grav\Common\Page\Medium\Medium
Create a copy of this media object
public display(string $mode='source') : \Grav\Common\Page\Medium\$this
Switch display mode.
public exists() : bool
Check if this medium exists or not
public html(string $title=null, string $alt=null, string $class=null, string $id=null, bool $reset=true) : string
Return HTML markup from the medium.
public id(mixed $id) : \Grav\Common\Page\Medium\$this
Add an id to the element from Markdown or Twig Example: Example
public lightbox(int $width=null, int $height=null, bool/boolean $reset=true) : \Grav\Common\Page\Medium\Link
Turn the current Medium into a Link with lightbox enabled
public link(bool/boolean $reset=true, array $attributes=array()) : \Grav\Common\Page\Medium\Link
Turn the current Medium into a Link
public meta() : \Grav\Common\Data\Data
Return just metadata from the Medium object
public metadata() : array
Returns an array containing just the metadata
public parsedownElement(string $title=null, string $alt=null, string $class=null, string $id=null, bool/boolean $reset=true) : array
Get an element (is array) that can be rendered by the Parsedown engine
public path(bool $reset=true) : string path to file
Return PATH to file.
public querystring(string $querystring=null, bool/boolean $withQuestionmark=true) : string
Get/set querystring for the file's url
public relativePath(bool $reset=true) : mixed
Return the relative path to file
public reset() : \Grav\Common\Page\Medium\$this
Reset medium.
public style(string $style) : \Grav\Common\Page\Medium\$this
Allows to add an inline style attribute from Markdown or Twig Example: Example
public thumbnail(string $type='auto') : \Grav\Common\Page\Medium\$this
Switch thumbnail.
public thumbnailExists(string $type='page') : bool
Helper method to determine if this media item has a thumbnail or not
public url(bool $reset=true) : string
Return URL to file.
public urlHash(string $hash=null, bool/boolean $withHash=true) : string
Get/set hash for the file's url
protected getThumbnail() : \Grav\Common\Page\Medium\ThumbnailImageMedium
Get the thumbnail Medium object
protected sourceParsedownElement(array $attributes, bool/boolean $reset=true) : array
Parsedown element for source display mode
protected textParsedownElement(array $attributes, bool/boolean $reset=true) : array
Parsedown element for text display mode

This class extends \Grav\Common\Data\Data

This class implements \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \Countable, \ArrayAccess, \Grav\Common\Data\DataInterface, \Grav\Common\Page\Medium\RenderableInterface, \Grav\Common\Media\Interfaces\MediaObjectInterface


Class: \Grav\Common\Page\Medium\AudioMedium

Visibility Function
public autoplay(bool $status=false) : \Grav\Common\Page\Medium\$this
Allows to set the autoplay attribute
public controls(bool $display=true) : \Grav\Common\Page\Medium\$this
Allows to set or remove the HTML5 default controls
public controlsList(mixed $controlsList) : \Grav\Common\Page\Medium\$this
Allows to set the controlsList behaviour Separate multiple values with a hyphen
public loop(bool $status=false) : \Grav\Common\Page\Medium\$this
Allows to set the loop attribute
public muted(bool $status=false) : \Grav\Common\Page\Medium\$this
Allows to set the muted attribute
public preload(mixed $preload) : \Grav\Common\Page\Medium\$this
Allows to set the preload behaviour
public reset() : \Grav\Common\Page\Medium\$this
Reset medium.
public resize(int $width=null, int $height=null) : \Grav\Common\Page\Medium\$this
Resize media by setting attributes
protected sourceParsedownElement(array $attributes, bool/boolean $reset=true) : array
Parsedown element for source display mode

This class extends \Grav\Common\Page\Medium\Medium

This class implements \Grav\Common\Media\Interfaces\MediaObjectInterface, \Grav\Common\Page\Medium\RenderableInterface, \Grav\Common\Data\DataInterface, \ArrayAccess, \Countable, \RocketTheme\Toolbox\ArrayTraits\ExportInterface


Class: \Grav\Common\Page\Medium\ImageMedium

Visibility Function
public __call(string $method, mixed $args) : \Grav\Common\Page\Medium\$this/mixed
Forward the call to the image processing method.
public __clone() : void
public __construct(array $items=array(), \Grav\Common\Data\Blueprint $blueprint=null) : void
Construct.
public __destruct() : void
public addMetaFile(mixed $filepath) : \Grav\Common\Page\Medium\$this
Add meta file for the medium.
public cache() : \Grav\Common\Page\Medium\$this
Simply processes with no extra methods. Useful for triggering events.
public clearAlternatives() : void
Clear out the alternatives
public derivatives(int/int[] $min_width, mixed $max_width=2500, mixed $step=200) : \Grav\Common\Page\Medium\$this
Generate alternative image widths, using either an array of integers, or a min width, a max width, and a step parameter to fill out the necessary widths. Existing image alternatives won't be overwritten.
public filter(string $filter='image.filters.default') : void
Filter image by using user defined filter parameters.
public format(string $format) : \Grav\Common\Page\Medium\$this
Sets image output format.
public getImagePrettyName() : mixed
public height(string/mixed $value='auto') : \Grav\Common\Page\Medium\$this
Allows to set the height attribute from Markdown or Twig Examples: Example Example Example Example {{ page.media['myimg.png'].width().height().html }} {{ page.media['myimg.png'].resize(100,200).width(100).height(200).html }}
public higherQualityAlternative() : ImageMedium the alternative version with higher quality
Return the image higher quality version
public lightbox(int $width=null, int $height=null, bool/boolean $reset=true) : \Grav\Common\Page\Medium\Link
Turn the current Medium into a Link with lightbox enabled
public link(bool/boolean $reset=true, array $attributes=array()) : \Grav\Common\Page\Medium\Link
Turn the current Medium into a Link
public path(bool $reset=true) : string path to image
Return PATH to image.
public quality(int $quality=null) : \Grav\Common\Page\Medium\Medium
Sets or gets the quality of the image
public reset() : \Grav\Common\Page\Medium\$this
Reset image.
public setImagePrettyName(mixed $name) : void
Allows the ability to override the Inmage's Pretty name stored in cache
public sizes(string $sizes=null) : string
Set or get sizes parameter for srcset media action
public sourceParsedownElement(array $attributes, bool/boolean $reset=true) : array
Parsedown element for source display mode
public srcset(bool $reset=true) : string
Return srcset string for this Medium and its alternatives.
public url(bool $reset=true) : string
Return URL to image.
public width(string/mixed $value='auto') : \Grav\Common\Page\Medium\$this
Allows to set the width attribute from Markdown or Twig Examples: Example Example Example Example {{ page.media['myimg.png'].width().height().html }} {{ page.media['myimg.png'].resize(100,200).width(100).height(200).html }}
protected image() : \Grav\Common\Page\Medium\$this
Gets medium image, resets image manipulation operations.
protected saveImage() : string
Save the image with cache.

This class extends \Grav\Common\Page\Medium\Medium

This class implements \Grav\Common\Media\Interfaces\MediaObjectInterface, \Grav\Common\Page\Medium\RenderableInterface, \Grav\Common\Data\DataInterface, \ArrayAccess, \Countable, \RocketTheme\Toolbox\ArrayTraits\ExportInterface


Interface: \Grav\Common\Page\Medium\RenderableInterface

Visibility Function
public html(string $title=null, string $alt=null, string $class=null, bool $reset=true) : string
Return HTML markup from the medium.
public parsedownElement(string $title=null, string $alt=null, string $class=null, string $id=null, bool $reset=true) : string
Return Parsedown Element from the medium.


Class: \Grav\Common\Page\Medium\GlobalMedia

Visibility Function
public offsetExists(mixed $offset) : bool
public offsetGet(mixed $offset) : mixed
protected addMedium(string $stream) : \Grav\Common\Page\Medium\Medium/null
protected resolveStream(string $filename) : string/null

This class extends \Grav\Common\Page\Medium\AbstractMedia

This class implements \Grav\Common\Media\Interfaces\MediaCollectionInterface, \ArrayAccess, \Countable


Class: \Grav\Common\Page\Medium\StaticImageMedium

Visibility Function
public resize(int $width=null, int $height=null) : \Grav\Common\Page\Medium\$this
Resize media by setting attributes
protected sourceParsedownElement(array $attributes, bool/boolean $reset=true) : array
Parsedown element for source display mode

This class extends \Grav\Common\Page\Medium\Medium

This class implements \Grav\Common\Media\Interfaces\MediaObjectInterface, \Grav\Common\Page\Medium\RenderableInterface, \Grav\Common\Data\DataInterface, \ArrayAccess, \Countable, \RocketTheme\Toolbox\ArrayTraits\ExportInterface


Class: \Grav\Common\Page\Medium\AbstractMedia (abstract)

Visibility Function
public __invoke(string $filename) : mixed
Call object as function to get medium by filename.
public all() : array/\Grav\Common\Page\Medium\MediaObjectInterface[]
Get a list of all media.
public audios() : array/\Grav\Common\Page\Medium\MediaObjectInterface[]
Get a list of all audio media.
public files() : array/\Grav\Common\Page\Medium\MediaObjectInterface[]
Get a list of all file media.
public get(string $filename) : \Grav\Common\Page\Medium\Medium/null
Get medium by filename.
public images() : array/\Grav\Common\Page\Medium\MediaObjectInterface[]
Get a list of all image media.
public offsetGet(mixed $offset) : mixed
public videos() : array/\Grav\Common\Page\Medium\MediaObjectInterface[]
Get a list of all video media.
protected add(string $name, \Grav\Common\Page\Medium\MediaObjectInterface $file) : void
protected getFileParts(string $filename) : array
Get filename, extension and meta part.
protected orderMedia(mixed $media) : array
Order the media based on the page's media_order

This class extends \Grav\Common\Getters

This class implements \Countable, \ArrayAccess, \Grav\Common\Media\Interfaces\MediaCollectionInterface


Class: \Grav\Common\Page\Medium\ThumbnailImageMedium

Visibility Function
public display(string $mode='source') : \Grav\Common\Page\Medium\$this
Switch display mode.
public html(string $title=null, string $alt=null, string $class=null, string $id=null, bool $reset=true) : string
Return HTML markup from the medium.
public lightbox(int $width=null, int $height=null, bool/boolean $reset=true) : \Grav\Common\Page\Medium\Link
Turn the current Medium into a Link with lightbox enabled
public link(bool/boolean $reset=true, array $attributes=array()) : \Grav\Common\Page\Medium\Link
Turn the current Medium into a Link
public parsedownElement(string $title=null, string $alt=null, string $class=null, string $id=null, bool/boolean $reset=true) : array
Get an element (is array) that can be rendered by the Parsedown engine
public srcset(bool $reset=true) : string
Return srcset string for this Medium and its alternatives.
public thumbnail(string $type='auto') : \Grav\Common\Page\Medium\$this
Switch thumbnail.
protected bubble(string $method, array $arguments=array(), bool/boolean $testLinked=true) : \Grav\Common\Page\Medium\Medium
Bubble a function call up to either the superclass function or the parent Medium instance

This class extends \Grav\Common\Page\Medium\ImageMedium

This class implements \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \Countable, \ArrayAccess, \Grav\Common\Data\DataInterface, \Grav\Common\Page\Medium\RenderableInterface, \Grav\Common\Media\Interfaces\MediaObjectInterface


Class: \Grav\Common\Processors\ConfigurationProcessor

Visibility Function
public process() : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\ErrorsProcessor

Visibility Function
public process() : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\ProcessorBase (abstract)

Visibility Function
public __construct(\Grav\Common\Grav $container) : void


Class: \Grav\Common\Processors\SiteSetupProcessor

Visibility Function
public process() : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\TasksProcessor

Visibility Function
public process() : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\PluginsProcessor

Visibility Function
public process() : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\TwigProcessor

Visibility Function
public process() : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\DebuggerAssetsProcessor

Visibility Function
public process() : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\InitializeProcessor

Visibility Function
public process() : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\DebuggerInitProcessor

Visibility Function
public process() : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\AssetsProcessor

Visibility Function
public process() : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\ThemesProcessor

Visibility Function
public process() : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\RenderProcessor

Visibility Function
public process() : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Grav\Common\Processors\ProcessorInterface


Interface: \Grav\Common\Processors\ProcessorInterface

Visibility Function
public process() : void


Class: \Grav\Common\Processors\PagesProcessor

Visibility Function
public process() : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Service\SessionServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\ErrorServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\PageServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\TaskServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\AssetsServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\ConfigServiceProvider

Visibility Function
public static blueprints(\Pimple\Container $container) : void
public static languages(\Pimple\Container $container) : void
public static load(\Pimple\Container $container) : \Grav\Common\Config\Config
public register(\Pimple\Container $container) : void
public static setup(\Pimple\Container $container) : void

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\StreamsServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \RocketTheme\Toolbox\DI\ServiceProviderInterface, \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\OutputServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\LoggerServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Twig\TwigExtension

Visibility Function
public __construct() : void
TwigExtension constructor.
public absoluteUrlFilter(mixed $string) : mixed
public arrayFilter(mixed $input) : array
Casts input to array.
public arrayIntersectFunc(mixed $array1, mixed $array2) : array
Wrapper for array_intersect() method
public arrayKeyValueFunc(string $key, string $val, array $current_array=null) : array
Workaround for twig associative array initialization Returns a key => val array
public authorize(string/array $action) : bool Returns TRUE if the user is authorized to perform the action, FALSE otherwise.
Authorize an action. Returns true if the user is logged in and has the right to execute $action. entry can be a string like 'group.action' or without dot notation an associative array.
public base32DecodeFilter(mixed $str) : bool/string
Return Base32 decoded string
public base32EncodeFilter(mixed $str) : string
Return Base32 encoded string
public base64DecodeFilter(mixed $str) : bool/string
Return Base64 decoded string
public base64EncodeFilter(mixed $str) : string
Return Base64 encoded string
public bodyClassFunc(mixed $classes) : string
takes an array of classes, and if they are not set on body_classes look to see if they are set in theme config
public boolFilter(mixed $input) : bool
Casts input to bool.
public chunkSplitFilter(mixed $value, mixed $chars, string $split='-') : string
Wrapper for chunk_split() function
public containsFilter(String $haystack, String $needle) : boolean
determine if a string contains another
public definedDefaultFilter(mixed $value, null $default=null) : null
public dump(\Twig_Environment $env, mixed $context) : void
Based on Twig_Extension_Debug / twig_var_dump (c) 2011 Fabien Potencier
public endsWithFilter(mixed $haystack, mixed $needle) : bool
public evaluateStringFunc(mixed $context, mixed $string) : mixed
This function will evaluate a $string through the $environment, and return its results.
public evaluateTwigFunc(array $context, string $twig) : mixed
This function will evaluate Twig $twig through the $environment, and return its results.
public exifFunc(mixed $image, bool $raw=false) : mixed
Get's the Exif data for a file
public fieldNameFilter(string $str) : string
Filters field name by changing dot notation into array notation.
public floatFilter(mixed $input) : float
Casts input to float.
public getCookie(string $key) : mixed
Used to retrieve a cookie value
public getFilters() : array
Return a list of all filters.
public getFunctions() : array
Return a list of all functions.
public getGlobals() : array
Register some standard globals
public getTokenParsers() : array
public gistFunc(string $id, bool/string/bool $file=false) : string
Output a Gist
public inflectorFilter(string $action, string $data, int $count=null) : mixed
Inflector supports following notations: {{ 'person'|pluralize }} => people {{ 'shoes'|singularize }} => shoe {{ 'welcome page'|titleize }} => "Welcome Page" {{ 'send_email'|camelize }} => SendEmail {{ 'CamelCased'|underscorize }} => camel_cased {{ 'Something Text'|hyphenize }} => something-text {{ 'something_text_to_read'|humanize }} => "Something text to read" {{ '181'|monthize }} => 5 {{ '10'|ordinalize }} => 10th
public intFilter(mixed $input) : int
Casts input to int.
public isAjaxFunc() : true if HTTP_X_REQUESTED_WITH exists and has been set to xmlhttprequest
Check if HTTP_X_REQUESTED_WITH has been set to xmlhttprequest, in which case we may unsafely assume ajax. Non critical use only.
public jsonDecodeFilter(string $str, bool $assoc=false, int $depth=512, int $options) : array
Decodes string from JSON.
public ksortFilter(array $array) : array
Return ksorted collection.
public ltrimFilter(mixed $value, null $chars=null) : string
public markdownFunction(mixed $string, bool $block=true) : mixed/string
public md5Filter(string $str) : string
Return MD5 hash from the input.
public mediaDirFunc(mixed $media_dir) : \Grav\Common\Twig\Media/null
Process a folder as Media and return a media object
public modulusFilter(string/int $number, int $divider, array $items=null) : int
Returns the modulus of an integer
public niceFilesizeFunc(mixed $bytes) : string
Returns a nicer more readable filesize based on bytes
public niceNumberFunc(int/float $n) : bool/string
Returns a nicer more readable number
public nicetimeFunc(mixed $date, bool/mixed $long_strings=true) : boolean
displays a facebook style 'time ago' formatted date/time
public nonceFieldFunc(string $action, string $nonceParamName='nonce') : string the nonce input field
Used to add a nonce to a form. Call {{ nonce_field('action') }} specifying a string representing the action. For maximum protection, ensure that the string representing the action is as specific as possible
public static padFilter(mixed $input, mixed $pad_length, string $pad_string=' ', int $pad_type=1) : string
Pad a string to a certain length with another string
public pageHeaderVarFunc(mixed $var, null $pages=null) : mixed
Look for a page header variable in an array of pages working its way through until a value is found
public randomStringFunc(int $count=5) : string
Generate a random string
public randomizeFilter(array $original, int $offset) : array
Returns array in a random order.
public rangeFunc(int $start, int $end=100, int $step=1) : array
Generates an array containing a range of elements, optionally stepped
public readFileFunc(mixed $filepath) : bool/string
Simple function to read a file based on a filepath and output it
public redirectFunc(string $url, int $statusCode=303) : void
redirect browser from twig
public regexFilter(mixed $array, mixed $regex, int $flags) : array
Twig wrapper for PHP's preg_grep method
public regexReplace(mixed $subject, mixed $pattern, mixed $replace, int $limit=-1) : mixed the resulting content
Twig wrapper for PHP's preg_replace method
public repeatFunc(string $input, int $multiplier) : string
Repeat given string x times.
public rtrimFilter(mixed $value, null $chars=null) : string
public safeEmailFilter(string $str) : string
Protects email address.
public sortByKeyFilter(array $input, string $filter, int $direction=4, int $sort_flags) : array
Sorts a collection by key
public startsWithFilter(mixed $haystack, mixed $needle) : bool
public stringFilter(mixed $input) : string
Casts input to string.
public stringFunc(mixed $value) : string
Returns a string from a value. If the value is array, return it json encoded
public themeVarFunc(mixed $var, bool $default=null) : string
Get a theme variable
public translate() : mixed
public translateArray(mixed $key, mixed $index, null $lang=null) : mixed
public translateFunc() : string
Translate a string
public translateLanguage(mixed $args, array/null/array $languages=null, bool $array_support=false, bool $html_out=false) : mixed
Translate Strings
public urlFunc(string $input, bool $domain=false) : string/null Returns url to the resource or null if resource was not found.
Return URL to the resource.
public vardumpFunc(mixed $var) : void
Dump a variable to the browser
public xssFunc(mixed $data) : bool/string/array
Allow quick check of a string for XSS Vulnerabilities
public yamlDecodeFilter(mixed $data) : mixed
Decode/Parse data from YAML format
public yamlEncodeFilter(mixed $data, mixed $inline=10) : mixed
Dump/Encode data into YAML format
Examples of TwigExtension::urlFunc()
{{ url('theme://images/logo.png')|default('http://www.placehold.it/150x100/f4f4f4') }}

This class extends \Twig\Extension\AbstractExtension

This class implements \Twig\Extension\ExtensionInterface, \Twig\Extension\GlobalsInterface


Class: \Grav\Common\Twig\Twig

Visibility Function
public __construct(\Grav\Common\Grav $grav) : void
Constructor
public addPath(mixed $template_path, string/null $namespace='__main__') : void
Wraps the Twig_Loader_Filesystem addPath method (should be used only in onTwigLoader() event
public init() : void
Twig initialization that sets the twig loader chain, then the environment, then extensions and also the base set of twig vars
public loader() : \Twig_Loader_Filesystem
public prependPath(mixed $template_path, string/null $namespace='__main__') : void
Wraps the Twig_Loader_Filesystem prependPath method (should be used only in onTwigLoader() event
public processPage(\Grav\Common\Page\Page $item, string $content=null) : string The rendered output
Twig process that renders a page item. It supports two variations: 1) Handles modular pages by rendering a specific page based on its modular twig template 2) Renders individual page items for twig processing before the site rendering
public processSite(string $format=null, array $vars=array()) : string the rendered output
Twig process that renders the site layout. This is the main twig process that renders the overall page and handles all the layout for the site display.
public processString(string $string, array $vars=array()) : string
Process a Twig template directly by using a Twig string and optional array of variables
public processTemplate(string $template, array $vars=array()) : string
Process a Twig template directly by using a template name and optional array of variables
public setAutoescape(boolean $state) : void
DEPRECATED - 1.5
public setTemplate(string $name, string $template) : void
Adds or overrides a template.
public template(string $template) : string the template name
Simple helper method to get the twig template if it has already been set, else return the one being passed in
public twig() : \Twig_Environment


Class: \Grav\Common\Twig\TwigEnvironment

Visibility Function
protected writeCacheFile(mixed $file, mixed $content) : void
This exists so template cache files use the same group between apache and cli

This class extends \Twig\Environment


Class: \Grav\Common\Twig\Node\TwigNodeMarkdown

Visibility Function
public __construct(\Twig_Node $body, mixed $lineno, string $tag='markdown') : void
public compile(\Twig_Compiler $compiler) : void
Compiles the node to PHP.

This class extends \Twig\Node\Node

This class implements \Countable, \IteratorAggregate, \Traversable, \Twig_NodeInterface, \Twig\Node\NodeOutputInterface


Class: \Grav\Common\Twig\Node\TwigNodeTryCatch

Visibility Function
public __construct(\Twig_Node $try, \Twig_Node $catch=null, mixed $lineno, mixed $tag=null) : void
public compile(\Twig_Compiler $compiler) : void
Compiles the node to PHP.

This class extends \Twig\Node\Node

This class implements \Countable, \IteratorAggregate, \Traversable, \Twig_NodeInterface


Class: \Grav\Common\Twig\Node\TwigNodeScript

Visibility Function
public __construct(\Twig_Node/null/\Twig_Node $body=null, \Twig_Node_Expression/null/\Twig_Node_Expression $file=null, \Twig_Node_Expression/null/\Twig_Node_Expression $group=null, \Twig_Node_Expression/null/\Twig_Node_Expression $priority=null, \Twig_Node_Expression/null/\Twig_Node_Expression $attributes=null, int $lineno, string/null $tag=null) : void
TwigNodeScript constructor.
public compile(\Twig_Compiler $compiler) : void
Compiles the node to PHP.

This class extends \Twig\Node\Node

This class implements \Countable, \IteratorAggregate, \Traversable, \Twig_NodeInterface, \Twig\Node\NodeCaptureInterface


Class: \Grav\Common\Twig\Node\TwigNodeStyle

Visibility Function
public __construct(\Twig_Node/null/\Twig_Node $body=null, \Twig_Node_Expression $file=null, \Twig_Node_Expression $group=null, \Twig_Node_Expression $priority=null, \Twig_Node_Expression/null/\Twig_Node_Expression $attributes=null, int $lineno, null $tag=null) : void
TwigNodeAssets constructor.
public compile(\Twig_Compiler $compiler) : void
Compiles the node to PHP.

This class extends \Twig\Node\Node

This class implements \Countable, \IteratorAggregate, \Traversable, \Twig_NodeInterface, \Twig\Node\NodeCaptureInterface


Class: \Grav\Common\Twig\Node\TwigNodeSwitch

Visibility Function
public __construct(\Twig_Node $value, \Twig_Node $cases, \Twig_Node $default=null, mixed $lineno, mixed $tag=null) : void
public compile(\Twig_Compiler $compiler) : void
Compiles the node to PHP.

This class extends \Twig\Node\Node

This class implements \Countable, \IteratorAggregate, \Traversable, \Twig_NodeInterface


Class: \Grav\Common\Twig\TokenParser\TwigTokenParserTryCatch

Handles try/catch in template file.

 {% try %} 
  • {{ user.get('name') }}
  • {% catch %} {{ e.message }} {% endcatch %}
    Visibility Function
    public decideCatch(\Twig_Token $token) : void
    public decideEnd(\Twig_Token $token) : void
    public getTag() : string The tag name
    Gets the tag name associated with this token parser.
    public parse(\Twig_Token $token) : \Twig_Node A Twig_Node instance
    Parses a token and returns a node.

    This class extends \Twig\TokenParser\AbstractTokenParser

    This class implements \Twig\TokenParser\TokenParserInterface


    Class: \Grav\Common\Twig\TokenParser\TwigTokenParserSwitch

    Adds ability use elegant switch instead of ungainly if statements {% switch type %} {% case 'foo' %} {{ my_data.foo }} {% case 'bar' %} {{ my_data.bar }} {% default %} {{ my_data.default }} {% endswitch %}

    Visibility Function
    public decideIfEnd(\Twig_Token $token) : bool
    Decide if current token marks end of swtich block.
    public decideIfFork(\Twig_Token $token) : bool
    Decide if current token marks switch logic.
    public getTag() : mixed
    public parse(\Twig_Token $token) : void

    This class extends \Twig\TokenParser\AbstractTokenParser

    This class implements \Twig\TokenParser\TokenParserInterface


    Class: \Grav\Common\Twig\TokenParser\TwigTokenParserScript

    Adds a script to head/bottom/custom location in the document. {% script 'theme://js/something.js' priority: 20 with { defer: true, async: true } %} {% script in 'bottom' priority: 20 %} alert('Warning!'); {% endscript %}

    Visibility Function
    public decideBlockEnd(\Twig_Token $token) : bool
    public getTag() : string The tag name
    Gets the tag name associated with this token parser.
    public parse(\Twig_Token $token) : \Twig_Node A Twig_Node instance
    Parses a token and returns a node.
    protected parseArguments(\Twig_Token $token) : array

    This class extends \Twig\TokenParser\AbstractTokenParser

    This class implements \Twig\TokenParser\TokenParserInterface


    Class: \Grav\Common\Twig\TokenParser\TwigTokenParserMarkdown

    Adds ability to inline markdown between tags. {% markdown %} This is bold and this underlined 1. This is a bullet list 2. This is another item in that same list {% endmarkdown %}

    Visibility Function
    public decideMarkdownEnd(\Twig_Token $token) : bool
    Decide if current token marks end of Markdown block.
    public getTag() : mixed
    public parse(\Twig_Token $token) : void

    This class extends \Twig\TokenParser\AbstractTokenParser

    This class implements \Twig\TokenParser\TokenParserInterface


    Class: \Grav\Common\Twig\TokenParser\TwigTokenParserStyle

    Adds a style to the document. {% style 'theme://css/foo.css' priority: 20 %} {% style priority: 20 with { media: 'screen' } %} a { color: red; } {% endstyle %}

    Visibility Function
    public decideBlockEnd(\Twig_Token $token) : bool
    public getTag() : string The tag name
    Gets the tag name associated with this token parser.
    public parse(\Twig_Token $token) : \Twig_Node A Twig_Node instance
    Parses a token and returns a node.
    protected parseArguments(\Twig_Token $token) : array

    This class extends \Twig\TokenParser\AbstractTokenParser

    This class implements \Twig\TokenParser\TokenParserInterface


    Class: \Grav\Common\User\Group

    Visibility Function
    public static groupExists(string $groupname) : bool
    Checks if a group exists
    public static groupNames() : array
    Get the groups list
    public static load(string $groupname) : object
    Get a group by name
    public static remove(string $groupname) : bool True if the action was performed
    Remove a group
    public save() : void
    Save a group

    This class extends \Grav\Common\Data\Data

    This class implements \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \Countable, \ArrayAccess, \Grav\Common\Data\DataInterface


    Class: \Grav\Common\User\Authentication (abstract)

    Visibility Function
    public static create(string $password) : string/bool
    Create password hash from plaintext password.
    public static verify(string $password, string $hash) : int Returns if the check fails, 1 if password matches, 2 if hash needs to be updated.
    Verifies that a password matches a hash.


    Class: \Grav\Common\User\User

    Visibility Function
    public __sleep() : void
    Serialize user.
    public __wakeup() : void
    Unserialize user.
    public authenticate(string $password) : bool
    Authenticate user. If user password needs to be updated, new information will be saved.
    public authorise(string $action) : bool
    DEPRECATED - use authorize()
    public authorize(string $action) : bool
    Checks user authorization to the action.
    public avatarUrl() : string
    Return the User's avatar URL
    public static find(string $query, array $fields=array()) : \Grav\Common\User\User
    Find a user by username, email, etc
    public static load(string $username) : \Grav\Common\User\User
    Load user account. Always creates user object. To check if user exists, use $this->exists().
    public offsetExists(string $offset) : bool
    public offsetGet(string $offset) : mixed
    public static remove(string $username) : bool True if the action was performed
    Remove user account.
    public save() : void
    Save user without the username

    This class extends \Grav\Common\Data\Data

    This class implements \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \Countable, \ArrayAccess, \Grav\Common\Data\DataInterface


    Class: \Grav\Console\ConsoleCommand

    Visibility Function
    public clearCache(array $all=array()) : int
    public composerUpdate(mixed $path, string $action='install') : void
    public static getGrav() : \Grav\Common\Grav
    public isGravInstance(mixed $path) : bool
    public loadLocalConfig() : mixed string the local config file name. false if local config does not exist
    Load the local config file
    public setupConsole(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output) : void
    Set colors style definition for the formatter.
    protected displayGPMRelease() : void
    protected execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output) : int/null/void
    protected serve() : void

    This class extends \Symfony\Component\Console\Command\Command


    Class: \Grav\Console\Cli\SecurityCommand

    Visibility Function
    public outputProgress(mixed $args) : void
    protected configure() : void
    protected serve() : int/null/void

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Cli\InstallCommand

    Visibility Function
    protected configure() : void
    protected serve() : int/null/void

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Cli\ComposerCommand

    Visibility Function
    protected configure() : void
    protected serve() : int/null/void

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Cli\CleanCommand

    Visibility Function
    public setupConsole(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output) : void
    Set colors style definition for the formatter.
    protected configure() : void
    protected execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output) : int/null/void

    This class extends \Symfony\Component\Console\Command\Command


    Class: \Grav\Console\Cli\SandboxCommand

    Visibility Function
    protected configure() : void
    protected serve() : int/null/void

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Cli\ClearCacheCommand

    Visibility Function
    protected configure() : void
    protected serve() : int/null/void

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Cli\BackupCommand

    Visibility Function
    public output(mixed $args) : void
    protected configure() : void
    protected serve() : int/null/void

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Cli\NewProjectCommand

    Visibility Function
    protected configure() : void
    protected serve() : int/null/void

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Gpm\InfoCommand

    Visibility Function
    protected configure() : void
    protected serve() : int/null/void

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Gpm\InstallCommand

    Visibility Function
    public askConfirmationIfMajorVersionUpdated(mixed $package) : void
    If the package is updated from an older major release, show warning and ask confirmation
    public installDependencies(array $dependencies, string $type, string $message, bool $required=true) : void
    Given a $dependencies list, filters their type according to $type and shows $message prior to listing them to the user. Then asks the user a confirmation prior to installing them.
    public progress(mixed $progress) : void
    public setGpm(mixed $gpm) : void
    Allows to set the GPM object, used for testing the class
    protected configure() : void
    protected serve() : bool

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Gpm\UninstallCommand

    Visibility Function
    protected configure() : void
    protected serve() : int/null/void

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Gpm\VersionCommand

    Visibility Function
    protected configure() : void
    protected serve() : int/null/void

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Gpm\UpdateCommand

    Visibility Function
    protected configure() : void
    protected serve() : int/null/void

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Gpm\DirectInstallCommand

    Visibility Function
    protected configure() : void
    protected serve() : bool

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Gpm\IndexCommand

    Visibility Function
    public filter(mixed $data) : mixed
    public sort(mixed $packages) : void
    protected configure() : void
    protected serve() : int/null/void

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Gpm\SelfupgradeCommand

    Visibility Function
    public formatBytes(mixed $size, int $precision=2) : string
    public progress(mixed $progress) : void
    protected configure() : void
    protected serve() : int/null/void

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\TerminalObjects\Table

    Visibility Function
    public result() : void

    This class extends \League\CLImate\TerminalObject\Basic\Table

    This class implements \League\CLImate\TerminalObject\Basic\BasicTerminalObjectInterface


    Class: \Grav\Framework\Cache\AbstractCache (abstract)

    Cache trait for PSR-16 compatible "Simple Cache" implementation

    Visibility Function
    public __construct(string $namespace='', null/int/\DateInterval $defaultLifetime=null) : void
    public abstract clear() : bool True on success and false on failure.
    Wipes clean the entire cache's keys.
    public abstract delete(string $key) : bool True if the item was successfully removed. False if there was an error.
    Delete an item from the cache by its unique key.
    public abstract deleteMultiple(\Psr\SimpleCache\iterable $keys) : bool True if the items were successfully removed. False if there was an error.
    Deletes multiple cache items in a single operation.
    public abstract doClear() : void
    public abstract doDelete(mixed $key) : void
    public doDeleteMultiple(array $keys) : bool
    public abstract doGet(mixed $key, mixed $miss) : void
    public doGetMultiple(array $keys, mixed $miss) : array
    public abstract doHas(mixed $key) : void
    public abstract doSet(mixed $key, mixed $value, mixed $ttl) : void
    public doSetMultiple(array $values, int $ttl) : bool
    public abstract get(string $key, mixed $default=null) : mixed The value of the item from the cache, or $default in case of cache miss.
    Fetches a value from the cache.
    public abstract getMultiple(\Psr\SimpleCache\iterable $keys, mixed $default=null) : iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value.
    Obtains multiple cache items by their unique keys.
    public abstract has(string $key) : bool
    Determines whether an item is present in the cache. NOTE: It is recommended that has() is only to be used for cache warming type purposes and not to be used within your live applications operations for get/set, as this method is subject to a race condition where your has() will return true and immediately after, another script can remove it making the state of your app out of date.
    public abstract set(string $key, mixed $value, null/int/\DateInterval $ttl=null) : bool True on success and false on failure.
    Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time. the driver supports TTL then the library may set a default value for it or let the driver take care of that.
    public abstract setMultiple(\Psr\SimpleCache\iterable $values, null/int/\DateInterval $ttl=null) : bool True on success and false on failure.
    Persists a set of key => value pairs in the cache, with an optional TTL. the driver supports TTL then the library may set a default value for it or let the driver take care of that.
    public setValidation(mixed $validation) : void
    protected convertTtl(null/int/\DateInterval $ttl) : int/null
    protected getDefaultLifetime() : int/null
    protected getNamespace() : string
    protected init(string $namespace='', null/int/\DateInterval $defaultLifetime=null) : void
    Always call from constructor.
    protected validateKey(string $key) : void
    protected validateKeys(array $keys) : void

    This class implements \Grav\Framework\Cache\CacheInterface, \Psr\SimpleCache\CacheInterface


    Interface: \Grav\Framework\Cache\CacheInterface

    PSR-16 compatible "Simple Cache" interface.

    Visibility Function
    public doClear() : void
    public doDelete(mixed $key) : void
    public doDeleteMultiple(mixed $keys) : void
    public doGet(mixed $key, mixed $miss) : void
    public doGetMultiple(mixed $keys, mixed $miss) : void
    public doHas(mixed $key) : void
    public doSet(mixed $key, mixed $value, mixed $ttl) : void
    public doSetMultiple(mixed $values, mixed $ttl) : void

    This class implements \Psr\SimpleCache\CacheInterface


    Class: \Grav\Framework\Cache\Adapter\FileCache

    Cache class for PSR-16 compatible "Simple Cache" implementation using file backend. Defaults to 1 year TTL. Does not support unlimited TTL.

    Visibility Function
    public __construct(string $namespace='', null/int/\DateInterval $defaultLifetime=null) : void
    public __destruct() : void
    public clear() : bool True on success and false on failure.
    Wipes clean the entire cache's keys.
    public delete(string $key) : bool True if the item was successfully removed. False if there was an error.
    Delete an item from the cache by its unique key.
    public deleteMultiple(\Psr\SimpleCache\iterable $keys) : bool True if the items were successfully removed. False if there was an error.
    Deletes multiple cache items in a single operation.
    public doClear() : void
    public doDelete(mixed $key) : void
    public doGet(mixed $key, mixed $miss) : void
    public doHas(mixed $key) : void
    public doSet(mixed $key, mixed $value, mixed $ttl) : void
    public get(string $key, mixed $default=null) : mixed The value of the item from the cache, or $default in case of cache miss.
    Fetches a value from the cache.
    public getMultiple(\Psr\SimpleCache\iterable $keys, mixed $default=null) : iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value.
    Obtains multiple cache items by their unique keys.
    public has(string $key) : bool
    Determines whether an item is present in the cache. NOTE: It is recommended that has() is only to be used for cache warming type purposes and not to be used within your live applications operations for get/set, as this method is subject to a race condition where your has() will return true and immediately after, another script can remove it making the state of your app out of date.
    public set(string $key, mixed $value, null/int/\DateInterval $ttl=null) : bool True on success and false on failure.
    Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time. the driver supports TTL then the library may set a default value for it or let the driver take care of that.
    public setMultiple(\Psr\SimpleCache\iterable $values, null/int/\DateInterval $ttl=null) : bool True on success and false on failure.
    Persists a set of key => value pairs in the cache, with an optional TTL. the driver supports TTL then the library may set a default value for it or let the driver take care of that.
    public static throwError(mixed $type, mixed $message, mixed $file, mixed $line) : void
    protected getFile(string $key, bool $mkdir=false) : string
    protected initFileCache(string $namespace, string $directory) : void

    This class extends \Grav\Framework\Cache\AbstractCache

    This class implements \Psr\SimpleCache\CacheInterface, \Grav\Framework\Cache\CacheInterface


    Class: \Grav\Framework\Cache\Adapter\ChainCache

    Cache class for PSR-16 compatible "Simple Cache" implementation using chained cache adapters.

    Visibility Function
    public __construct(array $caches, null/int/\DateInterval $defaultLifetime=null) : void
    Chain Cache constructor.
    public clear() : bool True on success and false on failure.
    Wipes clean the entire cache's keys.
    public delete(string $key) : bool True if the item was successfully removed. False if there was an error.
    Delete an item from the cache by its unique key.
    public deleteMultiple(\Psr\SimpleCache\iterable $keys) : bool True if the items were successfully removed. False if there was an error.
    Deletes multiple cache items in a single operation.
    public doClear() : void
    public doDelete(mixed $key) : void
    public doDeleteMultiple(array $keys) : bool
    public doGet(mixed $key, mixed $miss) : void
    public doGetMultiple(array $keys, mixed $miss) : array
    public doHas(mixed $key) : void
    public doSet(mixed $key, mixed $value, mixed $ttl) : void
    public doSetMultiple(array $values, int $ttl) : bool
    public get(string $key, mixed $default=null) : mixed The value of the item from the cache, or $default in case of cache miss.
    Fetches a value from the cache.
    public getMultiple(\Psr\SimpleCache\iterable $keys, mixed $default=null) : iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value.
    Obtains multiple cache items by their unique keys.
    public has(string $key) : bool
    Determines whether an item is present in the cache. NOTE: It is recommended that has() is only to be used for cache warming type purposes and not to be used within your live applications operations for get/set, as this method is subject to a race condition where your has() will return true and immediately after, another script can remove it making the state of your app out of date.
    public set(string $key, mixed $value, null/int/\DateInterval $ttl=null) : bool True on success and false on failure.
    Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time. the driver supports TTL then the library may set a default value for it or let the driver take care of that.
    public setMultiple(\Psr\SimpleCache\iterable $values, null/int/\DateInterval $ttl=null) : bool True on success and false on failure.
    Persists a set of key => value pairs in the cache, with an optional TTL. the driver supports TTL then the library may set a default value for it or let the driver take care of that.

    This class extends \Grav\Framework\Cache\AbstractCache

    This class implements \Psr\SimpleCache\CacheInterface, \Grav\Framework\Cache\CacheInterface


    Class: \Grav\Framework\Cache\Adapter\MemoryCache

    Cache class for PSR-16 compatible "Simple Cache" implementation using in memory backend. Memory backend does not use namespace or default ttl as the cache is unique to each cache object and request.

    Visibility Function
    public clear() : bool True on success and false on failure.
    Wipes clean the entire cache's keys.
    public delete(string $key) : bool True if the item was successfully removed. False if there was an error.
    Delete an item from the cache by its unique key.
    public deleteMultiple(\Psr\SimpleCache\iterable $keys) : bool True if the items were successfully removed. False if there was an error.
    Deletes multiple cache items in a single operation.
    public doClear() : void
    public doDelete(mixed $key) : void
    public doGet(mixed $key, mixed $miss) : void
    public doHas(mixed $key) : void
    public doSet(mixed $key, mixed $value, mixed $ttl) : void
    public get(string $key, mixed $default=null) : mixed The value of the item from the cache, or $default in case of cache miss.
    Fetches a value from the cache.
    public getMultiple(\Psr\SimpleCache\iterable $keys, mixed $default=null) : iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value.
    Obtains multiple cache items by their unique keys.
    public has(string $key) : bool
    Determines whether an item is present in the cache. NOTE: It is recommended that has() is only to be used for cache warming type purposes and not to be used within your live applications operations for get/set, as this method is subject to a race condition where your has() will return true and immediately after, another script can remove it making the state of your app out of date.
    public set(string $key, mixed $value, null/int/\DateInterval $ttl=null) : bool True on success and false on failure.
    Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time. the driver supports TTL then the library may set a default value for it or let the driver take care of that.
    public setMultiple(\Psr\SimpleCache\iterable $values, null/int/\DateInterval $ttl=null) : bool True on success and false on failure.
    Persists a set of key => value pairs in the cache, with an optional TTL. the driver supports TTL then the library may set a default value for it or let the driver take care of that.

    This class extends \Grav\Framework\Cache\AbstractCache

    This class implements \Psr\SimpleCache\CacheInterface, \Grav\Framework\Cache\CacheInterface


    Class: \Grav\Framework\Cache\Adapter\DoctrineCache

    Cache class for PSR-16 compatible "Simple Cache" implementation using Doctrine Cache backend.

    Visibility Function
    public __construct(\Doctrine\Common\Cache\CacheProvider $doctrineCache, string $namespace='', null/int/\DateInterval $defaultLifetime=null) : void
    Doctrine Cache constructor.
    public clear() : bool True on success and false on failure.
    Wipes clean the entire cache's keys.
    public delete(string $key) : bool True if the item was successfully removed. False if there was an error.
    Delete an item from the cache by its unique key.
    public deleteMultiple(\Psr\SimpleCache\iterable $keys) : bool True if the items were successfully removed. False if there was an error.
    Deletes multiple cache items in a single operation.
    public doClear() : void
    public doDelete(mixed $key) : void
    public doDeleteMultiple(array $keys) : bool
    public doGet(mixed $key, mixed $miss) : void
    public doGetMultiple(array $keys, mixed $miss) : array
    public doHas(mixed $key) : void
    public doSet(mixed $key, mixed $value, mixed $ttl) : void
    public doSetMultiple(array $values, int $ttl) : bool
    public get(string $key, mixed $default=null) : mixed The value of the item from the cache, or $default in case of cache miss.
    Fetches a value from the cache.
    public getMultiple(\Psr\SimpleCache\iterable $keys, mixed $default=null) : iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value.
    Obtains multiple cache items by their unique keys.
    public has(string $key) : bool
    Determines whether an item is present in the cache. NOTE: It is recommended that has() is only to be used for cache warming type purposes and not to be used within your live applications operations for get/set, as this method is subject to a race condition where your has() will return true and immediately after, another script can remove it making the state of your app out of date.
    public set(string $key, mixed $value, null/int/\DateInterval $ttl=null) : bool True on success and false on failure.
    Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time. the driver supports TTL then the library may set a default value for it or let the driver take care of that.
    public setMultiple(\Psr\SimpleCache\iterable $values, null/int/\DateInterval $ttl=null) : bool True on success and false on failure.
    Persists a set of key => value pairs in the cache, with an optional TTL. the driver supports TTL then the library may set a default value for it or let the driver take care of that.

    This class extends \Grav\Framework\Cache\AbstractCache

    This class implements \Psr\SimpleCache\CacheInterface, \Grav\Framework\Cache\CacheInterface


    Class: \Grav\Framework\Cache\Adapter\SessionCache

    Cache class for PSR-16 compatible "Simple Cache" implementation using session backend.

    Visibility Function
    public clear() : bool True on success and false on failure.
    Wipes clean the entire cache's keys.
    public delete(string $key) : bool True if the item was successfully removed. False if there was an error.
    Delete an item from the cache by its unique key.
    public deleteMultiple(\Psr\SimpleCache\iterable $keys) : bool True if the items were successfully removed. False if there was an error.
    Deletes multiple cache items in a single operation.
    public doClear() : void
    public doDelete(mixed $key) : void
    public doGet(mixed $key, mixed $miss) : void
    public doHas(mixed $key) : void
    public doSet(mixed $key, mixed $value, mixed $ttl) : void
    public get(string $key, mixed $default=null) : mixed The value of the item from the cache, or $default in case of cache miss.
    Fetches a value from the cache.
    public getMultiple(\Psr\SimpleCache\iterable $keys, mixed $default=null) : iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value.
    Obtains multiple cache items by their unique keys.
    public getNamespace() : mixed
    public has(string $key) : bool
    Determines whether an item is present in the cache. NOTE: It is recommended that has() is only to be used for cache warming type purposes and not to be used within your live applications operations for get/set, as this method is subject to a race condition where your has() will return true and immediately after, another script can remove it making the state of your app out of date.
    public set(string $key, mixed $value, null/int/\DateInterval $ttl=null) : bool True on success and false on failure.
    Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time. the driver supports TTL then the library may set a default value for it or let the driver take care of that.
    public setMultiple(\Psr\SimpleCache\iterable $values, null/int/\DateInterval $ttl=null) : bool True on success and false on failure.
    Persists a set of key => value pairs in the cache, with an optional TTL. the driver supports TTL then the library may set a default value for it or let the driver take care of that.
    protected doGetStored(mixed $key) : void

    This class extends \Grav\Framework\Cache\AbstractCache

    This class implements \Psr\SimpleCache\CacheInterface, \Grav\Framework\Cache\CacheInterface


    Class: \Grav\Framework\Cache\Exception\InvalidArgumentException

    InvalidArgumentException class for PSR-16 compatible "Simple Cache" implementation.

    Visibility Function

    This class extends \InvalidArgumentException

    This class implements \Throwable, \Psr\SimpleCache\InvalidArgumentException, \Psr\SimpleCache\CacheException


    Class: \Grav\Framework\Cache\Exception\CacheException

    CacheException class for PSR-16 compatible "Simple Cache" implementation.

    Visibility Function

    This class extends \Exception

    This class implements \Throwable, \Psr\SimpleCache\CacheException


    Interface: \Grav\Framework\Collection\FileCollectionInterface

    Collection of objects stored into a filesystem.

    Visibility Function
    public getPath() : string

    This class implements \Grav\Framework\Collection\CollectionInterface, \JsonSerializable, \Countable, \IteratorAggregate, \Traversable, \ArrayAccess, \Doctrine\Common\Collections\Collection, \Doctrine\Common\Collections\Selectable


    Class: \Grav\Framework\Collection\AbstractFileCollection

    Collection of objects stored into a filesystem.

    Visibility Function
    public getPath() : string
    public matching(\Doctrine\Common\Collections\Criteria $criteria) : \Grav\Framework\Collection\ArrayCollection
    protected __construct(string $path) : void
    protected addFilter(\callable $filterFunction) : \Grav\Framework\Collection\$this
    protected createObject(\RecursiveDirectoryIterator $file) : object
    protected doInitialize() : void
    protected doInitializeByIterator(\SeekableIterator $iterator, mixed $nestingLimit) : void
    protected doInitializeChildren(\RecursiveDirectoryIterator[] $children, mixed $nestingLimit) : array
    protected setIterator() : void

    This class extends \Grav\Framework\Collection\AbstractLazyCollection

    This class implements \JsonSerializable, \Grav\Framework\Collection\CollectionInterface, \Doctrine\Common\Collections\Collection, \ArrayAccess, \Traversable, \IteratorAggregate, \Countable, \Grav\Framework\Collection\FileCollectionInterface, \Doctrine\Common\Collections\Selectable


    Class: \Grav\Framework\Collection\ArrayCollection

    General JSON serializable collection.

    Visibility Function
    public chunk(int $size) : array
    Split collection into chunks.
    public jsonSerialize() : array
    Implementes JsonSerializable interface.
    public reverse() : \Grav\Framework\Collection\static
    Reverse the order of the items.
    public shuffle() : \Grav\Framework\Collection\static
    Shuffle items.

    This class extends \Doctrine\Common\Collections\ArrayCollection

    This class implements \Doctrine\Common\Collections\Selectable, \Countable, \IteratorAggregate, \Traversable, \ArrayAccess, \Doctrine\Common\Collections\Collection, \Grav\Framework\Collection\CollectionInterface, \JsonSerializable


    Class: \Grav\Framework\Collection\FileCollection

    Collection of objects stored into a filesystem.

    Visibility Function
    public __construct(string $path, int $flags=null) : void
    public addFilter(\callable $filterFunction) : \Grav\Framework\Collection\$this
    public getFlags() : int
    public getNestingLimit() : int
    public setFilter(\callable $filterFunction=null) : \Grav\Framework\Collection\$this
    public setNestingLimit(int $limit=99) : \Grav\Framework\Collection\$this
    public setObjectBuilder(\callable $objectFunction=null) : \Grav\Framework\Collection\$this

    This class extends \Grav\Framework\Collection\AbstractFileCollection

    This class implements \Doctrine\Common\Collections\Selectable, \Grav\Framework\Collection\FileCollectionInterface, \Countable, \IteratorAggregate, \Traversable, \ArrayAccess, \Doctrine\Common\Collections\Collection, \Grav\Framework\Collection\CollectionInterface, \JsonSerializable


    Interface: \Grav\Framework\Collection\CollectionInterface

    Collection Interface.

    Visibility Function
    public chunk(int $size) : array
    Split collection into chunks.
    public reverse() : \Grav\Framework\Collection\static
    Reverse the order of the items.
    public shuffle() : \Grav\Framework\Collection\static
    Shuffle items.

    This class implements \Doctrine\Common\Collections\Collection, \ArrayAccess, \Traversable, \IteratorAggregate, \Countable, \JsonSerializable


    Class: \Grav\Framework\Collection\AbstractLazyCollection (abstract)

    General JSON serializable collection.

    Visibility Function
    public chunk(mixed $size) : void
    public jsonSerialize() : void
    public reverse() : void
    public shuffle() : void

    This class extends \Doctrine\Common\Collections\AbstractLazyCollection

    This class implements \Countable, \IteratorAggregate, \Traversable, \ArrayAccess, \Doctrine\Common\Collections\Collection, \Grav\Framework\Collection\CollectionInterface, \JsonSerializable


    Class: \Grav\Framework\ContentBlock\HtmlBlock

    HtmlBlock

    Visibility Function
    public addFramework(string $framework) : \Grav\Framework\ContentBlock\$this
    public addHtml(string $html, int $priority, string $location='bottom') : bool
    public addInlineScript(string/array $element, int $priority, string $location='head') : bool
    public addInlineStyle(string/array $element, int $priority, string $location='head') : bool
    public addScript(string/array $element, int $priority, string $location='head') : bool
    public addStyle(string/array $element, int $priority, string $location='head') : bool
    public build(array $serialized) : void
    public getAssets() : array
    public getFrameworks() : array
    public getHtml(string $location='bottom') : array
    public getScripts(string $location='head') : array
    public getStyles(string $location='head') : array
    public toArray() : array[]
    protected getAssetsFast() : array
    protected getAssetsInLocation(string $type, string $location) : array
    protected sortAssets(array $array) : void
    protected sortAssetsInLocation(array $items) : void
    Examples of HtmlBlock::addStyle()
    $block->addStyle('assets/js/my.js');$block->addStyle(['href' => 'assets/js/my.js', 'media' => 'screen']);

    This class extends \Grav\Framework\ContentBlock\ContentBlock

    This class implements \Serializable, \Grav\Framework\ContentBlock\ContentBlockInterface, \Grav\Framework\ContentBlock\HtmlBlockInterface


    Interface: \Grav\Framework\ContentBlock\HtmlBlockInterface

    Interface HtmlBlockInterface

    Visibility Function
    public addFramework(string $framework) : \Grav\Framework\ContentBlock\$this
    public addHtml(string $html, int $priority, string $location='bottom') : bool
    public addInlineScript(string/array $element, int $priority, string $location='head') : bool
    public addInlineStyle(string/array $element, int $priority, string $location='head') : bool
    public addScript(string/array $element, int $priority, string $location='head') : bool
    public addStyle(string/array $element, int $priority, string $location='head') : bool
    public getAssets() : array
    public getFrameworks() : array
    public getHtml(string $location='bottom') : array
    public getScripts(string $location='head') : array
    public getStyles(string $location='head') : array
    Examples of HtmlBlockInterface::addStyle()
    $block->addStyle('assets/js/my.js');$block->addStyle(['href' => 'assets/js/my.js', 'media' => 'screen']);

    This class implements \Grav\Framework\ContentBlock\ContentBlockInterface, \Serializable


    Interface: \Grav\Framework\ContentBlock\ContentBlockInterface

    ContentBlock Interface

    Visibility Function
    public __construct(string $id=null) : void
    public __toString() : string
    public addBlock(\Grav\Framework\ContentBlock\ContentBlockInterface $block) : \Grav\Framework\ContentBlock\$this
    public build(array $serialized) : void
    public static create(string $id=null) : \Grav\Framework\ContentBlock\static
    public static fromArray(array $serialized) : \Grav\Framework\ContentBlock\ContentBlockInterface
    public getChecksum() : string
    public getId() : string
    public getToken() : string
    public setChecksum(string $checksum) : \Grav\Framework\ContentBlock\$this
    public setContent(string $content) : \Grav\Framework\ContentBlock\$this
    public toArray() : array
    public toString() : string

    This class implements \Serializable


    Class: \Grav\Framework\ContentBlock\ContentBlock

    Class to create nested blocks of content. $innerBlock = ContentBlock::create(); $innerBlock->setContent('my inner content'); $outerBlock = ContentBlock::create(); $outerBlock->setContent(sprintf('Inside my outer block I have %s.', $innerBlock->getToken())); $outerBlock->addBlock($innerBlock); echo $outerBlock;

    Visibility Function
    public __construct(string $id=null) : void
    Block constructor.
    public __toString() : string
    public addBlock(\Grav\Framework\ContentBlock\ContentBlockInterface $block) : \Grav\Framework\ContentBlock\$this
    public build(array $serialized) : void
    public static create(string $id=null) : \Grav\Framework\ContentBlock\static
    public static fromArray(array $serialized) : \Grav\Framework\ContentBlock\ContentBlockInterface
    public getChecksum() : string
    public getId() : string
    public getToken() : string
    public serialize() : string
    public setChecksum(string $checksum) : \Grav\Framework\ContentBlock\$this
    public setContent(string $content) : \Grav\Framework\ContentBlock\$this
    public toArray() : array
    public toString() : string
    public unserialize(string $serialized) : void
    protected checkVersion(array $serialized) : void
    protected generateId() : string

    This class implements \Grav\Framework\ContentBlock\ContentBlockInterface, \Serializable


    Class: \Grav\Framework\File\Formatter\JsonFormatter

    Visibility Function
    public __construct(array $config=array()) : void
    public decode(mixed $data) : void
    public encode(mixed $data) : void
    public getDefaultFileExtension() : mixed
    public getFileExtension() : mixed
    DEPRECATED - 1.5 Use $formatter->getDefaultFileExtension() instead.
    public getSupportedFileExtensions() : mixed

    This class implements \Grav\Framework\File\Formatter\FormatterInterface


    Interface: \Grav\Framework\File\Formatter\FormatterInterface

    Visibility Function
    public decode(string $data) : array
    Decode a string into data.
    public encode(array $data) : string
    Encode data into a string.
    public getDefaultFileExtension() : string File extension (can be empty).
    Get default file extension from current formatter (with dot). Default file extension is the first defined extension.
    public getSupportedFileExtensions() : string[]
    Get file extensions supported by current formatter (with dot).


    Class: \Grav\Framework\File\Formatter\SerializeFormatter

    Visibility Function
    public __construct(array $config=array()) : void
    IniFormatter constructor.
    public decode(mixed $data) : void
    public encode(mixed $data) : void
    public getDefaultFileExtension() : mixed
    public getFileExtension() : mixed
    DEPRECATED - 1.5 Use $formatter->getDefaultFileExtension() instead.
    public getSupportedFileExtensions() : mixed
    protected preserveLines(mixed $data, array $search, array $replace) : mixed
    Preserve new lines, recursive function.

    This class implements \Grav\Framework\File\Formatter\FormatterInterface


    Class: \Grav\Framework\File\Formatter\IniFormatter

    Visibility Function
    public __construct(array $config=array()) : void
    IniFormatter constructor.
    public decode(mixed $data) : void
    public encode(mixed $data) : void
    public getDefaultFileExtension() : mixed
    public getFileExtension() : mixed
    DEPRECATED - 1.5 Use $formatter->getDefaultFileExtension() instead.
    public getSupportedFileExtensions() : mixed

    This class implements \Grav\Framework\File\Formatter\FormatterInterface


    Class: \Grav\Framework\File\Formatter\YamlFormatter

    Visibility Function
    public __construct(array $config=array()) : void
    public decode(mixed $data) : void
    public encode(mixed $data, mixed $inline=null, mixed $indent=null) : void
    public getDefaultFileExtension() : mixed
    public getFileExtension() : mixed
    DEPRECATED - 1.5 Use $formatter->getDefaultFileExtension() instead.
    public getSupportedFileExtensions() : mixed

    This class implements \Grav\Framework\File\Formatter\FormatterInterface


    Class: \Grav\Framework\File\Formatter\MarkdownFormatter

    Visibility Function
    public __construct(array $config=array(), \Grav\Framework\File\Formatter\FormatterInterface $headerFormatter=null) : void
    public decode(mixed $data) : void
    public encode(mixed $data) : void
    public getDefaultFileExtension() : mixed
    public getFileExtension() : mixed
    DEPRECATED - 1.5 Use $formatter->getDefaultFileExtension() instead.
    public getSupportedFileExtensions() : mixed

    This class implements \Grav\Framework\File\Formatter\FormatterInterface


    Class: \Grav\Framework\Object\PropertyObject

    Property Object class.

    Visibility Function
    public __construct(array $elements=array(), string $key=null) : void
    public __get(mixed $offset) : mixed Can return all value types.
    Returns the value at specified offset.
    public __isset(mixed $offset) : bool Returns TRUE on success or FALSE on failure.
    Checks whether or not an offset exists.
    public __set(mixed $offset, mixed $value) : void
    Assigns a value to the specified offset.
    public __toString() : string
    Returns a string representation of this object.
    public __unset(mixed $offset) : void
    Magic method to unset the attribute
    public defNestedProperty(string $property, string $default, string $separator=null) : \Grav\Framework\Object\$this
    public defProperty(string $property, mixed $default) : \Grav\Framework\Object\$this
    public getKey() : string
    public getNestedProperty(string $property, mixed $default=null, string $separator=null) : mixed Property value.
    public getProperty(string $property, mixed $default=null) : mixed Property value.
    public getType(bool $prefix=true) : string
    public hasNestedProperty(string $property, string $separator=null) : bool True if property has been defined (can be null).
    public hasProperty(string $property) : bool True if property has been defined (can be null).
    public jsonSerialize() : array
    Implements JsonSerializable interface.
    public offsetExists(mixed $offset) : bool Returns TRUE on success or FALSE on failure.
    Whether or not an offset exists.
    public offsetGet(mixed $offset) : mixed Can return all value types.
    Returns the value at specified offset.
    public offsetSet(mixed $offset, mixed $value) : void
    Assigns a value to the specified offset.
    public offsetUnset(mixed $offset) : void
    Unsets an offset.
    public serialize() : string
    Implements Serializable interface.
    public setNestedProperty(string $property, string $value, string $separator=null) : \Grav\Framework\Object\$this
    public setProperty(string $property, string $value) : \Grav\Framework\Object\$this
    public unserialize(string $serialized) : void
    public unsetNestedProperty(string $property, string $separator=null) : \Grav\Framework\Object\$this
    public unsetProperty(string $property) : \Grav\Framework\Object\$this
    protected doGetProperty(string $property, mixed $default=null, bool/callable/bool $doCreate=false) : mixed Property value.
    protected doHasProperty(string $property) : bool True if property has been defined (can be null).
    protected doSerialize() : array
    protected doSetProperty(string $property, mixed $value) : void
    protected doUnserialize(array $serialized) : void
    protected doUnsetProperty(string $property) : void
    protected getElement(string $property, mixed/null $default=null) : mixed/null
    protected getElements() : array
    protected getTypePrefix() : string
    protected initObjectProperties() : void
    protected isPropertyLoaded(string $property) : bool True if property has been loaded.
    protected offsetLoad(string $offset, mixed $value) : mixed
    protected offsetPrepare(string $offset, mixed $value) : mixed
    protected offsetSerialize(string $offset, mixed $value) : mixed
    protected setElements(array $elements) : void
    protected setKey(string $key) : \Grav\Framework\Object\$this

    This class implements \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Serializable, \JsonSerializable, \Grav\Framework\Object\Interfaces\ObjectInterface, \ArrayAccess


    Class: \Grav\Framework\Object\ObjectCollection

    Object Collection

    Visibility Function
    public __construct(array $elements=array(), string $key=null) : void
    public __toString() : string
    Returns a string representation of this object.
    public call(string $method, array $arguments=array()) : array Return values.
    public collectionGroup(string $property) : \Grav\Framework\Object\static[]
    Group items in the collection by a field and return them as associated array of collections.
    public copy() : \Grav\Framework\Object\static
    Create a copy from this collection by cloning all objects in the collection.
    public defNestedProperty(string $property, string $default, string $separator=null) : \Grav\Framework\Object\$this
    public defProperty(string $property, mixed $default) : \Grav\Framework\Object\$this
    public doDefProperty(string $property, string $default) : \Grav\Framework\Object\$this
    public doGetProperty(string $property, mixed $default=null) : array Key/Value pairs of the properties.
    public doHasProperty(string $property) : array Key/Value pairs of the properties.
    public doSetProperty(string $property, string $value) : \Grav\Framework\Object\$this
    public doUnsetProperty(string $property) : \Grav\Framework\Object\$this
    public getKey() : string
    public getNestedProperty(string $property, mixed $default=null, string $separator=null) : array Key/Value pairs of the properties.
    public getObjectKeys() : array
    public getProperty(string $property, mixed $default=null) : mixed Property value.
    public getType(bool $prefix=true) : string
    public group(string $property, string $separator=null) : array
    Group items in the collection by a field.
    public hasNestedProperty(string $property, string $separator=null) : array Key/Value pairs of the properties.
    public hasProperty(string $property) : bool True if property has been defined (can be null).
    public jsonSerialize() : array
    Implements JsonSerializable interface.
    public matching(\Doctrine\Common\Collections\Criteria $criteria) : void
    public serialize() : string
    Implements Serializable interface.
    public setKey(string $key) : \Grav\Framework\Object\$this
    public setNestedProperty(string $property, string $value, string $separator=null) : \Grav\Framework\Object\$this
    public setProperty(string $property, string $value) : \Grav\Framework\Object\$this
    public unserialize(string $serialized) : void
    public unsetNestedProperty(string $property, string $separator=null) : \Grav\Framework\Object\$this
    public unsetProperty(string $property) : \Grav\Framework\Object\$this
    protected doSerialize() : array
    protected doUnserialize(array $serialized) : void
    protected getElements() : mixed
    protected getTypePrefix() : string
    protected setElements(array $elements) : void

    This class extends \Grav\Framework\Collection\ArrayCollection

    This class implements \JsonSerializable, \Grav\Framework\Collection\CollectionInterface, \Doctrine\Common\Collections\Collection, \ArrayAccess, \Traversable, \IteratorAggregate, \Countable, \Doctrine\Common\Collections\Selectable, \Grav\Framework\Object\Interfaces\ObjectCollectionInterface, \Serializable, \Grav\Framework\Object\Interfaces\ObjectInterface, \Grav\Framework\Object\Interfaces\NestedObjectInterface


    Class: \Grav\Framework\Object\ArrayObject

    Array Object class.

    Visibility Function
    public __construct(array $elements=array(), string $key=null) : void
    public __get(mixed $offset) : mixed Can return all value types.
    Returns the value at specified offset.
    public __isset(mixed $offset) : bool Returns TRUE on success or FALSE on failure.
    Checks whether or not an offset exists.
    public __set(mixed $offset, mixed $value) : void
    Assigns a value to the specified offset.
    public __toString() : string
    Returns a string representation of this object.
    public __unset(mixed $offset) : void
    Magic method to unset the attribute
    public defNestedProperty(string $property, string $default, string $separator=null) : \Grav\Framework\Object\$this
    public defProperty(string $property, mixed $default) : \Grav\Framework\Object\$this
    public getKey() : string
    public getNestedProperty(string $property, mixed $default=null, string $separator=null) : mixed Property value.
    public getProperty(string $property, mixed $default=null) : mixed Property value.
    public getType(bool $prefix=true) : string
    public hasNestedProperty(string $property, string $separator=null) : bool True if property has been defined (can be null).
    public hasProperty(string $property) : bool True if property has been defined (can be null).
    public jsonSerialize() : array
    Implements JsonSerializable interface.
    public offsetExists(mixed $offset) : bool Returns TRUE on success or FALSE on failure.
    Whether or not an offset exists.
    public offsetGet(mixed $offset) : mixed Can return all value types.
    Returns the value at specified offset.
    public offsetSet(mixed $offset, mixed $value) : void
    Assigns a value to the specified offset.
    public offsetUnset(mixed $offset) : void
    Unsets an offset.
    public serialize() : string
    Implements Serializable interface.
    public setNestedProperty(string $property, string $value, string $separator=null) : \Grav\Framework\Object\$this
    public setProperty(string $property, string $value) : \Grav\Framework\Object\$this
    public unserialize(string $serialized) : void
    public unsetNestedProperty(string $property, string $separator=null) : \Grav\Framework\Object\$this
    public unsetProperty(string $property) : \Grav\Framework\Object\$this
    protected doGetProperty(string $property, mixed $default=null, bool $doCreate=false) : mixed Property value.
    protected doHasProperty(string $property) : bool True if property has been defined (can be null).
    protected doSerialize() : array
    protected doSetProperty(string $property, mixed $value) : void
    protected doUnserialize(array $serialized) : void
    protected doUnsetProperty(string $property) : void
    protected getElement(string $property, mixed/null $default=null) : mixed/null
    protected getElements() : array
    protected getTypePrefix() : string
    protected setElements(array $elements) : void
    protected setKey(string $key) : \Grav\Framework\Object\$this

    This class implements \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Serializable, \JsonSerializable, \Grav\Framework\Object\Interfaces\ObjectInterface, \ArrayAccess


    Class: \Grav\Framework\Object\LazyObject

    Lazy Object class.

    Visibility Function
    public __construct(array $elements=array(), string $key=null) : void
    public __get(mixed $offset) : mixed Can return all value types.
    Returns the value at specified offset.
    public __isset(mixed $offset) : bool Returns TRUE on success or FALSE on failure.
    Checks whether or not an offset exists.
    public __set(mixed $offset, mixed $value) : void
    Assigns a value to the specified offset.
    public __toString() : string
    Returns a string representation of this object.
    public __unset(mixed $offset) : void
    Magic method to unset the attribute
    public defNestedProperty(string $property, string $default, string $separator=null) : \Grav\Framework\Object\$this
    public defProperty(string $property, mixed $default) : \Grav\Framework\Object\$this
    public getKey() : string
    public getNestedProperty(string $property, mixed $default=null, string $separator=null) : mixed Property value.
    public getProperty(string $property, mixed $default=null) : mixed Property value.
    public getType(bool $prefix=true) : string
    public hasNestedProperty(string $property, string $separator=null) : bool True if property has been defined (can be null).
    public hasProperty(string $property) : bool True if property has been defined (can be null).
    public jsonSerialize() : array
    Implements JsonSerializable interface.
    public offsetExists(mixed $offset) : bool Returns TRUE on success or FALSE on failure.
    Whether or not an offset exists.
    public offsetGet(mixed $offset) : mixed Can return all value types.
    Returns the value at specified offset.
    public offsetSet(mixed $offset, mixed $value) : void
    Assigns a value to the specified offset.
    public offsetUnset(mixed $offset) : void
    Unsets an offset.
    public serialize() : string
    Implements Serializable interface.
    public setNestedProperty(string $property, string $value, string $separator=null) : \Grav\Framework\Object\$this
    public setProperty(string $property, string $value) : \Grav\Framework\Object\$this
    public unserialize(string $serialized) : void
    public unsetNestedProperty(string $property, string $separator=null) : \Grav\Framework\Object\$this
    public unsetProperty(string $property) : \Grav\Framework\Object\$this
    protected doGetProperty(string $property, mixed $default=null, bool/callable/bool $doCreate=false) : mixed Property value.
    protected doHasProperty(string $property) : bool True if property has been defined (can be null).
    protected doSerialize() : array
    protected doSetProperty(string $property, mixed $value) : void
    protected doUnserialize(array $serialized) : void
    protected doUnsetProperty(string $property) : void
    protected getElement(string $property, mixed/null $default=null) : mixed/null
    protected getElements() : array
    protected getTypePrefix() : string
    protected initObjectProperties() : void
    protected isPropertyLoaded(string $property) : bool True if property has been loaded.
    protected offsetLoad(string $offset, mixed $value) : mixed
    protected offsetPrepare(string $offset, mixed $value) : mixed
    protected offsetSerialize(string $offset, mixed $value) : mixed
    protected setElements(array $elements) : void
    protected setKey(string $key) : \Grav\Framework\Object\$this

    This class implements \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Serializable, \JsonSerializable, \Grav\Framework\Object\Interfaces\ObjectInterface, \ArrayAccess


    Class: \Grav\Framework\Object\Collection\ObjectExpressionVisitor

    Visibility Function
    public static filterLength(mixed $str) : void
    public static filterLower(mixed $str) : void
    public static filterLtrim(mixed $str) : void
    public static filterRtrim(mixed $str) : void
    public static filterTrim(mixed $str) : void
    public static filterUpper(mixed $str) : void
    public static getObjectFieldValue(object $object, string $field) : mixed
    Accesses the field of a given object.
    public static sortByField(string $name, int $orientation=1, \Closure $next=null) : \Closure
    Helper for sorting arrays of objects based on multiple fields + orientations.
    public walkComparison(\Doctrine\Common\Collections\Expr\Comparison $comparison) : void

    This class extends \Doctrine\Common\Collections\Expr\ClosureExpressionVisitor


    Interface: \Grav\Framework\Object\Interfaces\NestedObjectInterface

    Object Interface

    Visibility Function
    public defNestedProperty(string $property, string $default, string $separator=null) : \Grav\Framework\Object\Interfaces\$this
    public getNestedProperty(string $property, mixed $default=null, string $separator=null) : mixed Property value.
    public hasNestedProperty(string $property, string $separator=null) : bool True if property has been defined (can be null).
    public setNestedProperty(string $property, string $value, string $separator=null) : \Grav\Framework\Object\Interfaces\$this
    public unsetNestedProperty(string $property, string $separator=null) : \Grav\Framework\Object\Interfaces\$this

    This class implements \Grav\Framework\Object\Interfaces\ObjectInterface, \JsonSerializable, \Serializable


    Interface: \Grav\Framework\Object\Interfaces\ObjectCollectionInterface

    ObjectCollection Interface

    Visibility Function
    public call(string $name, array $arguments) : array Return values.
    public collectionGroup(string $property) : \Grav\Framework\Object\Interfaces\static[]
    Group items in the collection by a field and return them as associated array of collections.
    public copy() : \Grav\Framework\Object\Interfaces\static
    Create a copy from this collection by cloning all objects in the collection.
    public getObjectKeys() : array
    public getProperty(string $property, mixed $default=null) : array Property value.
    public group(string $property) : array
    Group items in the collection by a field and return them as associated array.
    public setKey(string $key) : \Grav\Framework\Object\Interfaces\$this

    This class implements \Grav\Framework\Collection\CollectionInterface, \JsonSerializable, \Countable, \IteratorAggregate, \Traversable, \ArrayAccess, \Doctrine\Common\Collections\Collection, \Doctrine\Common\Collections\Selectable, \Grav\Framework\Object\Interfaces\ObjectInterface, \Serializable


    Interface: \Grav\Framework\Object\Interfaces\ObjectInterface

    Object Interface

    Visibility Function
    public defProperty(string $property, mixed $default) : \Grav\Framework\Object\Interfaces\$this
    public getKey() : string
    public getProperty(string $property, mixed $default=null) : mixed Property value.
    public getType() : string
    public hasProperty(string $property) : bool True if property has been defined (can be null).
    public setProperty(string $property, string $value) : \Grav\Framework\Object\Interfaces\$this
    public unsetProperty(string $property) : \Grav\Framework\Object\Interfaces\$this

    This class implements \Serializable, \JsonSerializable


    Class: \Grav\Framework\Psr7\AbstractUri (abstract)

    Bare minimum PSR7 implementation.

    Visibility Function
    public abstract __construct() : void
    Please define constructor which calls $this->init().
    public __toString() : string
    public abstract getAuthority() : string The URI authority, in "[user-info@]host[:port]" format.
    Retrieve the authority component of the URI. If no authority information is present, this method MUST return an empty string. The authority syntax of the URI is:
    public abstract getFragment() : string The URI fragment.
    Retrieve the fragment component of the URI. If no fragment is present, this method MUST return an empty string. The leading "#" character is not part of the fragment and MUST NOT be added. The value returned MUST be percent-encoded, but MUST NOT double-encode any characters. To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3.5.
    public abstract getHost() : string The URI host.
    Retrieve the host component of the URI. If no host is present, this method MUST return an empty string. The value returned MUST be normalized to lowercase, per RFC 3986 Section 3.2.2.
    public abstract getPath() : string The URI path.
    Retrieve the path component of the URI. The path can either be empty or absolute (starting with a slash) or rootless (not starting with a slash). Implementations MUST support all three syntaxes. Normally, the empty path "" and absolute path "/" are considered equal as defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically do this normalization because in contexts with a trimmed base path, e.g. the front controller, this difference becomes significant. It's the task of the user to handle both "" and "/". The value returned MUST be percent-encoded, but MUST NOT double-encode any characters. To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3.3. As an example, if the value should include a slash ("/") not intended as delimiter between path segments, that value MUST be passed in encoded form (e.g., "%2F") to the instance.
    public abstract getPort() : null/int The URI port.
    Retrieve the port component of the URI. If a port is present, and it is non-standard for the current scheme, this method MUST return it as an integer. If the port is the standard port used with the current scheme, this method SHOULD return null. If no port is present, and no scheme is present, this method MUST return a null value. If no port is present, but a scheme is present, this method MAY return the standard port for that scheme, but SHOULD return null.
    public abstract getQuery() : string The URI query string.
    Retrieve the query string of the URI. If no query string is present, this method MUST return an empty string. The leading "?" character is not part of the query and MUST NOT be added. The value returned MUST be percent-encoded, but MUST NOT double-encode any characters. To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3.4. As an example, if a value in a key/value pair of the query string should include an ampersand ("&") not intended as a delimiter between values, that value MUST be passed in encoded form (e.g., "%26") to the instance.
    public abstract getScheme() : string The URI scheme.
    Retrieve the scheme component of the URI. If no scheme is present, this method MUST return an empty string. The value returned MUST be normalized to lowercase, per RFC 3986 Section 3.1. The trailing ":" character is not part of the scheme and MUST NOT be added.
    public abstract getUserInfo() : string The URI user information, in "username[:password]" format.
    Retrieve the user information component of the URI. If no user information is present, this method MUST return an empty string. If a user is present in the URI, this will return that value; additionally, if the password is also present, it will be appended to the user value, with a colon (":") separating the values. The trailing "@" character is not part of the user information and MUST NOT be added.
    public abstract withFragment(string $fragment) : static A new instance with the specified fragment.
    Return an instance with the specified URI fragment. This method MUST retain the state of the current instance, and return an instance that contains the specified URI fragment. Users can provide both encoded and decoded fragment characters. Implementations ensure the correct encoding as outlined in getFragment(). An empty fragment value is equivalent to removing the fragment.
    public abstract withHost(string $host) : static A new instance with the specified host.
    Return an instance with the specified host. This method MUST retain the state of the current instance, and return an instance that contains the specified host. An empty host value is equivalent to removing the host.
    public abstract withPath(string $path) : static A new instance with the specified path.
    Return an instance with the specified path. This method MUST retain the state of the current instance, and return an instance that contains the specified path. The path can either be empty or absolute (starting with a slash) or rootless (not starting with a slash). Implementations MUST support all three syntaxes. If the path is intended to be domain-relative rather than path relative then it must begin with a slash ("/"). Paths not starting with a slash ("/") are assumed to be relative to some base path known to the application or consumer. Users can provide both encoded and decoded path characters. Implementations ensure the correct encoding as outlined in getPath().
    public abstract withPort(null/int $port) : static A new instance with the specified port.
    Return an instance with the specified port. This method MUST retain the state of the current instance, and return an instance that contains the specified port. Implementations MUST raise an exception for ports outside the established TCP and UDP port ranges. A null value provided for the port is equivalent to removing the port information. removes the port information.
    public abstract withQuery(string $query) : static A new instance with the specified query string.
    Return an instance with the specified query string. This method MUST retain the state of the current instance, and return an instance that contains the specified query string. Users can provide both encoded and decoded query characters. Implementations ensure the correct encoding as outlined in getQuery(). An empty query string value is equivalent to removing the query string.
    public abstract withScheme(string $scheme) : static A new instance with the specified scheme.
    Return an instance with the specified scheme. This method MUST retain the state of the current instance, and return an instance that contains the specified scheme. Implementations MUST support the schemes "http" and "https" case insensitively, and MAY accommodate other schemes if required. An empty scheme is equivalent to removing the scheme.
    public abstract withUserInfo(string $user, null/string $password=null) : static A new instance with the specified user information.
    Return an instance with the specified user information. This method MUST retain the state of the current instance, and return an instance that contains the specified user information. Password is optional, but the user information MUST include the user; an empty string for the user is equivalent to removing user information.
    protected getBaseUrl() : string
    Return the fully qualified base URL ( like http://getgrav.org ). Note that this method never includes a trailing /
    protected getParts() : array
    protected getPassword() : string
    protected getUrl() : string
    protected getUser() : string
    protected initParts(array $parts) : void
    protected isDefaultPort() : bool

    This class implements \Psr\Http\Message\UriInterface


    Class: \Grav\Framework\Route\Route

    Implements Grav Route.

    Visibility Function
    public __construct(array $parts=array()) : void
    You can use RouteFactory functions to create new Route objects.
    public __toString() : string
    public getGravParam(string $param) : string/null
    public getGravParams() : array
    public getLanguagePrefix() : string
    public getParam(string $param) : string/null
    Return value of the parameter, looking into both Grav parameters and query parameters. If the parameter exists in both, return Grav parameter.
    public getParams() : array
    Return array of both query and Grav parameters. If a parameter exists in both, prefer Grav parameter.
    public getParts() : array
    public getQueryParam(string $param) : string/null
    public getQueryParams() : array
    public getRootPrefix() : string
    public getRoute(int $offset, int/null $length=null) : string
    public getRouteParts(int $offset, int/null $length=null) : array
    public getUri() : \Grav\Framework\Uri\Uri
    public withGravParam(string $param, mixed $value) : \Grav\Framework\Route\Route
    public withQueryParam(string $param, mixed $value) : \Grav\Framework\Route\Route
    protected getUriPath() : string
    protected getUriQuery() : string
    protected initParts(array $parts) : void
    protected withParam(string $type, string $param, mixed $value) : \Grav\Framework\Route\static


    Class: \Grav\Framework\Route\RouteFactory

    Class RouteFactory

    Visibility Function
    public static buildParams(array $params) : string
    public static createFromParts(mixed $parts) : mixed
    public static createFromString(mixed $path) : mixed
    public static getLanguage() : mixed
    public static getParamValueDelimiter() : mixed
    public static getParams(string $path) : array
    public static getRoot() : mixed
    public static parseParams(string $str) : array
    public static setLanguage(mixed $language) : void
    public static setParamValueDelimiter(mixed $delimiter) : void
    public static setRoot(mixed $root) : void
    public static stripParams(string $path, bool $decode=false) : string


    Class: \Grav\Framework\Session\Session

    Class Session

    Visibility Function
    public __construct(array $options=array()) : void
    public __get(string $name) : mixed
    Returns session variable.
    public __isset(string $name) : bool
    Checks if session variable is defined.
    public __set(string $name, mixed $value) : void
    Sets session variable.
    public __unset(string $name) : void
    Removes session variable.
    public clear() : \Grav\Framework\Session\$this
    Free all session variables.
    public close() : \Grav\Framework\Session\$this
    Force the session to be saved and closed
    public getAll() : array
    Returns all session variables.
    public getId() : string/null Session ID
    Get session ID
    public static getInstance() : \Grav\Framework\Session\Session
    Get current session instance.
    public getIterator() : \ArrayIterator Return an ArrayIterator of $_SESSION
    Retrieve an external iterator
    public getName() : string/null
    Get session name
    public invalidate() : \Grav\Framework\Session\$this
    Invalidates the current session.
    public isStarted() : Boolean
    Checks if the session was started.
    public setId(string $id) : \Grav\Framework\Session\$this
    Set session ID
    public setName(string $name) : \Grav\Framework\Session\$this
    Set session name
    public setOptions(array $options) : void
    Sets session.* ini variables.
    public start(bool $readonly=false) : \Grav\Framework\Session\$this
    Starts the session storage
    protected ini_set(string $key, mixed $value) : void
    protected isSessionStarted() : bool
    http://php.net/manual/en/function.session-status.php#113468 Check if session is started nicely.

    This class implements \Grav\Framework\Session\SessionInterface, \Traversable, \IteratorAggregate


    Interface: \Grav\Framework\Session\SessionInterface

    Class Session

    Visibility Function
    public __get(string $name) : mixed
    Returns session variable.
    public __isset(string $name) : bool
    Checks if session variable is defined.
    public __set(string $name, mixed $value) : void
    Sets session variable.
    public __unset(string $name) : void
    Removes session variable.
    public clear() : \Grav\Framework\Session\$this
    Free all session variables.
    public close() : \Grav\Framework\Session\$this
    Force the session to be saved and closed
    public getAll() : array
    Returns all session variables.
    public getId() : string/null Session ID
    Get session ID
    public static getInstance() : \Grav\Framework\Session\Session
    Get current session instance.
    public getIterator() : \ArrayIterator Return an ArrayIterator of $_SESSION
    Retrieve an external iterator
    public getName() : string/null
    Get session name
    public invalidate() : \Grav\Framework\Session\$this
    Invalidates the current session.
    public isStarted() : Boolean
    Checks if the session was started.
    public setId(string $id) : \Grav\Framework\Session\$this
    Set session ID
    public setName(string $name) : \Grav\Framework\Session\$this
    Set session name
    public setOptions(array $options) : void
    Sets session.* ini variables.
    public start(bool $readonly=false) : \Grav\Framework\Session\$this
    Starts the session storage

    This class implements \IteratorAggregate, \Traversable


    Class: \Grav\Framework\Uri\UriFactory

    Class Uri

    Visibility Function
    public static buildQuery(array $params) : string
    Build query string from variables.
    public static createFromEnvironment(array $env) : \Grav\Framework\Uri\Uri
    public static createFromParts(array $parts) : \Grav\Framework\Uri\Uri
    Creates a URI from a array of parse_url() components.
    public static createFromString(string $uri) : \Grav\Framework\Uri\Uri
    public static parseQuery(string $query) : mixed
    Parse query string and return it as an array.
    public static parseUrl(string $url) : array
    UTF-8 aware parse_url() implementation.
    public static parseUrlFromEnvironment(array $env) : array


    Class: \Grav\Framework\Uri\Uri

    Implements PSR-7 UriInterface.

    Visibility Function
    public __construct(array $parts=array()) : void
    You can use UriFactory functions to create new Uri objects.
    public getAuthority() : string The URI authority, in "[user-info@]host[:port]" format.
    Retrieve the authority component of the URI. If no authority information is present, this method MUST return an empty string. The authority syntax of the URI is:
    public getBaseUrl() : string
    public getFragment() : string The URI fragment.
    Retrieve the fragment component of the URI. If no fragment is present, this method MUST return an empty string. The leading "#" character is not part of the fragment and MUST NOT be added. The value returned MUST be percent-encoded, but MUST NOT double-encode any characters. To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3.5.
    public getHost() : string The URI host.
    Retrieve the host component of the URI. If no host is present, this method MUST return an empty string. The value returned MUST be normalized to lowercase, per RFC 3986 Section 3.2.2.
    public getParts() : array
    public getPassword() : string
    public getPath() : string The URI path.
    Retrieve the path component of the URI. The path can either be empty or absolute (starting with a slash) or rootless (not starting with a slash). Implementations MUST support all three syntaxes. Normally, the empty path "" and absolute path "/" are considered equal as defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically do this normalization because in contexts with a trimmed base path, e.g. the front controller, this difference becomes significant. It's the task of the user to handle both "" and "/". The value returned MUST be percent-encoded, but MUST NOT double-encode any characters. To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3.3. As an example, if the value should include a slash ("/") not intended as delimiter between path segments, that value MUST be passed in encoded form (e.g., "%2F") to the instance.
    public getPort() : null/int The URI port.
    Retrieve the port component of the URI. If a port is present, and it is non-standard for the current scheme, this method MUST return it as an integer. If the port is the standard port used with the current scheme, this method SHOULD return null. If no port is present, and no scheme is present, this method MUST return a null value. If no port is present, but a scheme is present, this method MAY return the standard port for that scheme, but SHOULD return null.
    public getQuery() : string The URI query string.
    Retrieve the query string of the URI. If no query string is present, this method MUST return an empty string. The leading "?" character is not part of the query and MUST NOT be added. The value returned MUST be percent-encoded, but MUST NOT double-encode any characters. To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3.4. As an example, if a value in a key/value pair of the query string should include an ampersand ("&") not intended as a delimiter between values, that value MUST be passed in encoded form (e.g., "%26") to the instance.
    public getQueryParam(string $key) : string/null
    public getQueryParams() : array
    public getScheme() : string The URI scheme.
    Retrieve the scheme component of the URI. If no scheme is present, this method MUST return an empty string. The value returned MUST be normalized to lowercase, per RFC 3986 Section 3.1. The trailing ":" character is not part of the scheme and MUST NOT be added.
    public getUrl() : string
    public getUser() : string
    public getUserInfo() : string The URI user information, in "username[:password]" format.
    Retrieve the user information component of the URI. If no user information is present, this method MUST return an empty string. If a user is present in the URI, this will return that value; additionally, if the password is also present, it will be appended to the user value, with a colon (":") separating the values. The trailing "@" character is not part of the user information and MUST NOT be added.
    public isAbsolute() : bool
    Whether the URI is absolute, i.e. it has a scheme. An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative to another URI, the base URI. Relative references can be divided into several forms: - network-path references, e.g. '//example.com/path' - absolute-path references, e.g. '/path' - relative-path references, e.g. 'subpath'
    public isAbsolutePathReference() : bool
    Whether the URI is a absolute-path reference. A relative reference that begins with a single slash character is termed an absolute-path reference.
    public isDefaultPort() : bool
    Whether the URI has the default port of the current scheme. $uri->getPort() may return the standard port. This method can be used for some non-http/https Uri.
    public isNetworkPathReference() : bool
    Whether the URI is a network-path reference. A relative reference that begins with two slash characters is termed an network-path reference.
    public isRelativePathReference() : bool
    Whether the URI is a relative-path reference. A relative reference that does not begin with a slash character is termed a relative-path reference.
    public isSameDocumentReference(\Grav\Framework\Uri\UriInterface/null/\Psr\Http\Message\UriInterface $base=null) : bool
    Whether the URI is a same-document reference. A same-document reference refers to a URI that is, aside from its fragment component, identical to the base URI. When no base URI is given, only an empty URI reference (apart from its fragment) is considered a same-document reference.
    public withFragment(string $fragment) : static A new instance with the specified fragment.
    Return an instance with the specified URI fragment. This method MUST retain the state of the current instance, and return an instance that contains the specified URI fragment. Users can provide both encoded and decoded fragment characters. Implementations ensure the correct encoding as outlined in getFragment(). An empty fragment value is equivalent to removing the fragment.
    public withHost(string $host) : static A new instance with the specified host.
    Return an instance with the specified host. This method MUST retain the state of the current instance, and return an instance that contains the specified host. An empty host value is equivalent to removing the host.
    public withPath(string $path) : static A new instance with the specified path.
    Return an instance with the specified path. This method MUST retain the state of the current instance, and return an instance that contains the specified path. The path can either be empty or absolute (starting with a slash) or rootless (not starting with a slash). Implementations MUST support all three syntaxes. If the path is intended to be domain-relative rather than path relative then it must begin with a slash ("/"). Paths not starting with a slash ("/") are assumed to be relative to some base path known to the application or consumer. Users can provide both encoded and decoded path characters. Implementations ensure the correct encoding as outlined in getPath().
    public withPort(null/int $port) : static A new instance with the specified port.
    Return an instance with the specified port. This method MUST retain the state of the current instance, and return an instance that contains the specified port. Implementations MUST raise an exception for ports outside the established TCP and UDP port ranges. A null value provided for the port is equivalent to removing the port information. removes the port information.
    public withQuery(string $query) : static A new instance with the specified query string.
    Return an instance with the specified query string. This method MUST retain the state of the current instance, and return an instance that contains the specified query string. Users can provide both encoded and decoded query characters. Implementations ensure the correct encoding as outlined in getQuery(). An empty query string value is equivalent to removing the query string.
    public withQueryParam(string $key, string/null $value) : \Psr\Http\Message\UriInterface
    public withQueryParams(array $params) : \Psr\Http\Message\UriInterface
    public withScheme(string $scheme) : static A new instance with the specified scheme.
    Return an instance with the specified scheme. This method MUST retain the state of the current instance, and return an instance that contains the specified scheme. Implementations MUST support the schemes "http" and "https" case insensitively, and MAY accommodate other schemes if required. An empty scheme is equivalent to removing the scheme.
    public withUserInfo(string $user, null/string $password=null) : static A new instance with the specified user information.
    Return an instance with the specified user information. This method MUST retain the state of the current instance, and return an instance that contains the specified user information. Password is optional, but the user information MUST include the user; an empty string for the user is equivalent to removing user information.
    public withoutQueryParam(string $key) : \Psr\Http\Message\UriInterface

    This class extends \Grav\Framework\Psr7\AbstractUri

    This class implements \Psr\Http\Message\UriInterface


    Class: \Grav\Framework\Uri\UriPartsFilter

    Class Uri

    Visibility Function
    public static filterHost(string $host) : string
    public static filterPath(string $path) : string The RFC 3986 percent-encoded uri path.
    Filter Uri path. This method percent-encodes all reserved characters in the provided path string. This method will NOT double-encode characters that are already percent-encoded.
    public static filterPort(int/null $port=null) : int/null
    Filter Uri port. This method
    public static filterQueryOrFragment(string $query) : string The percent-encoded query string.
    Filters the query string or fragment of a URI.
    public static filterScheme(string $scheme) : string
    public static filterUserInfo(string $info) : string The percent-encoded user or password string.
    Filters the user info string.

    Results