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\Interfaces\PageInterface $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 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 static clearJob(string $type) : void
Static function to call as a scheduled Job to clear Grav cache
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 deleteAll() : bool
Deletes all cache
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 getSimpleCache() : \Psr\SimpleCache\CacheInterface
public init(\Grav\Common\Grav $grav) : void
Initialization that sets a base key and the driver based on configuration settings
public static invalidateCache() : void
public isVolatileDriver(string $setting) : bool
is this driver a volatile driver in that it resides in PHP process memory
public onSchedulerInitialized(\RocketTheme\Toolbox\Event\Event $event) : void
public static purgeJob() : void
Static function to call as a scheduled Job to purge old Doctrine files
public purgeOldCache() : int
Deletes the old out of date file-based caches
public save(string $id, array/object $data, int $lifetime=null) : void
Stores a new cached entry.
public setEnabled(bool/int $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() : bool
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() : \Grav\Common\Data\Blueprint
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 plugin is running under the admin
public isCli() : bool
Determine if plugin is running under the CLI
public offsetExists(string $offset) : bool Returns TRUE on success or FALSE on failure.
Whether or not an offset exists.
public offsetGet(string $offset) : mixed Can return all value types.
Returns the value at specified offset.
public offsetSet(string $offset, mixed $value) : void
Assigns a value to the specified offset.
public offsetUnset(string $offset) : void
Unsets an offset.
public static saveConfig(string $plugin_name) : bool
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(string $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\Interfaces\PageInterface $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\Interfaces\PageInterface $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(\Grav\Common\Plugin $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() : 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(\Grav\Common\DataCollectorInterface $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) : bool
Set/get the enabled state of the debugger
public getCaller(mixed $limit=2) : mixed
public getCollector(\Grav\Common\DataCollectorInterface $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(string $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(string $path) : mixed/string
Removes extra double slashes and fixes back-slashes
public static convertUrl(\Grav\Common\Page\Interfaces\PageInterface $page, string/array $url, string $type='link', bool $absolute=false, bool $route_only=false) : string/array the more friendly formatted url
Converts links from absolute '/' or relative (../..) to a Grav friendly format
public static convertUrlOld(\Grav\Common\Page\Interfaces\PageInterface $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 getContentType(bool $short=true) : null/string
Get content type from request
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 isValidExtension(mixed $extension) : bool
Check if this is a valid Grav extension
public static isValidUrl(string $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 setUriProperties(mixed $data) : \Grav\Common\Uri
Allow overriding of any element (be careful!)
public toArray(bool $full=false) : void
public toOriginalString() : 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 arrayCombine(array $arr1, array $arr2) : array/false
Array combine but supports different array lengths
public static arrayDiffMultidimensional(array $array1, array $array2) : array
Returns an array with the differences between $array1 and $array2
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 arrayFlattenDotNotation(array $array, string $prepend='') : array
Flatten a multi-dimensional associative array into dot notation
public static arrayIsAssociative(array $arr) : bool
Array is associative or not
public static arrayMergeRecursiveUnique(array $array1, array $array2) : array
Recursive Merge with uniqueness
public static arrayUnflattenDotNotation(array $array, string $separator='.') : array
Opposite of flatten, convert flat dot notation array to multi dimensional array
public static checkFilename(string $filename) : bool
Returns true if filename is considered safe.
public static contains(string $haystack, string/string[] $needle, bool $case_sensitive=true) : bool
Check if the $haystack string contains the substring $needle
public static convertSize(int $bytes, string $to, int $decimal_places=1) : int Returns only the number of units, not the type letter. Returns if the $to unit type is out of scope.
Convert bytes to the unit specified by the $to parameter.
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 dateNow(string/null $default_format=null) : string
Get current date/time
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 $case_sensitive=true) : 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(array $array, string/int $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 getExtensions(array $mimetypes) : array
Get all the extensions for an array of mimetypes
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 getMimeTypes(array $extensions) : array
Get all the mimetypes for an array of extensions
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(string $path, \Grav\Common\PageInterface/null/\Grav\Common\Page\Interfaces\PageInterface $page=null) : string
Get's path based on a token
public static getSubnet(string $ip, int $prefix=64) : string
Find the subnet of an ip with CIDR prefix size
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 matchWildcard(string $wildcard_pattern, string $haystack) : false/int
Function that can match wildcards match_wildcard('foo', $test), // TRUE match_wildcard('bar', $test), // FALSE match_wildcard('bar', $test), // TRUE match_wildcard('blob', $test), // TRUE match_wildcard('a?d', $test), // TRUE match_wildcard('*etc**', $test) // TRUE
public static mb_substr_replace(string $original, string $replacement, int $position, int $length) : string
Multibyte compatible substr_replace
public static mergeObjects(object $obj1, object $obj2) : object
Merge two objects into one.
public static multibyteParseUrl(string $url) : array
Multibyte-safe Parse URL function
public static normalizePath(string $path) : string
Normalize path by processing relative . and .. syntax and merging path
public static parseSize(string/int $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 prettySize(int $bytes, int $precision=2) : string
Return a pretty size based on bytes
public static processMarkdown(string $string, bool $block=true) : string
Process a string as markdown
public static replaceFirstOccurrence(string $search, string $replace, string $subject) : string
Utility method to replace only the first occurrence in a string
public static replaceLastOccurrence(string $search, string $replace, string $subject) : string
Utility method to replace only the last occurrence in a string
public static resolve(array $array, string $path, null $default=null) : mixed
DEPRECATED - 1.5 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(array $array, string/int $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, string/int $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 $case_sensitive=true) : bool
Check if the $haystack string starts with the substring $needle
public static substrToString(string $haystack, string $needle, bool $case_sensitive=true) : 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(string $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

Grav container is the heart of Grav.

Visibility Function
public __call(mixed $method, mixed $args) : void
Magic Catch All Function Used to call closures. Source: http://stackoverflow.com/questions/419804/closures-as-class-members
public fallbackUrl(string $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(\Grav\Common\ResponseInterface/null/\Psr\Http\Message\ResponseInterface $response=null) : 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 measureTime(\string $timerId, \string $timerTitle, \callable $callback) : mixed Returns value returned by the callable.
Measure how long it takes to do an action.
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 setup(\string $environment=null) : \Grav\Common\$this
Setup Grav instance using specific environment. Initializes Grav streams by
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 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 \Grav\Framework\DI\Container

This class implements \Psr\Container\ContainerInterface, \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
public isTrackable() : bool
Determine if “Do Not Track” is set by browser


Class: \Grav\Common\Security

Visibility Function
public static detectXss(string $string) : bool/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(\Grav\Common\Page\Pages $pages, bool $route=true, \callable $status=null) : void


Class: \Grav\Common\Inflector

This file was originally part of the Akelos Framework

Visibility Function
public static 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 static classify(string $table_name) : string SingularClassName
Converts a table name to its class name according to rails naming conventions. Converts "people" to "Person"
public static 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 static 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 static init() : void
public static monthize(int $days) : int
Converts a number of days to a number of months
public static ordinalize(int $number) : string Ordinal representation of given string.
Converts number to its ordinal English form. This method converts 13 to 13th, 2 to 2nd ...
public static pluralize(string $word, int $count=2) : string Plural noun
Pluralizes English nouns.
public static singularize(string $word, int $count=1) : string Singular noun.
Singularizes English nouns.
public static 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 static 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 static 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 static 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(string $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 add(array/string $asset) : \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(string/array $asset, int $priority=10, bool $pipeline=true, string $group='head') : \Grav\Common\Assets
DEPRECATED - Please use dynamic method with ['loading' => 'async'].
public addCss(mixed $asset) : \Grav\Common\$this
Add a CSS asset or a collection of assets.
public addDeferJs(string/array $asset, int $priority=10, bool $pipeline=true, string $group='head') : \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) : \Grav\Common\$this
Add an Inline CSS asset or a collection of assets.
public addInlineJs(mixed $asset) : \Grav\Common\$this
Add an Inline JS asset or a collection of assets.
public addJs(mixed $asset) : \Grav\Common\$this
Add a JS asset or a collection of assets.
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(string $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 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) : \Grav\Common\$this
Removes an item from the CSS array if set
public removeJs(string $key) : \Grav\Common\$this
Removes an item from the JS array if set
public render(mixed $type, string $group='head', array $attributes=array()) : void
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(array $collections) : \Grav\Common\$this
Set the array of collections explicitly
public setCss(array $css) : \Grav\Common\$this
Set the whole array of CSS assets
public setCssPipeline(bool $value) : \Grav\Common\$this
Sets the state of CSS Pipeline
public setJs(array $js) : \Grav\Common\$this
Set the whole array of JS assets
public setJsPipeline(bool $value) : \Grav\Common\$this
Sets the state of JS Pipeline
public setTimestamp(string/int $value) : void
Explicitly set's a timestamp for assets
protected addType(mixed $collection, mixed $type, mixed $asset, mixed $options) : void
protected createArgumentsFromLegacy(array $args, array $defaults) : mixed
protected filterAssets(mixed $assets, mixed $key, mixed $value, bool $sort=false) : void
protected rglob(string $directory, string $pattern, string $ltrim=null) : array
Recursively get files matching $pattern within $directory.
protected sortAssets(mixed $assets) : void
protected unifyLegacyArguments(array $args, string $type='Css') : array

This class extends \Grav\Framework\Object\PropertyObject

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


Class: \Grav\Common\Assets\InlineCss

Visibility Function
public __construct(array $elements=array(), mixed $key=null) : void
public render() : void

This class extends \Grav\Common\Assets\BaseAsset

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


Class: \Grav\Common\Assets\Js

Visibility Function
public __construct(array $elements=array(), mixed $key=null) : void
public render() : void

This class extends \Grav\Common\Assets\BaseAsset

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


Class: \Grav\Common\Assets\BaseAsset (abstract)

Visibility Function
public __construct(array $elements=array(), mixed $key=null) : void
public getAsset() : mixed
public getRemote() : mixed
public init(mixed $asset, mixed $options) : void
public static isRemoteLink(string $link) : bool
Determine whether a link is local or remote. Understands both "http://" and "https://" as well as protocol agnostic links "//"
public jsonSerialize() : array
Implements JsonSerializable interface.
public abstract render() : void
public setPosition(mixed $position) : void
protected buildLocalLink(string $asset) : string the final link url to the asset
Build local links including grav asset shortcodes
protected cssRewrite(string $file, string $dir, bool $local) : void
Placeholder for AssetUtilsTrait method
protected gatherLinks(array $assets, bool $css=true) : string
Download and concatenate the content of several 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 renderAttributes() : string
Build an HTML attribute string from an array.
protected renderQueryString(string $asset=null) : string
Render Querystring

This class extends \Grav\Framework\Object\PropertyObject

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


Class: \Grav\Common\Assets\InlineJs

Visibility Function
public __construct(array $elements=array(), mixed $key=null) : void
public render() : void

This class extends \Grav\Common\Assets\BaseAsset

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


Class: \Grav\Common\Assets\Pipeline

Visibility Function
public __construct(array $elements=array(), \string $key=null) : void
public static isRemoteLink(string $link) : bool
Determine whether a link is local or remote. Understands both "http://" and "https://" as well as protocol agnostic links "//"
public renderCss(array $assets, string $group, array $attributes=array()) : bool/string URL or generated content if available, else false
Minify and concatenate CSS
public renderJs(array $assets, string $group, array $attributes=array()) : bool/string URL or generated content if available, else false
Minify and concatenate JS files.
protected cssRewrite(string $file, string $dir, bool $local) : mixed
Finds relative CSS urls() and rewrites the URL with an absolute one
protected gatherLinks(array $assets, bool $css=true) : string
Download and concatenate the content of several 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 renderAttributes() : string
Build an HTML attribute string from an array.
protected renderQueryString(string $asset=null) : string
Render Querystring

This class extends \Grav\Framework\Object\PropertyObject

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


Class: \Grav\Common\Assets\Css

Visibility Function
public __construct(array $elements=array(), mixed $key=null) : void
public render() : void

This class extends \Grav\Common\Assets\BaseAsset

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


Class: \Grav\Common\Backup\Backups

Visibility Function
public static backup(int $id, \callable $status=null) : null/string
Backup
public static getAvailableBackups(bool $force=false) : mixed
public getBackupDownloadUrl(mixed $backup, mixed $base_url) : mixed
public getBackupNames() : mixed
public static getBackupProfiles() : mixed
public static getPurgeConfig() : mixed
public static getTotalBackupsSize() : mixed
public init() : void
public onSchedulerInitialized(\RocketTheme\Toolbox\Event\Event $event) : void
public static purge() : void
public setup() : void
protected static convertExclude(mixed $exclude) : void


Class: \Grav\Common\Config\CompiledLanguages

Visibility Function
public __construct(mixed $cacheFolder, array $files, mixed $path) : void
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 __construct(mixed $cacheFolder, array $files, mixed $path) : void
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 flattenByLang(mixed $lang) : void
public mergeRecursive(array $data) : void
public modified(mixed $modified=null) : void
public reformat() : void
public timestamp(mixed $timestamp=null) : void
public unflatten(mixed $array) : void

This class extends \Grav\Common\Data\Data

This class implements \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \JsonSerializable, \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
DEPRECATED - 1.5 Use Grav::instance()['languages'] instead.
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, \JsonSerializable, \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, \JsonSerializable, \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

Class CompiledBlueprints

Visibility Function
public __construct(mixed $cacheFolder, array $files, mixed $path) : void
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 __clone() : void
public addDynamicHandler(\string $name, \callable $callable) : void
public extra(array $data, string $prefix='') : array
Return data fields that do not exist in blueprints.
public filter(array $data, \bool $missingValuesAsNull=false, \bool $keepEmptyValues=false) : array
Filter data by using blueprints.
public flattenData(array $data) : array
Flatten 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 init() : \Grav\Common\Data\$this
Initialize blueprints with its dynamic fields.
public mergeData(array $data1, array $data2, string $name=null, string $separator='.') : array
Merge two arrays by using blueprints.
public processForm(array $data, array $toggles=array()) : array
Process data coming from a form.
public schema() : \Grav\Common\Data\BlueprintSchema
Return blueprint data schema.
public setScope(mixed $scope) : void
public setTypes(array $types) : \Grav\Common\Data\$this
Set default values for field types.
public validate(array $data) : void
Validate data against blueprints.
protected addPropertyRecursive(mixed $field, mixed $property, mixed $value) : void
protected dynamicConfig(array $field, string $property, array $call) : void
protected dynamicData(array $field, string $property, array $call) : void
protected dynamicScope(array $field, string $property, array $call) : void
protected dynamicSecurity(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() : \Grav\Common\Data\$this
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/object $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 jsonSerialize() : void
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, \JsonSerializable, \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 filterUnset(mixed $value, array $params, array $field) : 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 typeUnset(mixed $value, array $params, array $field) : bool True if validation succeeded.
Input value which can be ignored.
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 filterCheckbox(mixed $value, array $params, array $field) : 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, bool $missingValuesAsNull=false, bool $keepEmptyValues=false) : array
Filter data by using blueprints.
public flattenData(array $data) : array
Flatten data by using blueprints.
public getType(string $name) : array
public getTypes() : array
public processForm(array $data, array $toggles=array()) : array
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, bool $missingValuesAsNull, bool $keepEmptyValues) : array
protected flattenArray(array $data, array $rules, \string $prefix) : array
protected processFormRecursive(array/null/array $data, array $toggles, array $nested) : array/null
protected validateArray(array $data, array $rules) : array

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(string $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\Archiver (abstract)

Visibility Function
public abstract addEmptyFolders(mixed $folders, \callable $status=null) : void
public abstract compress(mixed $folder, \callable $status=null) : void
public static create(mixed $compression) : mixed
public abstract extract(mixed $destination, \callable $status=null) : void
public setArchive(mixed $archive_file) : void
public setOptions(mixed $options) : void
protected getArchiveFiles(mixed $rootPath) : mixed


Class: \Grav\Common\Filesystem\RecursiveDirectoryFilterIterator

Visibility Function
public __construct(\RecursiveIterator $iterator, string $root, array $ignore_folders, array $ignore_files) : 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
public getChildren() : mixed

This class extends \RecursiveFilterIterator

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


Class: \Grav\Common\Filesystem\RecursiveFolderFilterIterator

Visibility Function
public __construct(\RecursiveIterator $iterator, array $ignore_folders=array()) : 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(string $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(string $src, string $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\Filesystem\ZipArchiver

Visibility Function
public addEmptyFolders(mixed $folders, \callable $status=null) : void
public compress(mixed $source, \callable $status=null) : void
public extract(mixed $destination, \callable $status=null) : void

This class extends \Grav\Common\Filesystem\Archiver


Class: \Grav\Common\Form\FormFlash

Visibility Function
public static clearSession(\string $sessionId) : void
public cropFile(\string $field, \string $filename, array $upload, array $crop) : bool
DEPRECATED - 1.6 For backwards compatibility only, do not use
public getLegacyFiles() : array
DEPRECATED - 1.6 For backwards compatibility only, do not use
public static getSessionTmpDir(\string $sessionId) : string
public setUser(\Grav\Common\Form\UserInterface/null/\Grav\Common\User\Interfaces\UserInterface $user=null) : \Grav\Common\Form\$this
public uploadFile(\string $field, \string $filename, array $upload) : bool
DEPRECATED - 1.6 For backwards compatibility only, do not use
protected getTmpIndex() : \RocketTheme\Toolbox\File\YamlFile
protected removeTmpDir() : void
protected removeTmpFile(\string $name) : void

This class extends \Grav\Framework\Form\FormFlash

This class implements \JsonSerializable


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() : bool
Checks if cURL is available
public static isFopenAvailable() : bool
Checks if the remote fopen request is enabled in PHP
public static isRemote(string $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(string $slug=null) : array/string
Returns the license for a Premium package
public static getLicenseFile() : \RocketTheme\Toolbox\File\FileInterface
Get's the License File object
public static set(string $slug, string $license) : bool
Returns the license for a Premium package
public static validate(string $license=null) : bool
Validates the License format


Class: \Grav\Common\GPM\Installer

Visibility Function
public static copyInstall(string $source_path, string $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 $keepExtracted=false) : bool True if everything went fine, False otherwise.
Installs a given package to a given destination.
public static isGravInstance(string $target) : bool 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()) : bool True if validation passed. False otherwise
Runs a set of checks on the destination and sets the Error if any
public static lastErrorCode() : int/string 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(string $source_path, string $install_path) : bool
public static setError(int/string $error) : void
Allows to manually set an error
public static sophisticatedInstall(string $source_path, string $install_path, array $ignores=array(), bool $keep_source=false) : bool
public static unZip(string $zip_file, string $destination) : bool/string
Unzip a file to somewhere
public static uninstall(string $path, array $options=array()) : bool True if everything went fine, False otherwise.
Uninstalls one or more given package


Class: \Grav\Common\GPM\GPM

Visibility Function
public __construct(bool $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(array $packages_names_list) : void
Check the passed packages list can be updated
public static copyPackage(string $package_file, string $tmp) : null/string
Copy the local zip package to tmp
public countInstalled() : int Amount of installed packages
Returns the amount of locally installed packages
public countUpdates() : int Amount of available updates
Returns the amount of updates available
public static downloadPackage(string $package_file, string $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(string $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(string $type, string $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(string $package_name) : string/null
Get the latest release of a package from the GPM
public static getPackageName(string $source) : bool/string
Try to guess the package name from the source files
public static getPackageType(string $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(string $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(string $package_slug, string $dependency_slug) : mixed
Get the required version of a dependency of a package
public isPluginInstalled(string $slug) : bool True if the Plugin has been installed. False otherwise
Checks if a Plugin is installed
public isPluginInstalledAsSymlink(mixed $slug) : bool
public isPluginUpdatable(string $plugin) : bool True if the Plugin is updatable. False otherwise
Checks if a Plugin is updatable
public isStableRelease(string $package_name) : bool
Returns true if the package latest release is stable
public isTestingRelease(string $package_name) : bool
Returns true if the package latest release is testing
public isThemeInstalled(string $slug) : bool True if the Theme has been installed. False otherwise
Checks if a Theme is installed
public isThemeUpdatable(string $theme) : bool True if the Theme is updatable. False otherwise
Checks if a Theme is Updatable
public isUpdatable(string $slug) : bool True if updatable. False otherwise or if not found
Check if a Plugin or Theme is updatable
public versionFormatIsEqualOrHigher(string $version) : bool
Check if the passed version information contains equal or higher operator Example: returns true for $version: '>=2.0'
public versionFormatIsNextSignificantRelease(string $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 __set(mixed $key, mixed $value) : void
public __toString() : void
public getData() : \Grav\Common\Data\Data
public toArray() : array
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
public jsonSerialize() : void

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

This class implements \JsonSerializable


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\YamlLinter

Visibility Function
public static lint() : void
public static lintConfig() : void
public static lintPages() : void
public static recurseFolder(mixed $path, string $extensions='md|yaml') : void
protected static extractYaml(mixed $path) : void


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(array $excerpt) : string
Rebuild HTML tag from an excerpt array
public static processImageExcerpt(array $excerpt, \Grav\Common\Page\Interfaces\PageInterface $page) : array
Process an image excerpt
public static processImageHtml(string $html, \Grav\Common\Page\Interfaces\PageInterface $page) : string Returns final HTML string
Process Grav image media URL from HTML tag
public static processLinkExcerpt(array $excerpt, \Grav\Common\Page\Interfaces\PageInterface $page, string $type='link') : mixed
Process a Link excerpt
public static processMediaActions(\Grav\Common\Helpers\Medium $medium, string/array $url) : \Grav\Common\Page\Medium\Medium
Process media actions
protected static parseUrl(string $url) : array/bool
Variation of parse_url() which works also with local streams.
protected static resolveStream(string $url) : bool/string


Class: \Grav\Common\Helpers\Base32

Visibility Function
public static decode(string $base32) : string
Decode in Base32
public static encode(string $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 truncate(mixed $text, mixed $length=100, string $ending='...', bool $exact=false, bool $considerHtml=true) : void
public static truncateLetters(string $html, int $limit, string $ellipsis='') : string Safe truncated HTML.
Safely truncates HTML by a given number of letters.
public static truncateWords(string $html, int $limit, string $ellipsis='') : string Safe truncated HTML.
Safely truncates HTML by a given number of words.


Class: \Grav\Common\Helpers\LogViewer

Visibility Function
public static levelColor(string $level) : mixed/string
Helper class to get level color
public objectTail(string $filepath, int $lines=1, bool $desc=true) : array
Get the objects of a tailed file
public parse(string $line) : array
Parse a monolog row into array bits
public static parseTrace(string $trace, int $rows=10) : array
Parse text of trace into an array of lines
public tail(string $filepath, int $lines=1) : bool/string
Optimized way to get just the last few entries of a log file


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() : string
Gets current active language
public getAvailable() : string
Gets a pipe-separated string of available languages
public getBrowserLanguages(array $accept_langs=array()) : array
DEPRECATED - 1.6 No longer used - using content negotiation.
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() : string
Gets language, active if set, else default
public getLanguageCode(string $code, string $type='name') : bool
Accessible wrapper to LanguageCodes
public getLanguageURLPrefix(string/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(string/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(string $lang) : string/bool
Sets active language manually
public setActiveFromUri(string $uri) : string
Sets the active language based on the first part of the URL
public setDefault(string $lang) : bool
Sets default language manually
public setLanguages(array $langs) : void
Sets the current supported languages manually
public translate(string/array $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(string $key, string $index, array/null $languages=null, bool $html_out=false) : string
Translate Array
public validate(string $lang) : bool
Ensures the language is valid and supported


Class: \Grav\Common\Language\LanguageCodes

Visibility Function
public static get(mixed $code, mixed $type) : mixed
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


Class: \Grav\Common\Markdown\Parsedown

Visibility Function
public __call(mixed $method, mixed $args) : void
public __construct(\Grav\Common\Markdown\PageInterface $page, array/null $defaults) : void
Parsedown constructor.
public addBlockType(string $type, string $tag, bool $continuable=false, bool $completable=false, int/null $index=null) : void
Be able to define a new Block type or override an existing one
public addInlineType(string $type, string $tag, int/null $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(array $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(\Grav\Common\Markdown\PageInterface $page, array/null $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(string $Type) : bool
Overrides the default behavior to allow for plugin-provided blocks to be completable
protected isBlockContinuable(string $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(\Grav\Common\Markdown\PageInterface $page, array/null $defaults) : void
ParsedownExtra constructor.
public addBlockType(string $type, string $tag, bool $continuable=false, bool $completable=false, int/null $index=null) : void
Be able to define a new Block type or override an existing one
public addInlineType(string $type, string $tag, int/null $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(array $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(\Grav\Common\Markdown\PageInterface $page, array/null $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(string $Type) : bool
Overrides the default behavior to allow for plugin-provided blocks to be completable
protected isBlockContinuable(string $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

This class implements \Grav\Framework\Media\Interfaces\MediaObjectInterface


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

Class implements media interface.

Visibility Function

This class implements \Grav\Framework\Media\Interfaces\MediaInterface


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

Class implements media collection interface.

Visibility Function
public getPath() : string/null
Return media path.

This class implements \Grav\Framework\Media\Interfaces\MediaCollectionInterface, \Traversable, \Iterator, \Countable, \ArrayAccess


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(string $path, string $slug) : \Grav\Common\Page\$this
Add a page with path and slug
public addPage(\Grav\Common\Page\Interfaces\PageInterface $page) : \Grav\Common\Page\$this
Add a single page to a collection
public adjacentSibling(string $path, int $direction=1) : \Grav\Common\Page\PageInterface/Collection The sibling item.
Returns the adjacent sibling based on a direction.
public batch(int $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\Interfaces\PageInterface
Returns current page.
public currentPosition(string $path) : int the index of the current page.
Returns the item in the current position.
public dateRange(string $startDate, bool $endDate=false, string/null $field=null) : \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) : bool True if item is first.
Check to see if this item is the first in the collection.
public isLast(string $path) : bool 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) : PageInterface 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(array $accessLevels) : Collection The collection
Creates new collection with only pages of one of the specified access levels
public ofOneOfTheseTypes(string[] $types) : Collection The collection
Creates new collection with only pages of one of the specified types
public ofType(string $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) : PageInterface 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\PageInterface/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(string $name, string $value) : void
Add an entry to the page's contentMeta array
public addForms(array $new) : void
public adjacentSibling(int $direction=1) : \Grav\Common\Page\PageInterface/bool the sibling page
Returns the adjacent sibling based on a direction.
public ancestor(bool $lookup=null) : PageInterface 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 $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\Interfaces\PageInterface $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() : int 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(bool $var=null) : bool 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) : PageInterface 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 forms() : array
Returns normalized list of name => form pairs.
public frontmatter(string/null $var=null) : string
Gets and Sets the page frontmatter
public getAction() : string The Action string.
Gets the action.
public getContentMeta(string/null $name=null) : string
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() : PageInterface 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 httpHeaders() : void
public httpResponseCode() : int
public id(string $var=null) : string the identifier
Gets and sets the identifier for this Page object.
public inherited(string $field) : \Grav\Common\Page\Interfaces\PageInterface
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() : bool True if item is first.
Check to see if this item is the first in an array of sub-pages.
public isLast() : bool 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(string $var=null) : mixed
Get page language
public lastModified(bool $var=null) : bool 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
DEPRECATED - 1.6
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(string $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\Interfaces\PageInterface $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() : PageInterface 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"
DEPRECATED - 1.6
public orderDir(string $var=null) : string the order, either "asc" or "desc"
DEPRECATED - 1.6
public orderManual(string $var=null) : array
DEPRECATED - 1.6
public parent(\Grav\Common\Page\Interfaces\PageInterface $var=null) : \Grav\Common\Page\PageInterface/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() : PageInterface 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(string/null $var=null) : string
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 resetMetadata() : void
Reset the metadata and pull from header again
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(array $content_meta) : array
Sets the whole content meta array in one shot
public setRawContent(string $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 $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\PageInterface/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(array/null $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\Page\CacheInterface
protected normalizeForm(mixed $form, mixed $name=null, array $rules=array()) : void
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, \Grav\Common\Page\Interfaces\PageLegacyInterface, \Grav\Framework\Media\Interfaces\MediaInterface, \Grav\Common\Media\Interfaces\MediaInterface, \Grav\Common\Page\Interfaces\PageTranslateInterface, \Grav\Common\Page\Interfaces\PageRoutableInterface, \Grav\Common\Page\Interfaces\PageContentInterface


Class: \Grav\Common\Page\Media

Visibility Function
public __construct(string $path, array $media_order=null, bool $load=true) : void
public __wakeup() : void
Initialize static variables on unserialize.
public offsetExists(mixed $offset) : bool
public offsetGet(mixed $offset) : mixed
public path() : string
DEPRECATED - 1.6 Use $this->getPath() instead.
protected init() : void
Initialize class.

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

This class implements \Grav\Framework\Media\Interfaces\MediaCollectionInterface, \Traversable, \Iterator, \Countable, \ArrayAccess, \Grav\Common\Media\Interfaces\MediaCollectionInterface, \RocketTheme\Toolbox\ArrayTraits\ExportInterface


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\Interfaces\PageInterface $page, string $route=null) : void
Adds a page and assigns a route to it.
public all(\Grav\Common\Page\Interfaces\PageInterface $current=null) : \Grav\Common\Page\Collection
Get all pages
public ancestor(string $route, string $path=null) : \Grav\Common\Page\PageInterface/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\PageInterface/null
Dispatch URI to a page.
public find(string $route, bool $all=false) : \Grav\Common\Page\PageInterface/null
alias method to return find a page.
public get(string $path) : \Grav\Common\Page\Interfaces\PageInterface
Get a page instance.
public static getHomeRoute() : string
Gets the home route
public getList(\Grav\Common\Page\Interfaces\PageInterface $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\PageInterface/null
Get a page ancestor trait.
public init() : void
Class initialization. Must be called before using this class.
public instances() : array/\Grav\Common\Page\PageInterface[]
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(string $pages_dir) : void
Accessible method to manually reset the pages cache
public root() : \Grav\Common\Page\Interfaces\PageInterface
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 setCheckMethod(mixed $method) : void
public sort(\Grav\Common\Page\Interfaces\PageInterface $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, string/int $orderBy, string $orderDir='asc', array/null $orderManual=null, int/null $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/null $manual=null, int/null $sort_flags=null) : void
protected recurse(string $directory, \Grav\Common\Page\PageInterface/null/\Grav\Common\Page\Interfaces\PageInterface $parent=null) : \Grav\Common\Page\Interfaces\PageInterface
Recursive function to load & build page relationships.


Interface: \Grav\Common\Page\Interfaces\PageRoutableInterface

Visibility Function
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 canonical(bool $include_lang=true) : string
Returns the canonical URL for a page
public currentPosition() : int the index of the current page.
Returns the item in the current position.
public folder(string $var=null) : string/null
Get/set the folder.
public home() : bool True if it is the homepage
Returns whether or not this page is the currently configured home page.
public link(bool $include_host=false) : string the permalink
Gets the URL for a page - alias of url().
public parent(\Grav\Common\Page\Interfaces\PageInterface $var=null) : \Grav\Common\Page\Interfaces\PageInterface/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 rawRoute(string/null $var=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(string/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 topParent() : \Grav\Common\Page\Interfaces\PageInterface/null the top parent page object if it exists.
Gets the top parent object for this page
public unsetRouteSlug() : void
Helper method to clear the route out so it regenerates next time you use it
public url(bool $include_host=false, bool $canonical=false, bool $include_lang=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.


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

Class implements page interface.

Visibility Function

This class implements \Grav\Common\Page\Interfaces\PageContentInterface, \Grav\Common\Page\Interfaces\PageRoutableInterface, \Grav\Common\Page\Interfaces\PageTranslateInterface, \Grav\Common\Media\Interfaces\MediaInterface, \Grav\Framework\Media\Interfaces\MediaInterface, \Grav\Common\Page\Interfaces\PageLegacyInterface


Interface: \Grav\Common\Page\Interfaces\PageLegacyInterface

Visibility Function
public addContentMeta(string $name, string $value) : void
Add an entry to the page's contentMeta array
public addForms(array $new) : void
public adjacentSibling(int $direction=1) : \Grav\Common\Page\Interfaces\PageInterface/bool the sibling page
Returns the adjacent sibling based on a direction.
public ancestor(bool $lookup=null) : PageInterface 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 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 $pagination=true) : \Grav\Common\Page\Collection
Get a collection of pages in the current context.
public contentMeta() : mixed
Get the contentMeta array and initialize content first if it's not already
public copy(\Grav\Common\Page\Interfaces\PageInterface $parent) : \Grav\Common\Page\Interfaces\$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 debugger() : mixed
Returns the state of the debugger override etting for this page
public eTag(bool $var=null) : bool 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 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\Interfaces\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) : PageInterface page you were looking for if it exists
Helper method to return a page.
public folderExists() : bool
Returns whether or not the current folder exists
public forms() : array
Returns normalized list of name => form pairs.
public frontmatter(string/null $var=null) : string
Gets and Sets the page frontmatter
public getAction() : string The Action string.
Gets the action.
public getContentMeta(string/null $name=null) : mixed
Return the whole contentMeta array as it currently stands
public getOriginal() : PageInterface The original version of the page.
Gets the Page Unmodified (original) version of the page.
public httpHeaders() : void
public httpResponseCode() : int
public inherited(string $field) : \Grav\Common\Page\Interfaces\PageInterface
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\Interfaces\$this
Initializes the page instance variables based on a file
public isFirst() : bool True if item is first.
Check to see if this item is the first in an array of sub-pages.
public isLast() : bool True if item is last
Check to see if this item is the last in an array of sub-pages.
public maxCount(int $var=null) : int the maximum number of sub-pages
DEPRECATED - 1.6
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 modifyHeader(string $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\Interfaces\PageInterface $parent) : \Grav\Common\Page\Interfaces\$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() : PageInterface the next Page item
Gets the next sibling based on current position.
public orderBy(string $var=null) : string supported options include "default", "title", "date", and "folder"
DEPRECATED - 1.6
public orderDir(string $var=null) : string the order, either "asc" or "desc"
DEPRECATED - 1.6
public orderManual(string $var=null) : array
DEPRECATED - 1.6
public prevSibling() : PageInterface the previous Page item
Gets the previous sibling based on current position.
public raw(string $var=null) : string Raw content string
Gets and Sets the raw data
public save(bool/bool/mixed $reorder=true) : void
Save page if there's a file assigned to it.
public setContentMeta(array $content_meta) : array
Sets the whole content meta array in one shot
public setSummary(string $summary) : void
Sets the summary of the page
public ssl(mixed $var=null) : void
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 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 validate() : void
Validate page header.


Interface: \Grav\Common\Page\Interfaces\PageContentInterface

Methods currently implemented in Flex Page emulation layer.

Visibility Function
public content(string $var=null) : string Content
Gets and Sets the content based on content portion of the .md file
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 exists() : bool
Returns whether the page exists in the filesystem.
public folder(string $var=null) : string/null
Get/set the folder.
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 id(string $var=null) : string the identifier
Gets and sets the identifier for this Page object.
public isDir() : bool True if its a directory
Returns whether or not this Page object is a directory or a page.
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 lastModified(boolean $var=null) : boolean show last_modified header
Gets and sets the option to show the last_modified header for the page.
public media(\Grav\Common\Page\Interfaces\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 modified(int $var=null) : int modified unix timestamp
Gets and sets the modified timestamp.
public order(int $var=null) : int/bool
Get/set order number of this page.
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 rawMarkdown(string/null $var=null) : null
Gets and Sets the Page raw content
public setRawContent(string $content) : void
Needed by the onPageContentProcessed event to set the raw page content
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 summary(int $size=null, bool $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 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 unpublishDate(string $var=null) : int/null unix timestamp representation of the date
Gets and Sets the Page unpublish date
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


Interface: \Grav\Common\Page\Interfaces\PageTranslateInterface

Visibility Function
public language(string $var=null) : mixed
Get page language
public translatedLanguages(bool $onlyPublished=false) : array the page translated languages
Return an array with the routes of other translated languages
public untranslatedLanguages(bool $includeUnpublished=false) : array the page untranslated languages
Return an array listing untranslated languages available


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(string $urlImage) : \Grav\Common\Page\Medium\$this
Allows to set the video's poster image
public preload(null $status=null) : \Grav\Common\Page\Medium\$this
Allows ability to set the preload option
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 $reset=true) : array
Parsedown element for source display mode

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

This class implements \Grav\Framework\Media\Interfaces\MediaObjectInterface, \Grav\Common\Media\Interfaces\MediaObjectInterface, \Grav\Common\Page\Medium\RenderableInterface, \Grav\Common\Data\DataInterface, \ArrayAccess, \Countable, \JsonSerializable, \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 fromUploadedFile(\Grav\Framework\Form\FormFlashFile $uploadedFile, array $params=array()) : \Grav\Common\Page\Medium\Medium
Create Medium from an uploaded 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 $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, array $extras=array()) : 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
public generateHash(string $type='guess', int $quality=80, array $extras=array()) : void
Generates the hash.
public getHash(string $type='guess', int $quality=80, array/\Grav\Common\Page\Medium[] $extras=array()) : null
Gets the hash.

This class extends \Gregwar\Image\Image


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

Class 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(int/float $ratio, \Grav\Common\Page\Medium\Medium $alternative) : void
Add alternative Medium to this Medium.
public addMetaFile(string $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(string $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 $reset=true) : \Grav\Common\Page\Medium\Link
Turn the current Medium into a Link with lightbox enabled
public link(bool $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 modified() : int/null
Get file modification time for the medium.
public parsedownElement(string $title=null, string $alt=null, string $class=null, string $id=null, bool $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 $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 setTimestamp(string/int/null $timestamp=null) : \Grav\Common\Page\Medium\$this
Set querystring to file modification timestamp (or value provided as a parameter).
public size() : int
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 $withHash=true) : string
Get/set hash for the file's url
public urlQuerystring(string $url) : string
Get the URL with full querystring
protected getThumbnail() : \Grav\Common\Page\Medium\ThumbnailImageMedium
Get the thumbnail Medium object
protected sourceParsedownElement(array $attributes, bool $reset=true) : array
Parsedown element for source display mode
protected textParsedownElement(array $attributes, bool $reset=true) : array
Parsedown element for text display mode

This class extends \Grav\Common\Data\Data

This class implements \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \JsonSerializable, \Countable, \ArrayAccess, \Grav\Common\Data\DataInterface, \Grav\Common\Page\Medium\RenderableInterface, \Grav\Common\Media\Interfaces\MediaObjectInterface, \Grav\Framework\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(string $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(string $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 $reset=true) : array
Parsedown element for source display mode

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

This class implements \Grav\Framework\Media\Interfaces\MediaObjectInterface, \Grav\Common\Media\Interfaces\MediaObjectInterface, \Grav\Common\Page\Medium\RenderableInterface, \Grav\Common\Data\DataInterface, \ArrayAccess, \Countable, \JsonSerializable, \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(string $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, int $max_width=2500, int $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 $reset=true) : \Grav\Common\Page\Medium\Link
Turn the current Medium into a Link with lightbox enabled
public link(bool $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) : int/\Grav\Common\Page\Medium\$this
Sets or gets the quality of the image
public reset() : \Grav\Common\Page\Medium\$this
Reset image.
public setImagePrettyName(string $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 $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\Framework\Media\Interfaces\MediaObjectInterface, \Grav\Common\Media\Interfaces\MediaObjectInterface, \Grav\Common\Page\Medium\RenderableInterface, \Grav\Common\Data\DataInterface, \ArrayAccess, \Countable, \JsonSerializable, \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 getPath() : null
Return media path.
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\Framework\Media\Interfaces\MediaCollectionInterface, \Traversable, \Iterator, \Countable, \ArrayAccess, \Grav\Common\Media\Interfaces\MediaCollectionInterface, \RocketTheme\Toolbox\ArrayTraits\ExportInterface


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 $reset=true) : array
Parsedown element for source display mode

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

This class implements \Grav\Framework\Media\Interfaces\MediaObjectInterface, \Grav\Common\Media\Interfaces\MediaObjectInterface, \Grav\Common\Page\Medium\RenderableInterface, \Grav\Common\Data\DataInterface, \ArrayAccess, \Countable, \JsonSerializable, \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 add(string $name, \Grav\Common\Page\Medium\MediaObjectInterface $file) : void
public all() : \Grav\Common\Media\Interfaces\MediaObjectInterface[]
Get a list of all media.
public audios() : \Grav\Common\Media\Interfaces\MediaObjectInterface[]
Get a list of all audio media.
public count() : int
Implements Countable interface.
public current() : mixed Can return any type.
Returns the current element.
public files() : \Grav\Common\Media\Interfaces\MediaObjectInterface[]
Get a list of all file media.
public get(string $filename) : \Grav\Common\Page\Medium\Medium/null
Get medium by filename.
public getPath() : string
Return media path.
public images() : \Grav\Common\Media\Interfaces\MediaObjectInterface[]
Get a list of all image media.
public key() : mixed Returns scalar on success, or NULL on failure.
Returns the key of the current element.
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 rewind() : void
Rewinds back to the first element of the Iterator.
public setPath(\string $path) : void
public setTimestamps(string/int/null $timestamp=null) : \Grav\Common\Page\Medium\$this
Set file modification timestamps (query params) for all the media files.
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.
public videos() : \Grav\Common\Media\Interfaces\MediaObjectInterface[]
Get a list of all video media.
protected getFileParts(string $filename) : array
Get filename, extension and meta part.
protected orderMedia(array $media) : array
Order the media based on the page's media_order

This class implements \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \Grav\Common\Media\Interfaces\MediaCollectionInterface, \ArrayAccess, \Countable, \Iterator, \Traversable, \Grav\Framework\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 $reset=true) : \Grav\Common\Page\Medium\Link
Turn the current Medium into a Link with lightbox enabled
public link(bool $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 $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 $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, \JsonSerializable, \Countable, \ArrayAccess, \Grav\Common\Data\DataInterface, \Grav\Common\Page\Medium\RenderableInterface, \Grav\Common\Media\Interfaces\MediaObjectInterface, \Grav\Framework\Media\Interfaces\MediaObjectInterface


Class: \Grav\Common\Processors\ConfigurationProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\ErrorsProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


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

Visibility Function
public __construct(\Grav\Common\Grav $container) : void
protected addMessage(mixed $message, string $label='info', bool $isString=true) : void
protected startTimer(mixed $id=null, mixed $title=null) : void
protected stopTimer(mixed $id=null) : void

This class implements \Grav\Common\Processors\ProcessorInterface, \Psr\Http\Server\MiddlewareInterface


Class: \Grav\Common\Processors\TasksProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\PluginsProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\DebuggerProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\TwigProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\DebuggerAssetsProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\InitializeProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\BackupsProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\AssetsProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\RequestProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\ThemesProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\LoggerProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\RenderProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Interface: \Grav\Common\Processors\ProcessorInterface

Visibility Function

This class implements \Psr\Http\Server\MiddlewareInterface


Class: \Grav\Common\Processors\SchedulerProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\PagesProcessor

Visibility Function
public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : void

This class extends \Grav\Common\Processors\ProcessorBase

This class implements \Psr\Http\Server\MiddlewareInterface, \Grav\Common\Processors\ProcessorInterface


Class: \Grav\Common\Processors\Events\RequestHandlerEvent

Visibility Function
public addMiddleware(\string $name, \Psr\Http\Server\MiddlewareInterface $middleware) : \Grav\Common\Processors\Events\RequestHandlerEvent
public getHandler() : \Grav\Framework\RequestHandler\RequestHandler
public getRequest() : \Psr\Http\Message\ServerRequestInterface
public getResponse() : \Grav\Common\Processors\Events\ResponseInterface/null
public getRoute() : \Grav\Framework\Route\Route
public setResponse(\Psr\Http\Message\ResponseInterface $response) : \Grav\Common\Processors\Events\$this

This class extends \RocketTheme\Toolbox\Event\Event

This class implements \ArrayAccess


Class: \Grav\Common\Scheduler\Cron

Visibility Function
public __construct(string/null $cron=null) : void
public getCron() : string
public getCronDaysOfMonth() : string
public getCronDaysOfWeek() : string
public getCronHours() : string
public getCronMinutes() : string
public getCronMonths() : string
public getDaysOfMonth() : array
public getDaysOfWeek() : array
public getHours() : array
public getMinutes() : array
public getMonths() : array
public getText(string $lang) : string
public getType() : string
public matchExact(int/string/\DateTime $date) : void
public matchWithMargin(int/string/\DateTime $date, int $minuteBefore, int $minuteAfter) : void
public setCron(string $cron) : \Grav\Common\Scheduler\Cron
public setDaysOfMonth(string/array $dom) : \Grav\Common\Scheduler\Cron
public setDaysOfWeek(string/array $dow) : \Grav\Common\Scheduler\Cron
public setHours(string/array $hours) : \Grav\Common\Scheduler\Cron
public setMinutes(string/array $minutes) : \Grav\Common\Scheduler\Cron
public setMonths(string/array $months) : \Grav\Common\Scheduler\Cron
protected arrayToCron(array $array) : string
protected cronToArray(array/string $string, int $min, int $max) : array
protected parseDate(mixed $date, int $min, int $hour, int $day, int $month, int $weekday) : \DateTime


Class: \Grav\Common\Scheduler\Scheduler

Visibility Function
public __construct() : void
Create new instance.
public addCommand(string $command, array $args=array(), string $id=null) : \Grav\Common\Scheduler\Job
Queue a raw shell command.
public addFunction(\callable $fn, array $args=array(), string $id=null) : \Grav\Common\Scheduler\Job
Queues a PHP function execution.
public clearJobs() : void
Remove all queued Jobs.
public getAllJobs() : array
Get all jobs if they are disabled or not as one array
public getCronCommand() : string
Helper to get the full Cron command
public getJobStates() : \RocketTheme\Toolbox\File\FileInterface/\Grav\Common\Scheduler\YamlFile
Get the Job states file
public getQueuedJobs(bool $all=false) : array
Get the queued jobs as background/foreground
public getVerboseOutput(string $type='text') : mixed The return depends on the requested $type
Get the scheduler verbose output.
public isCrontabSetup() : int
Helper to determine if cron job is setup
public loadSavedJobs() : mixed
Load saved jobs from config/scheduler.yaml file
public resetRun() : void
Reset all collected data of last run. Call before run() if you call run() multiple times.
public run(\DateTime/null/\DateTime $runTime=null) : void
Run the scheduler.


Class: \Grav\Common\Scheduler\Job

Visibility Function
public __construct(string/callable $command, array $args=array(), string $id=null) : void
Create a new Job instance.
public april(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every April.
public at(string $expression) : \Grav\Common\Scheduler\self
Set the Job execution time. *compo
public august(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every August.
public backlink(string $link=null) : null/string
Sets/Gets an option backlink
public before(\callable $fn) : \Grav\Common\Scheduler\self
Set function to be called before job execution Job object is injected as a parameter to callable function.
public configure(array $config=array()) : \Grav\Common\Scheduler\self
Configure the job.
public daily(int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to once a day.
public december(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every December.
public email(string/array $email) : \Grav\Common\Scheduler\self
Set the emails where the output should be sent to. The Job should be set to write output to a file for this to work.
public everyMinute() : \Grav\Common\Scheduler\self
Set the execution time to every minute.
public february(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every February.
public finalize() : void
Finish up processing the job
public friday(int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every Friday.
public getArguments() : string/null
Get optional arguments
public getAt() : string
Get the cron 'at' syntax for this job
public getCommand() : string
Get the command
public getCronExpression() : mixed
public getEnabled() : bool
Get the status of this job
public getId() : string
Get the Job id.
public getOutput() : mixed
Get the job output.
public hourly(int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every hour.
public inForeground() : \Grav\Common\Scheduler\$this
Force the Job to run in foreground.
public isDue(\DateTime $date=null) : bool
Check if the Job is due to run. It accepts as input a DateTime used to check if the job is due. Defaults to job creation time. It also default the execution time if not previously defined.
public isOverlapping() : bool
Check if the Job is overlapping.
public isSuccessful() : bool
Get the status of the last run for this job
public january(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every January.
public july(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every July.
public june(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every June.
public march(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every March.
public may(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every May.
public monday(int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every Monday.
public monthly(string/int/string $month='*', int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to once a month.
public november(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every November.
public october(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every October.
public onlyOne(string $tempDir=null, \callable $whenOverlapping=null) : \Grav\Common\Scheduler\self
This will prevent the Job from overlapping. It prevents another instance of the same Job of being executed if the previous is still running. The job id is used as a filename for the lock file.
public output(string/array $filename, bool $append=false) : \Grav\Common\Scheduler\self
Set the file/s where to write the output of the job.
public run() : bool
Run the job.
public runInBackground() : bool
Check if the Job can run in background.
public saturday(int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every Saturday.
public september(int/string $day=1, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every September.
public sunday(int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every Sunday.
public then(\callable $fn, bool $runInBackground=false) : \Grav\Common\Scheduler\self
Set a function to be called after job execution. By default this will force the job to run in foreground because the output is injected as a parameter of this function, but it could be avoided by passing true as a second parameter. The job will run in background if it meets all the other criteria.
public thursday(int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every Thursday.
public tuesday(int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every Tuesday.
public wednesday(int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to every Wednesday.
public weekly(int/string $weekday, int/string $hour, int/string $minute) : \Grav\Common\Scheduler\self
Set the execution time to once a week.
public when(\callable $fn) : \Grav\Common\Scheduler\self
Truth test to define if the job should run if due.


Class: \Grav\Common\Service\BackupsServiceProvider

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

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\AccountsServiceProvider

Visibility Function
public register(\Pimple\Container $container) : void
protected dataAccounts(\Pimple\Container $container) : void
protected flexAccounts(\Pimple\Container $container) : void
protected getFlexStorage(mixed $config) : mixed

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\FilesystemServiceProvider

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

This class implements \Pimple\ServiceProviderInterface


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\PagesServiceProvider

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

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\SchedulerServiceProvider

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

This class implements \Pimple\ServiceProviderInterface


Class: \Grav\Common\Service\InflectorServiceProvider

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

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\RequestServiceProvider

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(string $string) : mixed
public arrayFilter(mixed $input) : array
Casts input to array.
public arrayIntersectFunc(array $array1, array $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(string $str) : bool/string
Return Base32 decoded string
public base32EncodeFilter(string $str) : string
Return Base32 encoded string
public base64DecodeFilter(string $str) : bool/string
Return Base64 decoded string
public base64EncodeFilter(string $str) : string
Return Base64 encoded string
public bodyClassFunc(string/string[] $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(string $value, int $chars, string $split='-') : string
Wrapper for chunk_split() function
public containsFilter(string $haystack, string $needle) : bool
determine if a string contains another
public cronFunc(string $at) : \Cron\CronExpression
Get Cron object for a crontab 'at' format
public definedDefaultFilter(mixed $value, null $default=null) : null
public dump(\Twig_Environment $env, string $context) : void
Based on Twig_Extension_Debug / twig_var_dump (c) 2011 Fabien Potencier
public endsWithFilter(string $haystack, string $needle) : bool
public evaluateStringFunc(array $context, string $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(string $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 getTypeFunc(mixed $var) : string
Function/Filter to return the type of variable
public gistFunc(string $id, bool/string/bool $file=false) : string
Output a Gist
public inflectorFilter(string $action, string $data, int $count=null) : string
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() : bool 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(string $value, null $chars=null) : string
public markdownFunction(string $string, bool $block=true) : mixed/string
public md5Filter(string $str) : string
Return MD5 hash from the input.
public mediaDirFunc(string $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 niceCronFilter(mixed $at) : string
Gets a human readable output for cron sytnax
public niceFilesizeFunc(int $bytes) : string
Returns a nicer more readable filesize based on bytes
public niceNumberFunc(int/float/string $n) : string/bool
Returns a nicer more readable number
public nicetimeFunc(string $date, bool $long_strings=true, bool $show_tense=true) : bool
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 ofTypeFunc(mixed $var, string/null $typeTest=null, string/null $className=null) : bool
Function/Filter to test type of variable
public static padFilter(string $input, int $pad_length, string $pad_string=' ', int $pad_type=1) : string
Pad a string to a certain length with another string
public pageHeaderVarFunc(string $var, string/string[]/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(string $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(array $array, string $regex, int $flags) : array
Twig wrapper for PHP's preg_grep method
public regexReplace(mixed $subject, mixed $pattern, mixed $replace, int $limit=-1) : string/string[]/null 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(string $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(string $haystack, string $needle) : bool
public stringFilter(mixed $input) : string
Casts input to string.
public stringFunc(array/string $value) : string
Returns a string from a value. If the value is array, return it json encoded
public themeVarFunc(string $var, bool $default=null) : string
Get a theme variable
public translate(\Twig_Environment $twig) : string
public translateArray(string $key, string $index, array/null $lang=null) : string
public translateFunc() : string
Translate a string
public translateLanguage(string/array $args, array/null/array $languages=null, bool $array_support=false, bool $html_out=false) : string
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(string/array $data) : bool/string/array
Allow quick check of a string for XSS Vulnerabilities
public yamlDecodeFilter(string $data) : array
Decode/Parse data from YAML format
public yamlEncodeFilter(array $data, int $inline=10) : string
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(string $template_path, string $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(string $template_path, string $namespace='__main__') : void
Wraps the Twig_Loader_Filesystem prependPath method (should be used only in onTwigLoader() event
public processPage(\Grav\Common\Page\Interfaces\PageInterface $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(bool $state) : void
DEPRECATED - 1.5 Auto-escape should always be turned on to protect against XSS issues (can be disabled per template file).
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(string $file, string $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\Node $body, int $lineno, string $tag='markdown') : void
TwigNodeMarkdown 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\NodeOutputInterface


Class: \Grav\Common\Twig\Node\TwigNodeThrow

Visibility Function
public __construct(int $code, \Twig\Node\Node $message, int $lineno, string/null $tag=null) : void
TwigNodeThrow 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


Class: \Grav\Common\Twig\Node\TwigNodeRender

Visibility Function
public __construct(\Twig\Node\Expression\AbstractExpression $object, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $layout, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $context, int $lineno, string/null $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, \Twig\Node\NodeCaptureInterface


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

Visibility Function
public __construct(\Twig\Node\Node $try, \Grav\Common\Twig\Node\Node/null/\Twig\Node\Node $catch=null, int $lineno, string/null $tag=null) : void
TwigNodeTryCatch 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


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

Visibility Function
public __construct(\Grav\Common\Twig\Node\Node/null/\Twig\Node\Node $body=null, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $file=null, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $group=null, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $priority=null, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $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(\Grav\Common\Twig\Node\Node/null/\Twig\Node\Node $body=null, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $file=null, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $group=null, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $priority=null, \Grav\Common\Twig\Node\AbstractExpression/null/\Twig\Node\Expression\AbstractExpression $attributes=null, int $lineno, string/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\Node $value, \Twig\Node\Node $cases, \Grav\Common\Twig\Node\Node/null/\Twig\Node\Node $default=null, int $lineno, string/null $tag=null) : void
TwigNodeSwitch 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


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) : 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\TwigTokenParserRender

    Renders an object. {% render object layout: 'default' with { variable: true } %}

    Visibility Function
    public getTag() : string The tag name
    Gets the tag name associated with this token parser.
    public parse(\Twig\Token $token) : 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\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\TwigTokenParserThrow

    Handles try/catch in template file.

     {% throw 404 'Not Found' %} 
    Visibility Function
    public getTag() : string The tag name
    Gets the tag name associated with this token parser.
    public parse(\Twig\Token $token) : 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\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) : 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) : 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, \JsonSerializable, \Countable, \ArrayAccess, \Grav\Common\Data\DataInterface


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

    Visibility Function
    public static create(string $password) : string
    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\DataUser\User

    Visibility Function
    public __construct(array $items=array(), \Grav\Common\User\DataUser\Blueprint $blueprints=null) : void
    User constructor.
    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 - 1.5 Use ->authorize() method instead.
    public authorize(\string $action, \string $scope=null) : bool
    Checks user authorization to the action.
    public avatarUrl() : string
    DEPRECATED - 1.6 Use ->getAvatarUrl() method instead.
    public count() : int
    DEPRECATED - 1.6 Method makes no sense for user account.
    public getAvatarImage() : \Grav\Common\User\DataUser\ImageMedium/null
    Return media object for the User's avatar. Note: if there's no local avatar image for the user, you should call getAvatarUrl() to get the external avatar URL.
    public getAvatarMedia() : \Grav\Common\User\DataUser\ImageMedium/null
    DEPRECATED - 1.6 Use ->getAvatarImage() method instead.
    public getAvatarUrl() : string
    Return the User's avatar URL
    public getMedia() : mixed
    public getMediaFolder() : mixed
    public getMediaOrder() : mixed
    public isValid() : bool
    public merge(array $data) : \Grav\Common\User\DataUser\$this
    DEPRECATED - 1.6 Use ->update($data) instead (same but with data validation & filtering, file upload support).
    public offsetExists(string $offset) : bool
    public offsetGet(string $offset) : mixed
    public save() : void
    Save user without the username
    public update(array $data, array $files=array()) : \Grav\Common\User\DataUser\$this
    Update object with data
    protected getAvatarFile() : mixed

    This class extends \Grav\Common\Data\Data

    This class implements \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \JsonSerializable, \Countable, \ArrayAccess, \Grav\Common\Data\DataInterface, \Grav\Common\User\Interfaces\UserInterface, \Grav\Framework\Media\Interfaces\MediaInterface, \Grav\Common\Media\Interfaces\MediaInterface


    Class: \Grav\Common\User\DataUser\UserCollection

    Visibility Function
    public __construct(\string $className) : void
    UserCollection constructor.
    public count() : void
    public delete(string $username) : bool True if the action was performed
    Remove user account.
    public find(string $query, array $fields=array()) : \Grav\Common\User\Interfaces\UserInterface
    Find a user by username, email, etc
    public load(string $username) : \Grav\Common\User\Interfaces\UserInterface
    Load user account. Always creates user object. To check if user exists, use $this->exists().

    This class implements \Grav\Common\User\Interfaces\UserCollectionInterface, \Countable


    Class: \Grav\Common\User\FlexUser\User

    Flex User Flex User is mostly compatible with the older User class, except on few key areas: - Constructor parameters have been changed. Old code creating a new user does not work. - Serializer has been changed -- existing sessions will be killed.

    Visibility Function
    public __construct(array $elements, mixed $key, \Grav\Framework\Flex\FlexDirectory $directory, \bool $validate=false) : void
    public __debugInfo() : void
    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 - 1.5 Use ->authorize() method instead.
    public authorize(\string $action, \string $scope=null) : bool
    Checks user authorization to the action.
    public avatarUrl() : string
    DEPRECATED - 1.6 Use ->getAvatarUrl() method instead.
    public checkMediaFilename(\string $filename) : void
    public checkUploadedMediaFile(\Psr\Http\Message\UploadedFileInterface $uploadedFile) : void
    public count() : int
    DEPRECATED - 1.6 Method makes no sense for user account.
    public def(string $name, mixed $default=null, string $separator=null) : \Grav\Common\User\FlexUser\$this
    Set default value by using dot notation for nested arrays/objects.
    public deleteMediaFile(\string $filename) : void
    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() : \Grav\Common\User\FlexUser\$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 getAvatarImage() : \Grav\Common\User\FlexUser\ImageMedium/null
    Return media object for the User's avatar. Note: if there's no local avatar image for the user, you should call getAvatarUrl() to get the external avatar URL.
    public getAvatarMedia() : \Grav\Common\User\FlexUser\ImageMedium/null
    DEPRECATED - 1.6 Use ->getAvatarImage() method instead.
    public getAvatarUrl() : string
    Return the User's avatar URL
    public static getCachedMethods() : array
    public getDefaults() : array
    Get nested structure containing default values defined in the blueprints. Fields without default value are ignored in the list.
    public getFormValue(\string $name, mixed $default=null, \string $separator=null) : mixed
    Get value from a page variable (used mostly for creating edit forms).
    public getJoined(string $name, array/object $value, string $separator=null) : array
    Get value from the configuration and join it with given data.
    protected getMedia() : MediaCollectionInterface Representation of associated media.
    Gets the associated media collection.
    public getMediaFolder() : string
    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 getProperty(string $property, mixed $default=null) : mixed
    public getStorageFolder() : string
    public isAuthorized(\string $action, \string $scope=null, \Grav\Common\User\Interfaces\UserInterface $user=null) : bool
    public isValid() : bool
    public join(string $name, mixed $value, string $separator=null) : \Grav\Common\User\FlexUser\$this
    Join nested values together by using blueprints.
    public joinDefaults(string $name, mixed $value, string $separator=null) : \Grav\Common\User\FlexUser\$this
    Set default values by using blueprints.
    public merge(array $data) : \Grav\Common\User\FlexUser\$this
    DEPRECATED - 1.6 Use ->update($data) instead (same but with data validation & filtering, file upload support).
    public prepareStorage() : array
    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 user without the username
    public set(string $name, mixed $value, string $separator=null) : \Grav\Common\User\FlexUser\$this
    Set value by using dot notation for nested arrays/objects.
    public setDefaults(array $data) : \Grav\Common\User\FlexUser\$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=5, int $indent=2) : string A YAML string representing the object.
    Convert object into YAML string.
    public undef(string $name, string $separator=null) : \Grav\Common\User\FlexUser\$this
    Unset value by using dot notation for nested arrays/objects.
    public uploadMediaFile(\Psr\Http\Message\UploadedFileInterface $uploadedFile, \string $filename=null) : void
    public validate() : \Grav\Common\User\FlexUser\$this
    Validate by blueprints.
    protected clearMediaCache() : void
    Clear media cache.
    protected createMedium(string $uri) : \Grav\Common\User\FlexUser\Medium/null
    protected doSerialize() : array
    protected doUnserialize(array $serialized) : void
    protected getMediaCache() : \Grav\Common\User\FlexUser\Cache
    protected getOriginalMedia() : MediaCollectionInterface Representation of associated media.
    Gets the associated media collection (original images).
    protected getUpdatedMedia() : array
    protected isAuthorizedAction(\Grav\Common\User\Interfaces\UserInterface $user, \string $action, \string $scope=null) : bool
    protected isAuthorizedSuperAdmin(\Grav\Common\User\Interfaces\UserInterface $user) : bool
    protected offsetLoad_media() : void
    protected offsetSerialize_media() : void
    protected parseFileProperty(array $value) : array
    protected saveUpdatedMedia() : void
    protected setAuthorizeRule(\string $authorize) : void
    protected setMedia(\Grav\Common\Media\Interfaces\MediaCollectionInterface $media) : \Grav\Common\User\FlexUser\$this
    Sets the associated media collection.
    protected setUpdatedMedia(array $files) : void
    Examples of User::def()
    $data->def('this.is.my.nested.variable', 'default');
    Examples of User::get()
    $value = $this->get('this.is.my.nested.variable');
    Examples of User::set()
    $data->set('this.is.my.nested.variable', $value);
    Examples of User::undef()
    $data->undef('this.is.my.nested.variable');

    This class extends \Grav\Framework\Flex\FlexObject

    This class implements \Grav\Framework\Flex\Interfaces\FlexAuthorizeInterface, \Grav\Framework\Flex\Interfaces\FlexCommonInterface, \Grav\Framework\Interfaces\RenderInterface, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Serializable, \JsonSerializable, \Grav\Framework\Object\Interfaces\ObjectInterface, \ArrayAccess, \Grav\Framework\Flex\Interfaces\FlexObjectInterface, \Grav\Common\User\Interfaces\UserInterface, \RocketTheme\Toolbox\ArrayTraits\ExportInterface, \Grav\Framework\Media\Interfaces\MediaInterface, \Grav\Common\Media\Interfaces\MediaInterface, \Grav\Common\Data\DataInterface, \Grav\Framework\Media\Interfaces\MediaManipulationInterface, \Countable


    Class: \Grav\Common\User\FlexUser\UserCollection

    Visibility Function
    public delete(string $username) : bool True if user account was found and was deleted.
    Delete user account.
    public find(string $query, array $fields=array()) : \Grav\Common\User\FlexUser\User
    Find a user by username, email, etc
    public load(string $username) : \Grav\Common\User\FlexUser\User
    Load user account. Always creates user object. To check if user exists, use $this->exists().

    This class extends \Grav\Framework\Flex\FlexCollection

    This class implements \Grav\Framework\Flex\Interfaces\FlexCommonInterface, \Grav\Framework\Interfaces\RenderInterface, \Grav\Framework\Flex\Interfaces\FlexCollectionInterface, \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, \Grav\Common\User\Interfaces\UserCollectionInterface


    Class: \Grav\Common\User\FlexUser\UserIndex

    Visibility Function
    public find(string $query, array $fields=array()) : \Grav\Common\User\FlexUser\User
    Find a user by username, email, etc
    public load(string $username) : \Grav\Common\User\FlexUser\User
    Load user account. Always creates user object. To check if user exists, use $this->exists().
    public static loadEntriesFromStorage(\Grav\Framework\Flex\Interfaces\FlexStorageInterface $storage) : array
    protected static getIndexFile(\Grav\Framework\Flex\Interfaces\FlexStorageInterface $storage) : mixed
    protected static onChanges(array $entries, array $added, array $updated, array $removed) : void
    protected static updateIndexData(mixed $entry, array $data) : void

    This class extends \Grav\Framework\Flex\FlexIndex

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


    Class: \Grav\Common\User\FlexUser\Storage\UserFolderStorage

    Visibility Function

    This class extends \Grav\Framework\Flex\Storage\FolderStorage

    This class implements \Grav\Framework\Flex\Interfaces\FlexStorageInterface


    Class: \Grav\Common\User\FlexUser\Storage\UserFileStorage

    Visibility Function

    This class extends \Grav\Framework\Flex\Storage\FileStorage

    This class implements \Grav\Framework\Flex\Interfaces\FlexStorageInterface


    Interface: \Grav\Common\User\Interfaces\UserInterface

    Interface UserInterface

    Visibility Function
    public authenticate(\string $password) : bool
    Authenticate user. If user password needs to be updated, new information will be saved.
    public authorize(\string $action, \string $scope=null) : bool
    Checks user authorization to the action.
    public def(string $name, mixed $default=null, string $separator=null) : \Grav\Common\User\Interfaces\$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 get(string $name, mixed $default=null, string $separator=null) : mixed Value.
    Get value by using dot notation for nested arrays/objects.
    public getAvatarImage() : \Grav\Common\User\Interfaces\ImageMedium/null
    Return media object for the User's avatar. Note: if there's no local avatar image for the user, you should call getAvatarUrl() to get the external avatar URL.
    public getAvatarUrl() : string
    Return the User's avatar URL.
    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/object $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\User\Interfaces\$this
    Join nested values together by using blueprints.
    public joinDefaults(string $name, mixed $value, string $separator='.') : \Grav\Common\User\Interfaces\$this
    Set default values by using blueprints.
    public raw() : string
    Return unmodified data as raw string. NOTE: This function only returns data which has been saved to the storage.
    public set(string $name, mixed $value, string $separator=null) : \Grav\Common\User\Interfaces\$this
    Set value by using dot notation for nested arrays/objects.
    public setDefaults(array $data) : \Grav\Common\User\Interfaces\$this
    Set default values to the configuration if variables were not set.
    public undef(string $name, string $separator=null) : \Grav\Common\User\Interfaces\$this
    Unset value by using dot notation for nested arrays/objects.
    public update(array $data, array $files=array()) : \Grav\Common\User\Interfaces\$this
    Update object with data
    Examples of UserInterface::def()
    $data->def('this.is.my.nested.variable', 'default');
    Examples of UserInterface::get()
    $value = $this->get('this.is.my.nested.variable');
    Examples of UserInterface::set()
    $data->set('this.is.my.nested.variable', $value);
    Examples of UserInterface::undef()
    $data->undef('this.is.my.nested.variable');

    This class implements \Grav\Common\Data\DataInterface, \Grav\Common\Media\Interfaces\MediaInterface, \Grav\Framework\Media\Interfaces\MediaInterface, \ArrayAccess, \JsonSerializable, \RocketTheme\Toolbox\ArrayTraits\ExportInterface


    Interface: \Grav\Common\User\Interfaces\UserCollectionInterface

    Visibility Function
    public delete(string $username) : bool True if user account was found and was deleted.
    Delete user account.
    public find(string $query, array $fields=array()) : \Grav\Common\User\Interfaces\UserInterface
    Find a user by username, email, etc
    public load(string $username) : \Grav\Common\User\Interfaces\UserInterface
    Load user account. Always creates user object. To check if user exists, use $this->exists().

    This class implements \Countable


    Class: \Grav\Console\ConsoleCommand

    Visibility Function
    public clearCache(array $all=array()) : int
    public composerUpdate(mixed $path, string $action='install') : void
    public invalidateCache() : void
    public isGravInstance(string $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\YamlLinterCommand

    Visibility Function
    protected configure() : void
    protected displayErrors(mixed $errors, mixed $io) : void
    protected serve() : void

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Cli\SchedulerCommand

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

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Cli\SecurityCommand

    Visibility Function
    public outputProgress(array $args) : void
    protected configure() : void
    protected serve() : void

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Cli\InstallCommand

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

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Cli\ComposerCommand

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

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Cli\LogViewerCommand

    Visibility Function
    protected configure() : void
    protected serve() : 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) : void

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


    Class: \Grav\Console\Cli\SandboxCommand

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

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Cli\ClearCacheCommand

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

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Cli\BackupCommand

    Visibility Function
    public outputProgress(array $args) : void
    protected configure() : void
    protected serve() : void

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Cli\NewProjectCommand

    Visibility Function
    protected configure() : void
    protected serve() : 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(\Grav\Console\Gpm\Package $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(array $progress) : void
    public setGpm(\Grav\Common\GPM\GPM $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() : 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() : 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(array $data) : mixed
    public sort(\Grav\Console\Gpm\Packages $packages) : void
    protected configure() : void
    protected serve() : void

    This class extends \Grav\Console\ConsoleCommand


    Class: \Grav\Console\Gpm\SelfupgradeCommand

    Visibility Function
    public formatBytes(int/float $size, int $precision=2) : string
    public progress(array $progress) : void
    protected configure() : void
    protected serve() : 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(bool $validation) : void
    protected convertTtl(null/int/\DateInterval/mixed $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/mixed $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 select(array $keys) : \Grav\Framework\Collection\static
    Select items from collection. Collection is returned in the order of $keys given to the function.
    public shuffle() : \Grav\Framework\Collection\static
    Shuffle items.
    public unselect(array $keys) : \Grav\Framework\Collection\static
    Un-select items from collection.

    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


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

    Abstract Index Collection.

    Visibility Function
    public __construct(array $entries=array()) : void
    Initializes a new IndexCollection.
    public __toString() : string
    Returns a string representation of this object.
    public add(mixed $element) : void
    public chunk(int $size) : array
    Split collection into chunks.
    public clear() : void
    public contains(mixed $element) : void
    public containsKey(mixed $key) : void
    public count() : void
    public current() : void
    public exists(\Closure $p) : void
    public filter(\Closure $p) : void
    public first() : void
    public forAll(\Closure $p) : void
    public get(mixed $key) : mixed
    public getIterator() : mixed
    Required by interface IteratorAggregate.
    public getKeys() : mixed
    public getValues() : mixed
    public indexOf(mixed $element) : void
    public isEmpty() : bool
    public jsonSerialize() : array
    Implementes JsonSerializable interface.
    public key() : void
    public last() : void
    public limit(int $start, int/null $limit=null) : \Grav\Framework\Collection\static
    public map(\Closure $func) : void
    public next() : void
    public offsetExists(mixed $offset) : void
    Required by interface ArrayAccess.
    public offsetGet(mixed $offset) : void
    Required by interface ArrayAccess.
    public offsetSet(mixed $offset, mixed $value) : void
    Required by interface ArrayAccess.
    public offsetUnset(mixed $offset) : void
    Required by interface ArrayAccess.
    public partition(\Closure $p) : void
    public remove(mixed $key) : void
    public removeElement(mixed $element) : void
    public reverse() : \Grav\Framework\Collection\static
    Reverse the order of the items.
    public select(array $keys) : \Grav\Framework\Collection\static
    Select items from collection. Collection is returned in the order of $keys given to the function.
    public serialize() : string
    public set(mixed $key, mixed $value) : void
    public shuffle() : \Grav\Framework\Collection\static
    Shuffle items.
    public slice(mixed $offset, mixed $length=null) : void
    public toArray() : void
    public unselect(array $keys) : \Grav\Framework\Collection\static
    Un-select items from collection.
    public unserialize(string $serialized) : void
    protected createFrom(array $entries) : \Grav\Framework\Collection\static
    Creates a new instance from the specified elements. This method is provided for derived classes to specify how a new instance should be created when constructor semantics have changed.
    protected abstract getElementMeta(mixed $element) : mixed
    protected getEntries() : array
    protected abstract isAllowedElement(mixed $value) : bool
    protected abstract loadCollection(array/null/array $entries=null) : \Grav\Framework\Collection\CollectionInterface
    protected abstract loadElement(string $key, mixed $value) : mixed/null
    protected abstract loadElements(array/null/array $entries=null) : array
    protected setEntries(array $entries) : void

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


    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 select(array $keys) : \Grav\Framework\Collection\static
    Select items from collection. Collection is returned in the order of $keys given to the function.
    public shuffle() : \Grav\Framework\Collection\static
    Shuffle items.
    public unselect(array $keys) : \Grav\Framework\Collection\static
    Un-select items from collection.

    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 select(array $keys) : void
    public shuffle() : void
    public unselect(array $keys) : 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 disableCache() : \Grav\Framework\ContentBlock\$this
    public static fromArray(array $serialized) : \Grav\Framework\ContentBlock\ContentBlockInterface
    public getChecksum() : string
    public getId() : string
    public getToken() : string
    public isCached() : bool
    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\DI\Container

    Visibility Function
    public get(mixed $id) : mixed
    public has(mixed $id) : bool

    This class extends \Pimple\Container

    This class implements \ArrayAccess, \Psr\Container\ContainerInterface


    Class: \Grav\Framework\File\File

    Visibility Function
    public load() : mixed
    public save(mixed $data) : void

    This class extends \Grav\Framework\File\AbstractFile

    This class implements \Serializable, \Grav\Framework\File\Interfaces\FileInterface


    Class: \Grav\Framework\File\JsonFile

    Class JsonFile

    Visibility Function
    public __construct(string $filepath, \Grav\Framework\File\Formatter\JsonFormatter $formatter) : void
    File constructor.

    This class extends \Grav\Framework\File\DataFile

    This class implements \Grav\Framework\File\Interfaces\FileInterface, \Serializable


    Class: \Grav\Framework\File\CsvFile

    Class IniFile

    Visibility Function
    public __construct(string $filepath, \Grav\Framework\File\Formatter\CsvFormatter $formatter) : void
    File constructor.

    This class extends \Grav\Framework\File\DataFile

    This class implements \Grav\Framework\File\Interfaces\FileInterface, \Serializable


    Class: \Grav\Framework\File\AbstractFile

    Visibility Function
    public __clone() : void
    public __construct(\string $filepath, \Grav\Framework\File\Filesystem/null/\Grav\Framework\Filesystem\Filesystem $filesystem=null) : void
    public __destruct() : void
    Unlock file when the object gets destroyed.
    public delete() : void
    public exists() : void
    public getBasename() : mixed
    public getCreationTime() : mixed
    public getExtension(\bool $withDot=false) : mixed
    public getFilePath() : mixed
    public getFilename() : mixed
    public getModificationTime() : mixed
    public getPath() : mixed
    public isLocked() : bool
    public isReadable() : bool
    public isWritable() : bool
    public load() : mixed
    public lock(\bool $block=true) : void
    public rename(\string $path) : void
    public save(mixed $data) : void
    public serialize() : string
    public unlock() : void
    public unserialize(string $serialized) : void
    protected doSerialize() : array
    protected doUnserialize(array $serialized) : void
    protected isWritablePath(\string $dir) : bool
    protected mkdir(\string $dir) : bool
    protected setFilepath(\string $filepath) : void
    protected setPathInfo() : void
    protected tempname(\string $filename, \int $length=5) : string

    This class implements \Grav\Framework\File\Interfaces\FileInterface, \Serializable


    Class: \Grav\Framework\File\DataFile

    Visibility Function
    public __construct(string $filepath, \Grav\Framework\File\Interfaces\FileFormatterInterface $formatter) : void
    File constructor.
    public load() : mixed
    public save(mixed $data) : void

    This class extends \Grav\Framework\File\AbstractFile

    This class implements \Serializable, \Grav\Framework\File\Interfaces\FileInterface


    Class: \Grav\Framework\File\MarkdownFile

    Class MarkdownFile

    Visibility Function
    public __construct(string $filepath, \Grav\Framework\File\Formatter\MarkdownFormatter $formatter) : void
    File constructor.

    This class extends \Grav\Framework\File\DataFile

    This class implements \Grav\Framework\File\Interfaces\FileInterface, \Serializable


    Class: \Grav\Framework\File\YamlFile

    Class YamlFile

    Visibility Function
    public __construct(string $filepath, \Grav\Framework\File\Formatter\YamlFormatter $formatter) : void
    File constructor.

    This class extends \Grav\Framework\File\DataFile

    This class implements \Grav\Framework\File\Interfaces\FileInterface, \Serializable


    Class: \Grav\Framework\File\IniFile

    Class IniFile

    Visibility Function
    public __construct(string $filepath, \Grav\Framework\File\Formatter\IniFormatter $formatter) : void
    File constructor.

    This class extends \Grav\Framework\File\DataFile

    This class implements \Grav\Framework\File\Interfaces\FileInterface, \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 getDecodeAssoc() : bool
    Returns true if JSON objects will be converted into associative arrays.
    public getDecodeDepth() : int
    Returns recursion depth used in decode() function.
    public getDecodeOptions() : int
    Returns options used in decode() function.
    public getEncodeOptions() : int
    Returns options used in encode() function.

    This class extends \Grav\Framework\File\Formatter\AbstractFormatter

    This class implements \Serializable, \Grav\Framework\File\Interfaces\FileFormatterInterface


    Class: \Grav\Framework\File\Formatter\AbstractFormatter (abstract)

    Abstract file formatter.

    Visibility Function
    public __construct(array $config=array()) : void
    IniFormatter constructor.
    public abstract decode(mixed $data) : void
    public abstract encode(mixed $data) : void
    public getDefaultFileExtension() : mixed
    public getSupportedFileExtensions() : mixed
    public serialize() : string
    public unserialize(string $serialized) : void
    protected doSerialize() : array
    protected doUnserialize(array $serialized) : void
    Note: if overridden, make sure you call parent::doUnserialize()
    protected getConfig(\string $name=null) : mixed
    Get either full configuration or a single option.

    This class implements \Grav\Framework\File\Interfaces\FileFormatterInterface, \Serializable


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

    DEPRECATED 1.6 Use Grav\Framework\File\Interfaces\FileFormatterInterface instead

    Visibility Function

    This class implements \Grav\Framework\File\Interfaces\FileFormatterInterface, \Serializable


    Class: \Grav\Framework\File\Formatter\CsvFormatter

    Visibility Function
    public __construct(array $config=array()) : void
    IniFormatter constructor.
    public decode(mixed $data, mixed $delimiter=null) : void
    public encode(mixed $data, mixed $delimiter=null) : void
    public getDelimiter() : string
    Returns delimiter used to both encode and decode CSV.

    This class extends \Grav\Framework\File\Formatter\AbstractFormatter

    This class implements \Serializable, \Grav\Framework\File\Interfaces\FileFormatterInterface


    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 getOptions() : array/bool
    Returns options used in decode(). By default only allow stdClass class.
    protected preserveLines(mixed $data, array $search, array $replace) : mixed
    Preserve new lines, recursive function.

    This class extends \Grav\Framework\File\Formatter\AbstractFormatter

    This class implements \Serializable, \Grav\Framework\File\Interfaces\FileFormatterInterface


    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

    This class extends \Grav\Framework\File\Formatter\AbstractFormatter

    This class implements \Serializable, \Grav\Framework\File\Interfaces\FileFormatterInterface


    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 getIndentOption() : int
    public getInlineOption() : int
    public useCompatibleDecoder() : bool
    public useNativeDecoder() : bool

    This class extends \Grav\Framework\File\Formatter\AbstractFormatter

    This class implements \Serializable, \Grav\Framework\File\Interfaces\FileFormatterInterface


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

    Visibility Function
    public __construct(array $config=array(), \Grav\Framework\File\Interfaces\FileFormatterInterface $headerFormatter=null) : void
    public decode(mixed $data) : void
    public encode(mixed $data) : void
    public getBodyField() : string
    Returns body field used in both encode() and decode().
    public getHeaderField() : string
    Returns header field used in both encode() and decode().
    public getHeaderFormatter() : \Grav\Framework\File\Interfaces\FileFormatterInterface
    Returns header formatter object used in both encode() and decode().
    public getRawField() : string
    Returns raw field used in both encode() and decode().

    This class extends \Grav\Framework\File\Formatter\AbstractFormatter

    This class implements \Serializable, \Grav\Framework\File\Interfaces\FileFormatterInterface


    Interface: \Grav\Framework\File\Interfaces\FileInterface

    Defines common interface for all file readers. File readers allow you to read and optionally write files of various file formats, such as:

    Visibility Function
    public delete() : bool Returns true if the file was successfully deleted, false otherwise.
    Delete file from filesystem.
    public exists() : bool Returns true if the filename exists and is a regular file, false otherwise.
    Check if the file exits in the filesystem.
    public getBasename() : string Returns basename of the file.
    Get basename of the file (filename without the associated file extension).
    public getCreationTime() : int Returns Unix timestamp. If file does not exist, method returns current time.
    Get file creation time.
    public getExtension(\bool $withDot=false) : string Returns file extension of the file (can be empty).
    Get file extension of the file.
    public getFilePath() : string Returns path and filename in the filesystem. Can also be URI.
    Get both path and filename of the file.
    public getFilename() : string Returns name of the file.
    Get filename of the file.
    public getModificationTime() : int Returns Unix timestamp. If file does not exist, method returns current time.
    Get file modification time.
    public getPath() : string Returns path in the filesystem. Can also be URI.
    Get path of the file.
    public isLocked() : bool Returns true if the file is locked, false otherwise.
    Returns true if file has been locked by you for writing.
    public isReadable() : bool Returns true if the file can be read, false otherwise.
    Check if file exists and can be read.
    public isWritable() : bool Returns true if the file can be written, false otherwise.
    Check if file can be written.
    public load() : string/array/object/false Returns file content or false if file couldn't be read.
    (Re)Load a file and return file contents.
    public lock(\bool $block=true) : bool Returns true if the file was successfully locked, false otherwise.
    Lock file for writing. You need to manually call unlock().
    public rename(\string $path) : bool Returns true if the file was successfully renamed, false otherwise.
    Rename file in the filesystem if it exists. Target folder will be created if if did not exist.
    public save(mixed $data) : void
    Save file. See supported data format for each of the file format.
    public unlock() : bool Returns true if the file was successfully unlocked, false otherwise.
    Unlock file after writing.

    This class implements \Serializable


    Interface: \Grav\Framework\File\Interfaces\FileFormatterInterface

    Defines common interface for all file formatters. File formatters allow you to read and optionally write various file formats, such as:

    Visibility Function
    public decode(string $data) : mixed Returns decoded data.
    Decode a string into data.
    public encode(mixed $data) : string Returns encoded data as a string.
    Encode data into a string.
    public getDefaultFileExtension() : string Returns 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[] Returns list of all supported file extensions.
    Get file extensions supported by current formatter (with dot).

    This class implements \Serializable


    Class: \Grav\Framework\Filesystem\Filesystem

    Visibility Function
    public dirname(\string $path, \int $levels=1) : void
    public static getInstance(\bool $normalize=null) : \Grav\Framework\Filesystem\Filesystem
    public normalize(\string $path) : void
    public parent(\string $path, \int $levels=1) : void
    public pathinfo(\string $path, \int $options=null) : void
    public safe() : \Grav\Framework\Filesystem\static
    Force all paths not to be normalized (speeds up the calls if given paths are known to be normalized).
    public setNormalization(\bool $normalize=null) : \Grav\Framework\Filesystem\Filesystem
    Set path normalization. Default option enables normalization for the streams only, but you can force the normalization to be either on or off for every path. Disabling path normalization speeds up the calls, but may cause issues if paths were not normalized.
    public unsafe() : \Grav\Framework\Filesystem\static
    Force all paths to be normalized.
    protected __construct(\bool $normalize=null) : void
    Always use Filesystem::getInstance() instead.
    protected dirnameInternal(string/null/\string $scheme, \string $path, \int $levels=1) : array
    protected getSchemeAndHierarchy(\string $filename) : array
    Gets a 2-tuple of scheme (may be null) and hierarchical part of a filename (e.g. file:///tmp -> array(file, tmp)).
    protected normalizePathPart(\string $path) : string
    protected pathinfoInternal(string/null/\string $scheme, \string $path, \int $options=null) : array
    protected toString(string/null/\string $scheme, \string $path) : string

    This class implements \Grav\Framework\Filesystem\Interfaces\FilesystemInterface


    Interface: \Grav\Framework\Filesystem\Interfaces\FilesystemInterface

    Defines several stream-save filesystem actions.

    Visibility Function
    public dirname(\string $path, \int $levels=1) : string Returns path to the directory.
    Stream-safe \dirname() replacement.
    public normalize(\string $path) : string Returns normalized path.
    Normalize path by cleaning up \, /./, // and /../.
    public parent(\string $path, \int $levels=1) : string Returns parent path.
    Get parent path. Empty path is returned if there are no segments remaining. Can be used recursively to get towards the root directory.
    public pathinfo(\string $path, \int $options=null) : array/string
    Stream-safe \pathinfo() replacement.


    Class: \Grav\Framework\Flex\FlexDirectory

    Class FlexDirectory

    Visibility Function
    public __construct(\string $type, \string $blueprint_file, array $defaults=array()) : void
    FlexDirectory constructor.
    public clearCache() : \Grav\Framework\Flex\$this
    public createCollection(array $entries, \string $keyField=null) : \Grav\Framework\Flex\Interfaces\FlexCollectionInterface
    public createIndex(array $entries, \string $keyField=null) : \Grav\Framework\Flex\Interfaces\FlexIndexInterface
    public createObject(array $data, \string $key='', \bool $validate=false) : \Grav\Framework\Flex\Interfaces\FlexObjectInterface
    public getBlueprint(\string $type='', \string $context='') : \Grav\Common\Data\Blueprint
    public getBlueprintFile(\string $view='') : string
    public getCache(\string $namespace=null) : \Grav\Framework\Cache\CacheInterface
    public getCollection(array/null/array $keys=null, \string $keyField=null) : \Grav\Framework\Flex\Interfaces\FlexCollectionInterface
    Get collection. In the site this will be filtered by the default filters (published etc). Use $directory->getIndex() if you want unfiltered collection.
    public getCollectionClass() : string
    public getConfig(\string $name=null, mixed $default=null) : mixed
    public getDescription() : string
    public getFlexType() : string
    public getIndex(array/null/array $keys=null, \string $keyField=null) : \Grav\Framework\Flex\Interfaces\FlexIndexInterface
    Get the full collection of all stored objects. Use $directory->getCollection() if you want a filtered collection.
    public getIndexClass() : string
    public getMediaFolder(\string $key=null) : string
    public getObject(string $key, \string $keyField=null) : \Grav\Framework\Flex\FlexObjectInterface/null
    Returns an object if it exists. Note: It is not safe to use the object without checking if the user can access it.
    public getObjectClass() : string
    public getStorage() : \Grav\Framework\Flex\Interfaces\FlexStorageInterface
    public getStorageFolder(\string $key=null) : string
    public getTitle() : string
    public getType() : string
    DEPRECATED - 1.6 Use ->getFlexType() method instead.
    public isAuthorized(\string $action, \string $scope=null, \Grav\Common\User\Interfaces\UserInterface $user=null) : bool
    public isEnabled() : bool
    public loadCollection(array $entries, \string $keyField=null) : \Grav\Framework\Flex\Interfaces\FlexCollectionInterface
    public loadObjects(array $entries) : \Grav\Framework\Flex\Interfaces\FlexObjectInterface[]
    public remove(\string $key) : \Grav\Framework\Flex\FlexObjectInterface/null
    public update(array $data, \string $key=null) : \Grav\Framework\Flex\Interfaces\FlexObjectInterface
    protected createStorage() : \Grav\Framework\Flex\Interfaces\FlexStorageInterface
    protected getBlueprintInternal(\string $type_view='', \string $context='') : \Grav\Common\Data\Blueprint
    protected isAuthorizedAction(\Grav\Common\User\Interfaces\UserInterface $user, \string $action, \string $scope=null) : bool
    protected isAuthorizedSuperAdmin(\Grav\Common\User\Interfaces\UserInterface $user) : bool
    protected loadIndex() : \Grav\Framework\Flex\Interfaces\FlexIndexInterface
    protected setAuthorizeRule(\string $authorize) : void

    This class implements \Grav\Framework\Flex\Interfaces\FlexAuthorizeInterface


    Class: \Grav\Framework\Flex\Flex

    Class Flex

    Visibility Function
    public __construct(array $types, array $config) : void
    Flex constructor.
    public addDirectory(\Grav\Framework\Flex\FlexDirectory $directory) : \Grav\Framework\Flex\$this
    public addDirectoryType(\string $type, \string $blueprint, array $config=array()) : \Grav\Framework\Flex\$this
    public count() : int
    public getCollection(\string $type, array/null/array $keys=null, \string $keyField=null) : \Grav\Framework\Flex\FlexCollectionInterface/null
    public getDirectories(array/string[] $types=null, \bool $keepMissing=false) : array/\Grav\Framework\Flex\FlexDirectory[]
    public getDirectory(\string $type) : \Grav\Framework\Flex\FlexDirectory/null
    public getMixedCollection(array $keys, array $options=array()) : \Grav\Framework\Flex\Interfaces\FlexCollectionInterface
    collection_class: Class to be used to create the collection. Defaults to ObjectCollection.
    public getObject(\string $key, \string $type=null, \string $keyField=null) : \Grav\Framework\Flex\FlexObjectInterface/null
    public getObjects(array $keys, array $options=array()) : array
    types: List of allowed types. type: Allowed type if types isn't defined, otherwise acts as default_type. default_type: Set default type for objects given without type (only used if key_field isn't set). keep_missing: Set to true if you want to return missing objects as null. key_field: Key field which is used to match the objects.
    public hasDirectory(\string $type) : bool
    protected resolveKeyAndType(\string $flexKey, \string $type=null) : void
    protected resolveType(\string $type=null) : void

    This class implements \Countable


    Class: \Grav\Framework\Flex\FlexIndex

    Visibility Function
    public __call(mixed $name, mixed $arguments) : void
    public __construct(array $entries=array(), \Grav\Framework\Flex\FlexDirectory/null/\Grav\Framework\Flex\FlexDirectory $directory=null) : void
    Initializes a new FlexIndex.
    public __debugInfo() : void
    public call(mixed $method, array $arguments=array()) : void
    public static createFromArray(array $entries, \Grav\Framework\Flex\FlexDirectory $directory, \string $keyField=null) : mixed
    public static createFromStorage(\Grav\Framework\Flex\FlexDirectory $directory) : \Grav\Framework\Flex\static
    public filterBy(array $filters) : void
    public getCache(\string $namespace=null) : \Grav\Framework\Cache\CacheInterface
    public getCacheChecksum() : mixed
    public getCacheKey() : mixed
    public getFlexDirectory() : mixed
    public getFlexKeys() : mixed
    public getFlexType() : mixed
    public getIndex() : mixed
    public getIndexMap(\string $indexKey=null) : mixed
    public getKeyField() : string
    public getMetaData(\string $key) : array
    public getStorageKeys() : mixed
    public getTimestamp() : mixed
    public getTimestamps() : mixed
    public getType(bool $prefix=false) : string
    DEPRECATED - 1.6 Use ->getFlexType() instead.
    public static loadEntriesFromStorage(\Grav\Framework\Flex\Interfaces\FlexStorageInterface $storage) : array
    public orderBy(array $orderings) : \Grav\Framework\Flex\FlexIndex/\Grav\Framework\Flex\FlexCollection
    public render(\string $layout=null, array $context=array()) : void
    public search(\string $search, mixed $properties=null, array $options=null) : void
    public serialize() : string
    public sort(array $orderings) : void
    public unserialize(string $serialized) : void
    public withKeyField(\string $keyField=null) : void
    protected createFrom(array $entries, \string $keyField=null) : \Grav\Framework\Flex\static
    protected getElementMeta(\Grav\Framework\Flex\FlexObjectInterface $object) : mixed
    protected static getIndexFile(\Grav\Framework\Flex\Interfaces\FlexStorageInterface $storage) : mixed
    protected getIndexKeys() : mixed
    protected getTypePrefix() : string
    protected isAllowedElement(mixed $value) : bool
    protected loadCollection(array/null/array $entries=null) : \Grav\Framework\Object\Interfaces\ObjectCollectionInterface
    protected loadElement(string $key, mixed $value) : \Grav\Framework\Flex\ObjectInterface/null
    protected loadElements(array/null/array $entries=null) : \Grav\Framework\Object\Interfaces\ObjectInterface[]
    protected static loadEntriesFromIndex(\Grav\Framework\Flex\Interfaces\FlexStorageInterface $storage) : mixed
    protected static onChanges(array $entries, array $added, array $updated, array $removed) : void
    protected static onException(\Exception $e) : void
    protected setIndexKeys(array $indexKeys) : void
    protected setKeyField(\string $keyField=null) : void
    protected static updateIndexData(mixed $entry, array $data) : void
    protected static updateIndexFile(\Grav\Framework\Flex\Interfaces\FlexStorageInterface $storage, array $index, array $entries) : array Compiled list of entries

    This class extends \Grav\Framework\Object\ObjectIndex

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


    Class: \Grav\Framework\Flex\FlexForm

    Class FlexForm

    Visibility Function
    public __construct(\string $name, \Grav\Framework\Flex\Interfaces\FlexObjectInterface $object, array/null/array $form=null) : void
    FlexForm constructor.
    public __get(mixed $name) : void
    public __isset(mixed $name) : void
    public __set(mixed $name, mixed $value) : void
    public __unset(mixed $name) : void
    public getAction() : mixed
    public getBlueprint() : \Grav\Common\Data\Blueprint
    public getButtons() : mixed
    public getData() : \Grav\Framework\Flex\Data/\Grav\Framework\Flex\FlexObjectInterface
    public getDefaultValue(\string $name) : mixed
    public getDefaultValues() : array
    public getError() : mixed
    public getErrors() : mixed
    public getFields() : mixed
    public getFileDeleteAjaxRoute(string $field, string $filename) : \Grav\Framework\Flex\Route/null
    public getFileUploadAjaxRoute() : \Grav\Framework\Flex\Route/null
    public getFiles() : array/\Grav\Framework\Flex\UploadedFileInterface[]
    public getFlash() : \Grav\Framework\Flex\FormFlash
    Get form flash object.
    public getFlexType() : string
    public getFormName() : mixed
    public getId() : mixed
    public getMediaTaskRoute(array $params=array(), mixed $extension=null) : mixed
    public getName() : string
    public getNonce() : mixed
    public getNonceAction() : mixed
    public getNonceName() : mixed
    public getObject() : \Grav\Framework\Flex\Interfaces\FlexObjectInterface
    public getTask() : mixed
    public getTasks() : mixed
    public getUniqueId() : mixed
    public getValue(\string $name) : mixed
    Get a value from the form. Note: Used in form fields.
    public handleRequest(\Psr\Http\Message\ServerRequestInterface $request) : \Grav\Framework\Flex\FormInterface/\Grav\Framework\Flex\$this
    public isSubmitted() : bool
    public isValid() : bool
    public render(\string $layout=null, array $context=array()) : void
    public reset() : void
    public serialize() : string
    Implements \Serializable::serialize().
    public setId(\string $id) : void
    public setRequest(\Psr\Http\Message\ServerRequestInterface $request) : \Grav\Framework\Flex\FormInterface/\Grav\Framework\Flex\$this
    public setUniqueId(\string $uniqueId) : void
    public submit(array $data, \Grav\Framework\Flex\UploadedFileInterface[] $files=null) : \Grav\Framework\Flex\FormInterface/\Grav\Framework\Flex\$this
    public unserialize(string $data) : void
    Implements \Serializable::unserialize().
    public updateObject() : void
    public validate() : void
    protected decodeData(array $data) : array
    Decode POST data
    protected doSerialize() : void
    protected doSubmit(array $data, array $files) : void
    protected doTraitSerialize() : array
    protected doTraitUnserialize(array $data) : void
    protected doUnserialize(array $data) : void
    protected filterData(\ArrayAccess $data) : void
    Filter validated data.
    protected getTemplate(string $layout) : \Twig\TemplateWrapper
    protected jsonDecode(array $data) : array
    Recursively JSON decode POST data.
    protected parseRequest(\Psr\Http\Message\ServerRequestInterface $request) : array
    Parse PSR-7 ServerRequest into data and files.
    protected setError(\string $error) : void
    Set a single error.
    protected setErrors(array $errors) : void
    Set all errors.
    protected setObject(\Grav\Framework\Flex\Interfaces\FlexObjectInterface $object) : \Grav\Framework\Flex\$this
    Note: this method clones the object.
    protected unsetFlash() : void
    protected validateData(\ArrayAccess $data) : void
    Validate data and throw validation exceptions if validation fails.
    protected validateUpload(\Psr\Http\Message\UploadedFileInterface $file) : void
    Validate uploaded file.
    protected validateUploads(array $files) : void
    Validate all uploaded files.

    This class implements \Grav\Framework\Flex\Interfaces\FlexFormInterface, \Grav\Framework\Interfaces\RenderInterface, \Grav\Framework\Form\Interfaces\FormInterface, \Serializable


    Class: \Grav\Framework\Flex\FlexCollection

    Class FlexCollection

    Visibility Function
    public __construct(array $entries=array(), \Grav\Framework\Flex\FlexDirectory $directory=null) : void
    public __debugInfo() : void
    public static createFromArray(array $entries, \Grav\Framework\Flex\FlexDirectory $directory, \string $keyField=null) : mixed
    public filterBy(array $filters) : \Grav\Framework\Flex\Interfaces\FlexCollectionInterface
    public find(string $value, string $field='id') : \Grav\Framework\Flex\FlexObject/null
    public getCache(\string $namespace=null) : \Grav\Framework\Cache\CacheInterface
    public getCacheChecksum() : mixed
    public getCacheKey() : mixed
    public static getCachedMethods() : array Returns a list of methods with their caching information.
    Get list of cached methods.
    public getFlexDirectory() : mixed
    public getFlexKeys() : mixed
    public getFlexType() : mixed
    public getIndex() : mixed
    public getKeyField() : string
    public getMetaData(\string $key) : array
    public getStorageKeys() : mixed
    public getTimestamp() : mixed
    public getTimestamps() : mixed
    public getType(bool $prefix=false) : string
    DEPRECATED - 1.6 Use ->getFlexType() instead.
    public isAuthorized(\string $action, \string $scope=null, \Grav\Framework\Flex\UserInterface/null/\Grav\Common\User\Interfaces\UserInterface $user=null) : \Grav\Framework\Flex\static
    public jsonSerialize() : array
    public render(\string $layout=null, array $context=array()) : void
    public search(\string $search, mixed $properties=null, array $options=null) : void
    public setFlexDirectory(\Grav\Framework\Flex\FlexDirectory $type) : \Grav\Framework\Flex\$this
    public sort(array $order) : void
    public withKeyField(\string $keyField=null) : void
    protected createFrom(array $elements, string/null $keyField=null) : \Grav\Framework\Flex\static
    Creates a new instance from the specified elements. This method is provided for derived classes to specify how a new instance should be created when constructor semantics have changed.
    protected getRelatedDirectory(string $type) : \Grav\Framework\Flex\FlexDirectory
    protected getTemplate(string $layout) : \Twig\TemplateWrapper
    protected getTypePrefix() : string
    protected setKeyField(mixed $keyField=null) : void

    This class extends \Grav\Framework\Object\ObjectCollection

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


    Class: \Grav\Framework\Flex\FlexObject

    Class FlexObject

    Visibility Function
    public __construct(array $elements, mixed $key, \Grav\Framework\Flex\FlexDirectory $directory, \bool $validate=false) : void
    public __debugInfo() : 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 blueprints() : \Grav\Common\Data\Blueprint
    DEPRECATED - 1.6 Admin compatibility
    public create(\string $key=null) : mixed
    public static createFromStorage(array $elements, array $storage, \Grav\Framework\Flex\FlexDirectory $directory, \bool $validate=false) : mixed
    public defNestedProperty(string $property, mixed $default, string $separator=null) : \Grav\Framework\Flex\$this
    public defProperty(string $property, mixed $default) : \Grav\Framework\Flex\$this
    public delete() : void
    public exists() : void
    public getBlueprint(\string $name='') : mixed
    public getCache(\string $namespace=null) : \Grav\Framework\Cache\CacheInterface
    public getCacheChecksum() : mixed
    public getCacheKey() : mixed
    public static getCachedMethods() : array
    public getChanges() : array
    Get any changes based on data sent to update
    public getDefaultValue(\string $name, \string $separator=null) : mixed
    public getDefaultValues() : array
    public getFlexDirectory() : mixed
    public getFlexKey() : mixed
    public getFlexType() : mixed
    public getForm(\string $name='', array $form=null) : mixed
    public getFormValue(\string $name, mixed $default=null, \string $separator=null) : mixed
    public getKey() : mixed
    public getMetaData() : mixed
    public getNestedProperty(string $property, mixed $default=null, string $separator=null) : mixed Property value.
    public getProperty(string $property, mixed $default=null) : mixed/mixed[] Property value.
    public getStorageKey() : mixed
    public getTimestamp() : mixed
    public getType(bool $prefix=false) : string
    DEPRECATED - 1.6 Use ->getFlexType() instead.
    public hasKey() : bool
    public hasNestedProperty(string $property, string $separator=null) : bool True if property has been defined (can be null).
    public hasProperty(string $property) : bool/bool[] True if property has been defined (can be null).
    public isAuthorized(\string $action, \string $scope=null, \Grav\Common\User\Interfaces\UserInterface $user=null) : bool
    public jsonSerialize() : array
    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 prepareStorage() : void
    public render(\string $layout=null, array $context=array()) : void
    public save() : void
    public search(\string $search, mixed $properties=null, array $options=null) : void
    public searchNestedProperty(\string $property, \string $search, array/null/array $options=null) : float
    public searchProperty(\string $property, \string $search, array/null/array $options=null) : float
    public serialize() : string
    Implements Serializable interface.
    public setFlexDirectory(\Grav\Framework\Flex\FlexDirectory $directory) : void
    public setNestedProperty(string $property, string $value, string $separator=null) : \Grav\Framework\Flex\$this
    public setProperty(string $property, mixed $value) : \Grav\Framework\Flex\$this
    public setStorageKey(string/null $key=null) : \Grav\Framework\Flex\$this
    public setTimestamp(int $timestamp=null) : \Grav\Framework\Flex\$this
    public triggerEvent(string $name) : \Grav\Framework\Flex\$this
    public unserialize(string $serialized) : void
    public unsetNestedProperty(string $property, string $separator=null) : \Grav\Framework\Flex\$this
    public unsetProperty(string $property) : \Grav\Framework\Flex\$this
    public update(array $data, array $files=array()) : void
    public value(string $name, mixed/null $default=null, string/null $separator=null) : mixed
    DEPRECATED - 1.6 Use ->getFormValue() method instead.
    protected createFormObject(\string $name, array/null/array $form=null) : \Grav\Framework\Flex\Interfaces\FlexFormInterface
    This methods allows you to override form objects in child classes.
    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) : \Grav\Framework\Flex\$this
    protected doUnserialize(array $serialized) : void
    protected doUnsetProperty(string $property) : \Grav\Framework\Flex\$this
    protected filterElements(array $elements) : void
    Filter data coming to constructor or $this->update() request. NOTE: The incoming data can be an arbitrary array so do not assume anything from its content.
    protected getCollectionByProperty(string $type, string $property) : \Grav\Framework\Flex\Interfaces\FlexCollectionInterface
    protected getElement(string $property, mixed/null $default=null) : mixed/null
    protected getElements() : array
    protected getRelatedDirectory(string $type) : \Grav\Framework\Flex\FlexDirectory
    protected getStorage() : array
    protected getTemplate(string $layout) : \Twig\TemplateWrapper
    protected getTypePrefix() : string
    protected getarrayelement(string $property, mixed/null $default=null) : mixed/null
    protected getarrayelements() : array
    protected getarrayproperty(string $property, mixed $default=null, bool $doCreate=false) : mixed Property value.
    protected getobjectelement(string $property, mixed/null $default=null) : mixed/null
    protected getobjectelements() : array
    protected getobjectproperty(string $property, mixed $default=null, bool/callable/bool $doCreate=false) : mixed Property value.
    protected hasarrayproperty(string $property) : bool True if property has been defined (can be null).
    protected hasobjectproperty(string $property) : bool True if property has been defined (can be null).
    protected initObjectProperties() : void
    protected isAuthorizedAction(\Grav\Common\User\Interfaces\UserInterface $user, \string $action, \string $scope=null) : bool
    protected isAuthorizedSuperAdmin(\Grav\Common\User\Interfaces\UserInterface $user) : bool
    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 searchValue(\string $name, mixed $value, \string $search, array/null/array $options=null) : float
    protected setAuthorizeRule(\string $authorize) : void
    protected setElements(array $elements) : void
    protected setKey(string $key) : \Grav\Framework\Flex\$this
    protected setStorage(array $storage) : void
    protected setarrayproperty(string $property, mixed $value) : void
    protected setobjectproperty(string $property, mixed $value) : void
    protected unsetarrayproperty(string $property) : void
    protected unsetobjectproperty(string $property) : void

    This class implements \Grav\Framework\Flex\Interfaces\FlexObjectInterface, \ArrayAccess, \Grav\Framework\Object\Interfaces\ObjectInterface, \JsonSerializable, \Serializable, \Grav\Framework\Object\Interfaces\NestedObjectInterface, \Grav\Framework\Interfaces\RenderInterface, \Grav\Framework\Flex\Interfaces\FlexCommonInterface, \Grav\Framework\Flex\Interfaces\FlexAuthorizeInterface


    Interface: \Grav\Framework\Flex\Interfaces\FlexCollectionInterface

    Defines a collection of Flex Objects.

    Visibility Function
    public __construct(array/\Grav\Framework\Flex\Interfaces\FlexObjectInterface[] $entries=array(), \Grav\Framework\Flex\FlexDirectory $directory=null) : void
    Creates a new Flex Collection.
    public static createFromArray(\Grav\Framework\Flex\Interfaces\FlexObjectInterface[] $entries, \Grav\Framework\Flex\FlexDirectory $directory, \string $keyField=null) : static Returns a new Flex Collection.
    Creates a Flex Collection from an array.
    public filterBy(array $filters) : \Grav\Framework\Flex\Interfaces\FlexCollectionInterface
    Filter collection by filter array with keys and values.
    public getFlexKeys() : string[] Returns[key => flex_key, ...] pairs.
    Get Flex keys from all the objects in the collection.
    public getIndex() : FlexIndexInterface Returns a Flex Index from the current collection.
    Get Flex Index from the Flex Collection.
    public getStorageKeys() : string[] Returns [key => storage_key, ...] pairs.
    Get storage keys from all the objects in the collection.
    public getTimestamps() : int[] Returns [key => timestamp, ...] pairs.
    Get timestamps from all the objects in the collection. This method can be used for example in caching.
    public search(\string $search, string/string[]/null $properties=null, array/null/array $options=null) : FlexCollectionInterface Returns a Flex Collection with only matching objects.
    Search a string from the collection.
    public sort(array $orderings) : FlexCollectionInterface Returns a sorted version from the collection.
    Sort the collection.
    public withKeyField(\string $keyField=null) : FlexCollectionInterface Returns a new Flex Collection with new key field.
    Return new collection with a different key.

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


    Interface: \Grav\Framework\Flex\Interfaces\FlexAuthorizeInterface

    Defines authorization checks for Flex Objects.

    Visibility Function
    public isAuthorized(\string $action, \string $scope=null, \Grav\Framework\Flex\Interfaces\UserInterface/null/\Grav\Common\User\Interfaces\UserInterface $user=null) : bool Returns true if user is authorized to perform action, false otherwise.
    Check if user is authorized to perform an action for the object.


    Interface: \Grav\Framework\Flex\Interfaces\FlexFormInterface

    Defines Forms for Flex Objects.

    Visibility Function
    public getFileDeleteAjaxRoute(string $field, string $filename) : \Grav\Framework\Flex\Interfaces\Route/null Returns Route object or null if file uploads are not enabled.
    Get route for deleting files by AJAX.
    public getFileUploadAjaxRoute() : \Grav\Framework\Flex\Interfaces\Route/null Returns Route object or null if file uploads are not enabled.
    Get route for uploading files by AJAX.
    public getMediaTaskRoute() : string Returns admin route for media tasks.
    Get media task route.
    public getObject() : FlexObjectInterface Returns Flex Object associated to the form.
    Get object associated to the form.

    This class implements \Serializable, \Grav\Framework\Form\Interfaces\FormInterface, \Grav\Framework\Interfaces\RenderInterface


    Interface: \Grav\Framework\Flex\Interfaces\FlexStorageInterface

    Defines Flex Storage layer.

    Visibility Function
    public __construct(array $options) : void
    StorageInterface constructor.
    public createRows(array $rows) : array Returns created rows as `[key => row, ...] pairs.
    Create new rows into the storage. New keys will be assigned when the objects are created.
    public deleteRows(array $rows) : array Returns deleted rows. Note that non-existing rows have null as their value.
    Delete rows from the storage.
    public getExistingKeys() : array Returns all existing keys as [key => [storage_key => key, storage_timestamp => timestamp], ...].
    Returns associated array of all existing storage keys with a timestamp.
    public getKeyField() : string
    public getMediaPath(\string $key=null) : string Path in the filesystem. Can be URI.
    Get filesystem path for the collection or object media.
    public getStoragePath(\string $key=null) : string Path in the filesystem. Can be URI.
    Get filesystem path for the collection or object storage.
    public hasKey(\string $key) : bool Returns true if the key exists in the storage, false otherwise.
    Check if the key exists in the storage.
    public hasKeys(string[] $keys) : bool[] Returns keys with true if the key exists in the storage, false otherwise.
    Check if the key exists in the storage.
    public readRows(array $rows, array $fetched=null) : array Returns rows. Note that non-existing rows will have null as their value.
    Read rows from the storage. If you pass object or array as value, that value will be used to save I/O.
    public renameRow(\string $src, \string $dst) : bool
    public replaceRows(array $rows) : array Returns both created and updated rows.
    Replace rows regardless if they exist or not. All rows should have a specified key for replace to work properly.
    public updateRows(array $rows) : array Returns updated rows. Note that non-existing rows will not be saved and have null as their value.
    Update existing rows in the storage.


    Interface: \Grav\Framework\Flex\Interfaces\FlexObjectInterface

    Defines Flex Objects.

    Visibility Function
    public __construct(array $elements, string $key, \Grav\Framework\Flex\FlexDirectory $directory, \bool $validate=false) : void
    Construct a new Flex Object instance.
    public create(\string $key=null) : \Grav\Framework\Flex\Interfaces\FlexObjectInterface
    Create new object into the storage.
    public delete() : \Grav\Framework\Flex\Interfaces\FlexObjectInterface
    Delete object from the storage.
    public exists() : bool Returns true if the object exists, false otherwise.
    Returns true if the object exists in the storage.
    public getBlueprint(\string $name='') : Blueprint Returns a Blueprint.
    Returns the blueprint of the object.
    public getDefaultValue(\string $name, \string $separator=null) : mixed/null Returns default value of the field, null if there is no default value.
    Returns default value suitable to be used in a form for the given property.
    public getDefaultValues() : array Returns default values.
    Returns default values suitable to be used in a form for the given property.
    public getFlexKey() : string Returns Flex Key of the object.
    Get a unique key for the object. Flex Keys can be used without knowing the Directory the Object belongs into.
    public getForm(\string $name='', array/null/array $form=null) : FlexFormInterface Returns a Form.
    Returns a form instance for the object.
    public getFormValue(\string $name, mixed $default=null, \string $separator=null) : mixed Returns value of the field.
    Returns raw value suitable to be used in a form for the given property.
    public getMetaData() : array Returns metadata of the object.
    Get index data associated to the object.
    public getStorageKey() : string Returns storage key of the Object.
    Get an unique storage key (within the directory) which is used for figuring out the filename or database id.
    public prepareStorage() : array Returns an array of object properties containing only scalars and arrays.
    Prepare object for saving into the storage.
    public save() : \Grav\Framework\Flex\Interfaces\FlexObjectInterface
    Save object into the storage.
    public search(\string $search, string/string[]/null $properties=null, array/null/array $options=null) : float Returns a weight between and 1.
    Search a string from the object, returns weight between 0 and 1. Note: If you override this function, make sure you return value in range 0...1!
    public update(array $data, array/array/\Grav\Framework\Flex\Interfaces\UploadedFileInterface[] $files=array()) : \Grav\Framework\Flex\Interfaces\FlexObjectInterface
    Updates object in the memory.

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


    Interface: \Grav\Framework\Flex\Interfaces\FlexCommonInterface

    Defines common interface shared with both Flex Objects and Collections.

    Visibility Function
    public getCacheChecksum() : string Returns cache checksum.
    Get cache checksum for the object / collection. If checksum changes, cache gets invalided.
    public getCacheKey() : string Returns cache key.
    Get a cache key which is used for caching the object / collection.
    public getFlexDirectory() : FlexDirectory Returns associated Flex Directory.
    Get Flex Directory for the object / collection.
    public getFlexType() : string Returns Flex Type of the collection.
    Get Flex Type of the object / collection.
    public getTimestamp() : int Returns Unix timestamp.
    Get last updated timestamp for the object / collection.

    This class implements \Grav\Framework\Interfaces\RenderInterface


    Interface: \Grav\Framework\Flex\Interfaces\FlexIndexInterface

    Defines Indexes for Flex Objects. Flex indexes are similar to database indexes, they contain indexed fields which can be used to quickly look up or find the objects without loading them.

    Visibility Function
    public static createFromStorage(\Grav\Framework\Flex\FlexDirectory $directory) : static Returns a new Flex Index.
    Helper method to create Flex Index.
    public getIndexMap(\string $indexKey=null) : array
    public static loadEntriesFromStorage(\Grav\Framework\Flex\Interfaces\FlexStorageInterface $storage) : array Returns a list of existing objects [storage_key => [storage_key => xxx, storage_timestamp => 123456, ...]]
    Method to load index from the object storage, usually filesystem.
    public withKeyField(\string $keyField=null) : FlexIndexInterface Returns a new Flex Collection with new key field.
    Return new collection with a different key.

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


    Class: \Grav\Framework\Flex\Storage\SimpleStorage

    Class SimpleStorage

    Visibility Function
    public __construct(array $options) : void
    public createRows(array $rows) : mixed
    public deleteRows(array $rows) : void
    public getExistingKeys() : mixed
    public getMediaPath(\string $key=null) : mixed
    public getStoragePath(\string $key=null) : mixed
    public hasKey(\string $key) : bool
    public readRows(array $rows, mixed $fetched=null) : void
    public renameRow(\string $src, \string $dst) : void
    public replaceRows(array $rows) : void
    public updateRows(array $rows) : void
    protected buildIndex() : array
    Returns list of all stored keys in [key => timestamp] pairs.
    protected getKeyFromPath(\string $path) : string
    Get key from the filesystem path.
    protected getNewKey() : string
    protected save() : void

    This class extends \Grav\Framework\Flex\Storage\AbstractFilesystemStorage

    This class implements \Grav\Framework\Flex\Interfaces\FlexStorageInterface


    Class: \Grav\Framework\Flex\Storage\FolderStorage

    Class FolderStorage

    Visibility Function
    public __construct(array $options) : void
    public createRows(array $rows) : mixed
    public deleteRows(array $rows) : void
    public getExistingKeys() : mixed
    public getMediaPath(\string $key=null) : mixed
    public getPathFromKey(\string $key) : string
    Get filesystem path from the key.
    public getStoragePath(\string $key=null) : mixed
    public hasKey(\string $key) : bool
    public readRows(array $rows, mixed $fetched=null) : void
    public renameRow(\string $src, \string $dst) : void
    public replaceRows(array $rows) : void
    public updateRows(array $rows) : void
    protected buildIndex() : array
    Returns list of all stored keys in [key => timestamp] pairs.
    protected buildIndexFromFilesystem(mixed $path) : void
    protected buildPrefixedIndexFromFilesystem(mixed $path) : void
    protected deleteFile(\RocketTheme\Toolbox\File\File $file) : array/string
    protected deleteFolder(\string $path, \bool $include_target=false) : bool
    protected getKeyFromPath(\string $path) : string
    Get key from the filesystem path.
    protected getNewKey() : string
    protected initOptions(array $options) : void
    protected loadFile(\RocketTheme\Toolbox\File\File $file) : array/null
    protected moveFolder(\string $src, \string $dst) : bool
    protected saveFile(\RocketTheme\Toolbox\File\File $file, array $data) : array

    This class extends \Grav\Framework\Flex\Storage\AbstractFilesystemStorage

    This class implements \Grav\Framework\Flex\Interfaces\FlexStorageInterface


    Class: \Grav\Framework\Flex\Storage\FileStorage

    Class FileStorage

    Visibility Function
    public __construct(array $options) : void
    public getMediaPath(\string $key=null) : mixed
    protected buildIndex() : void
    protected getKeyFromPath(\string $path) : mixed

    This class extends \Grav\Framework\Flex\Storage\FolderStorage

    This class implements \Grav\Framework\Flex\Interfaces\FlexStorageInterface


    Class: \Grav\Framework\Flex\Storage\AbstractFilesystemStorage (abstract)

    Class AbstractFilesystemStorage

    Visibility Function
    public getKeyField() : string
    public hasKeys(array $keys) : bool
    protected detectDataFormatter(\string $filename) : null/string
    protected generateKey() : string
    Generates a random, unique key for the row.
    protected getFile(\string $filename) : \RocketTheme\Toolbox\File\File
    protected initDataFormatter(mixed $formatter) : void
    protected resolvePath(\string $path) : string
    protected validateKey(\string $key) : bool
    Checks if a key is valid.

    This class implements \Grav\Framework\Flex\Interfaces\FlexStorageInterface


    Class: \Grav\Framework\Form\FormFlash

    Visibility Function
    public __construct(\string $sessionId, \string $uniqueId, \string $formName=null) : void
    FormFlashObject constructor.
    public addFile(\string $filename, \string $field, array $crop=null) : bool
    Add existing file to the form flash.
    public addUploadedFile(\Psr\Http\Message\UploadedFileInterface $upload, \string $field=null, array/null/array $crop=null) : string Return name of the file
    Add uploaded file to the form flash.
    public clearFiles() : void
    Clear form flash from all uploaded files.
    public delete() : void
    public exists() : bool
    public getData() : mixed
    public getFilesByField(\string $field) : array
    public getFilesByFields(bool $includeOriginal=false) : array
    public getFormName() : string
    public static getSessionTmpDir(\string $sessionId) : string
    public getTmpDir() : string
    public getUniqieId() : string
    public getUrl() : string
    public getUserEmail() : string
    public getUsername() : string
    public jsonSerialize() : array
    public removeFile(\string $name, \string $field=null) : bool
    Remove any file from form flash.
    public save() : \Grav\Framework\Form\$this
    public setData(array $data) : void
    public setUrl(\string $url) : \Grav\Framework\Form\$this
    public setUserEmail(\string $email=null) : \Grav\Framework\Form\$this
    public setUserName(\string $username=null) : \Grav\Framework\Form\$this
    protected addFileInternal(\string $field, \string $name, array $data, array/null/array $crop=null) : void
    protected getTmpIndex() : \RocketTheme\Toolbox\File\YamlFile
    protected removeTmpDir() : void
    protected removeTmpFile(\string $name) : void

    This class implements \JsonSerializable


    Class: \Grav\Framework\Form\FormFlashFile

    Visibility Function
    public __construct(\string $field, array $upload, \Grav\Framework\Form\FormFlash $flash) : void
    public __debugInfo() : void
    public getClientFilename() : mixed
    public getClientMediaType() : mixed
    public getDestination() : mixed
    public getError() : mixed
    public getMetaData() : mixed
    public getSize() : mixed
    public getStream() : \Psr\Http\Message\StreamInterface
    public getTmpFile() : mixed
    public isMoved() : bool
    public jsonSerialize() : void
    public moveTo(mixed $targetPath) : void

    This class implements \Psr\Http\Message\UploadedFileInterface, \JsonSerializable


    Interface: \Grav\Framework\Form\Interfaces\FormFactoryInterface

    Visibility Function
    public createPageForm(\Grav\Common\Page\Page $page, \string $name, array $form) : \Grav\Framework\Form\Interfaces\FormInterface/null
    DEPRECATED - 1.6 Use FormFactory::createFormByPage() instead.


    Interface: \Grav\Framework\Form\Interfaces\FormInterface

    Interface FormInterface

    Visibility Function
    public getAction() : string
    Get form action (URL). If action is empty, it points to the current page.
    public getBlueprint() : \Grav\Common\Data\Blueprint
    Get blueprint used in the form.
    public getData() : \Grav\Framework\Form\Interfaces\Data/object
    Get current data passed to the form.
    public getError() : string
    public getErrors() : array
    public getFields() : array
    Get form fields as an array. Note: Used in form fields.
    public getFiles() : array/\Grav\Framework\Form\Interfaces\UploadedFileInterface[]
    Get files which were passed to the form.
    public getFormName() : string
    Get form name.
    public getId() : string
    Get HTML id="..." attribute.
    public getName() : string
    public getNonce() : string
    Get the nonce value for a form
    public getNonceAction() : string
    Get nonce action.
    public getNonceName() : string
    Get nonce name.
    public getTask() : string
    Get task for the form if set in blueprints.
    public getUniqueId() : string
    Get unique id for the current form instance. By default regenerated on every page reload. This id is used to load the saved form state, if available.
    public getValue(\string $name) : mixed
    Get a value from the form. Note: Used in form fields.
    public handleRequest(\Psr\Http\Message\ServerRequestInterface $request) : \Grav\Framework\Form\Interfaces\$this
    public isSubmitted() : bool
    public isValid() : bool
    public reset() : void
    Reset form.
    public setId(\string $id) : void
    Sets HTML id="" attribute.
    public setUniqueId(\string $uniqueId) : void
    Sets unique form id.
    public submit(array $data, \Grav\Framework\Form\Interfaces\UploadedFileInterface[] $files=null) : \Grav\Framework\Form\Interfaces\$this

    This class implements \Grav\Framework\Interfaces\RenderInterface, \Serializable


    Interface: \Grav\Framework\Interfaces\RenderInterface

    Defines common interface to render any object.

    Visibility Function
    public render(\string $layout=null, array/array/null/array $context=array()) : \Grav\Framework\Interfaces\ContentBlockInterface/HtmlBlock Returns HtmlBlock containing the rendered output.
    Renders the object.
    Examples of RenderInterface::render()
    $block = $object->render('custom', ['variable' => 'value']);{% render object layout 'custom' with { variable: 'value' } %}


    Interface: \Grav\Framework\Media\Interfaces\MediaObjectInterface

    Class implements media object interface.

    Visibility Function


    Interface: \Grav\Framework\Media\Interfaces\MediaManipulationInterface

    Interface MediaManipulationInterface

    Visibility Function
    public deleteMediaFile(\string $filename) : void
    public uploadMediaFile(\Psr\Http\Message\UploadedFileInterface $uploadedFile) : void

    This class implements \Grav\Common\Media\Interfaces\MediaInterface, \Grav\Framework\Media\Interfaces\MediaInterface


    Interface: \Grav\Framework\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\Framework\Media\Interfaces\MediaCollectionInterface

    Class implements media collection interface.

    Visibility Function

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


    Class: \Grav\Framework\Object\PropertyObject

    Property Objects keep their data in protected object properties.

    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, mixed $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/mixed[] Property value.
    public getType(bool $prefix=true) : string
    public hasKey() : bool
    public hasNestedProperty(string $property, string $separator=null) : bool True if property has been defined (can be null).
    public hasProperty(string $property) : bool/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, mixed $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

    Class contains a collection of objects.

    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()) : mixed[] 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, mixed $default) : \Grav\Framework\Object\$this
    public doGetProperty(string $property, mixed $default=null) : mixed[] Key/Value pairs of the properties.
    public doHasProperty(string $property) : bool[] Key/Value pairs of the properties.
    public doSetProperty(string $property, mixed $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/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 hasKey() : bool
    public hasNestedProperty(string $property, string $separator=null) : array Key/Value pairs of the properties.
    public hasProperty(string $property) : bool/bool[] True if property has been defined (can be null).
    public jsonSerialize() : array
    Implements JsonSerializable interface.
    public limit(int $start, int/null $limit=null) : \Grav\Framework\Object\static
    public matching(\Doctrine\Common\Collections\Criteria $criteria) : void
    public orderBy(array $ordering) : \Grav\Framework\Object\Collection/\Grav\Framework\Object\static
    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, mixed $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 Objects keep the data in private array property.

    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, mixed $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/mixed[] Property value.
    public getType(bool $prefix=true) : string
    public hasKey() : bool
    public hasNestedProperty(string $property, string $separator=null) : bool True if property has been defined (can be null).
    public hasProperty(string $property) : bool/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, mixed $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\ObjectIndex (abstract)

    Keeps index of objects instead of collection of objects. This class allows you to keep a list of objects and load them on demand. The class can be used seemingly instead of ObjectCollection when the objects haven't been loaded yet. This is an abstract class and has some protected abstract methods to load objects which you need to implement in order to use the class.

    Visibility Function
    public abstract __call(mixed $name, mixed $arguments) : void
    public call(mixed $method, array $arguments=array()) : void
    public collectionGroup(string $property) : \Grav\Framework\Object\Interfaces\ObjectCollectionInterface[]
    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, mixed $default, string $separator=null) : \Grav\Framework\Object\Interfaces\ObjectCollectionInterface
    public defProperty(string $property, mixed $default) : \Grav\Framework\Object\Interfaces\ObjectCollectionInterface
    public getKey() : string
    public getNestedProperty(string $property, mixed $default=null, string $separator=null) : mixed Property value.
    public getObjectKeys() : array
    public getProperty(string $property, mixed $default=null) : array Property values.
    public getType(bool $prefix=true) : string
    public group(string $property) : array
    Group items in the collection by a field and return them as associated array.
    public hasNestedProperty(string $property, string $separator=null) : bool True if property has been defined (can be null).
    public hasProperty(string $property) : array True if property has been defined (can be null).
    public matching(\Doctrine\Common\Collections\Criteria $criteria) : void
    public orderBy(array $ordering) : \Grav\Framework\Object\Interfaces\ObjectCollectionInterface
    public setKey(string $key) : \Grav\Framework\Object\$this
    public setNestedProperty(string $property, string $value, string $separator=null) : \Grav\Framework\Object\Interfaces\ObjectCollectionInterface
    public setProperty(string $property, string $value) : \Grav\Framework\Object\Interfaces\ObjectCollectionInterface
    public unsetNestedProperty(string $property, mixed $separator=null) : \Grav\Framework\Object\Interfaces\ObjectCollectionInterface
    public unsetProperty(string $property) : \Grav\Framework\Object\Interfaces\ObjectCollectionInterface
    protected getTypePrefix() : string

    This class extends \Grav\Framework\Collection\AbstractIndexCollection

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


    Class: \Grav\Framework\Object\LazyObject

    Lazy Objects keep their data in both protected object properties and falls back to a stored array if property does not exist or is not initialized.

    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, mixed $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/mixed[] Property value.
    public getType(bool $prefix=true) : string
    public hasKey() : bool
    public hasNestedProperty(string $property, string $separator=null) : bool True if property has been defined (can be null).
    public hasProperty(string $property) : bool/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, mixed $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

    Common Interface for both Objects and Collections

    Visibility Function
    public defNestedProperty(string $property, mixed $default, string/null $separator=null) : \Grav\Framework\Object\Interfaces\$this
    public getNestedProperty(string $property, mixed/null $default=null, string/null $separator=null) : mixed/mixed[] Property value.
    public hasNestedProperty(string $property, string/null $separator=null) : bool/bool[] True if property has been defined (can be null).
    public setNestedProperty(string $property, mixed $value, string/null $separator=null) : \Grav\Framework\Object\Interfaces\$this
    public unsetNestedProperty(string $property, string/null $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 group(string $property) : array
    Group items in the collection by a field and return them as associated array.
    public limit(int $start, int/null $limit=null) : \Grav\Framework\Object\Interfaces\ObjectCollectionInterface
    public orderBy(array $ordering) : \Grav\Framework\Object\Interfaces\ObjectCollectionInterface
    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/null $default=null) : mixed/mixed[] Property value.
    public getType() : string
    public hasProperty(string $property) : bool/bool[] True if property has been defined (can be null).
    public setProperty(string $property, mixed $value) : \Grav\Framework\Object\Interfaces\$this
    public unsetProperty(string $property) : \Grav\Framework\Object\Interfaces\$this

    This class implements \Serializable, \JsonSerializable


    Class: \Grav\Framework\Pagination\PaginationPage

    Visibility Function
    public __construct(array $options=array()) : void

    This class extends \Grav\Framework\Pagination\AbstractPaginationPage

    This class implements \Grav\Framework\Pagination\Interfaces\PaginationPageInterface


    Class: \Grav\Framework\Pagination\Pagination

    Visibility Function
    public __construct(\Grav\Framework\Route\Route $route, \int $total, \int $pos=null, \int $limit=null, array $options=null) : void

    This class extends \Grav\Framework\Pagination\AbstractPagination

    This class implements \Countable, \IteratorAggregate, \Traversable, \Grav\Framework\Pagination\Interfaces\PaginationInterface


    Class: \Grav\Framework\Pagination\AbstractPaginationPage (abstract)

    Visibility Function
    public getLabel() : mixed
    public getNumber() : mixed
    public getOptions() : mixed
    public getUrl() : mixed
    public isActive() : bool
    public isEnabled() : bool
    protected setOptions(array $options) : void

    This class implements \Grav\Framework\Pagination\Interfaces\PaginationPageInterface


    Class: \Grav\Framework\Pagination\AbstractPagination

    Visibility Function
    public count() : void
    public getFirstPage(\string $label=null, \int $count) : mixed
    public getIterator() : mixed
    public getLastPage(\string $label=null, \int $count) : mixed
    public getLimit() : mixed
    public getNextNumber(\int $count=1) : mixed
    public getNextPage(\string $label=null, \int $count=1) : mixed
    public getOptions() : mixed
    public getPage(\int $page, \string $label=null) : mixed
    public getPageNumber() : mixed
    public getPages() : mixed
    public getPrevNumber(\int $count=1) : mixed
    public getPrevPage(\string $label=null, \int $count=1) : mixed
    public getRoute() : mixed
    public getStart() : mixed
    public getTotal() : mixed
    public getTotalPages() : mixed
    public isEnabled() : bool
    protected calculateLimits() : void
    protected calculateRange() : void
    protected initialize(\Grav\Framework\Route\Route $route, \int $total, \int $pos=null, \int $limit=null, array $options=null) : void
    protected loadItems() : mixed
    protected setLimit(\int $limit=null) : \Grav\Framework\Pagination\$this
    protected setOptions(array $options=null) : void
    protected setPage(\int $page=null) : void
    protected setRoute(\Grav\Framework\Route\Route $route) : void
    protected setStart(\int $start=null) : \Grav\Framework\Pagination\$this
    protected setTotal(\int $total) : \Grav\Framework\Pagination\$this

    This class implements \Grav\Framework\Pagination\Interfaces\PaginationInterface, \Traversable, \IteratorAggregate, \Countable


    Interface: \Grav\Framework\Pagination\Interfaces\PaginationInterface

    Visibility Function
    public count() : void
    public getFirstPage(\string $label=null, \int $count) : mixed
    public getLastPage(\string $label=null, \int $count) : mixed
    public getLimit() : mixed
    public getNextNumber(\int $count=1) : mixed
    public getNextPage(\string $label=null, \int $count=1) : mixed
    public getOptions() : mixed
    public getPage(\int $page, \string $label=null) : mixed
    public getPageNumber() : mixed
    public getPrevNumber(\int $count=1) : mixed
    public getPrevPage(\string $label=null, \int $count=1) : mixed
    public getStart() : mixed
    public getTotal() : mixed
    public getTotalPages() : mixed

    This class implements \Countable, \IteratorAggregate, \Traversable


    Interface: \Grav\Framework\Pagination\Interfaces\PaginationPageInterface

    Visibility Function
    public getLabel() : mixed
    public getNumber() : mixed
    public getOptions() : mixed
    public getUrl() : mixed
    public isActive() : bool
    public isEnabled() : bool


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

    DEPRECATED 1.6 Using message PSR-7 decorators instead.

    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\Psr7\Response

    Class Response

    Visibility Function
    public __construct(\int $status=200, array $headers=array(), string/null/\Grav\Framework\Psr7\resource/\Grav\Framework\Psr7\StreamInterface $body=null, \string $version='1.1', \string $reason=null) : void
    public __toString() : string
    Convert response to string. Note: This method is not part of the PSR-7 standard.
    public getBody() : mixed
    public getHeader(mixed $header) : mixed
    public getHeaderLine(mixed $header) : mixed
    public getHeaders() : mixed
    public getProtocolVersion() : mixed
    public getReasonPhrase() : mixed
    public getResponse() : \Psr\Http\Message\ResponseInterface
    Returns the decorated response. Since the underlying Response is immutable as well exposing it is not an issue, because it's state cannot be altered
    public getStatusCode() : mixed
    public hasHeader(mixed $header) : bool
    public isClientError() : bool
    Is this response a client error? Note: This method is not part of the PSR-7 standard.
    public isEmpty() : bool
    Is this response empty? Note: This method is not part of the PSR-7 standard.
    public isForbidden() : bool
    Is this response forbidden? Note: This method is not part of the PSR-7 standard.
    public isInformational() : bool
    Is this response informational? Note: This method is not part of the PSR-7 standard.
    public isNotFound() : bool
    Is this response not Found? Note: This method is not part of the PSR-7 standard.
    public isOk() : bool
    Is this response OK? Note: This method is not part of the PSR-7 standard.
    public isRedirect() : bool
    Is this response a redirect? Note: This method is not part of the PSR-7 standard.
    public isRedirection() : bool
    Is this response a redirection? Note: This method is not part of the PSR-7 standard.
    public isServerError() : bool
    Is this response a server error? Note: This method is not part of the PSR-7 standard.
    public isSuccessful() : bool
    Is this response successful? Note: This method is not part of the PSR-7 standard.
    public withAddedHeader(mixed $header, mixed $value) : void
    public withBody(\Psr\Http\Message\StreamInterface $body) : void
    public withHeader(mixed $header, mixed $value) : void
    public withJson(mixed $data, \int $status=null, \int $options, \int $depth=512) : \Grav\Framework\Psr7\static
    Json. Note: This method is not part of the PSR-7 standard. This method prepares the response object to return an HTTP Json response to the client.
    public withProtocolVersion(mixed $version) : void
    public withRedirect(\string $url, int/null $status=null) : \Grav\Framework\Psr7\static
    Redirect. Note: This method is not part of the PSR-7 standard. This method prepares the response object to return an HTTP Redirect response to the client.
    public withResponse(\Psr\Http\Message\ResponseInterface $response) : \Grav\Framework\Psr7\self
    Exchanges the underlying response with another.
    public withStatus(mixed $code, string $reasonPhrase='') : void
    public withoutHeader(mixed $header) : void

    This class implements \Psr\Http\Message\ResponseInterface, \Psr\Http\Message\MessageInterface


    Class: \Grav\Framework\Psr7\Stream

    Visibility Function
    public __construct(string $body='') : void
    public __destruct() : void
    public __toString() : void
    public close() : void
    public detach() : void
    public eof() : void
    public getContents() : mixed
    public getMetadata(mixed $key=null) : mixed
    public getSize() : mixed
    public isReadable() : bool
    public isSeekable() : bool
    public isWritable() : bool
    public read(mixed $length) : void
    public rewind() : void
    public seek(mixed $offset, mixed $whence) : void
    public tell() : void
    public write(mixed $string) : void

    This class implements \Psr\Http\Message\StreamInterface


    Class: \Grav\Framework\Psr7\Request

    Visibility Function
    public __construct(\string $method, string/\Grav\Framework\Psr7\UriInterface $uri, array $headers=array(), string/null/\Grav\Framework\Psr7\resource/\Grav\Framework\Psr7\StreamInterface $body=null, \string $version='1.1') : void
    public getBody() : mixed
    public getHeader(mixed $header) : mixed
    public getHeaderLine(mixed $header) : mixed
    public getHeaders() : mixed
    public getMethod() : mixed
    public getProtocolVersion() : mixed
    public getRequest() : \Psr\Http\Message\RequestInterface
    Returns the decorated request. Since the underlying Request is immutable as well exposing it is not an issue, because it's state cannot be altered
    public getRequestTarget() : mixed
    public getUri() : mixed
    public hasHeader(mixed $header) : bool
    public withAddedHeader(mixed $header, mixed $value) : void
    public withBody(\Psr\Http\Message\StreamInterface $body) : void
    public withHeader(mixed $header, mixed $value) : void
    public withMethod(mixed $method) : void
    public withProtocolVersion(mixed $version) : void
    public withRequest(\Psr\Http\Message\RequestInterface $request) : \Grav\Framework\Psr7\self
    Exchanges the underlying request with another.
    public withRequestTarget(mixed $requestTarget) : void
    public withUri(\Psr\Http\Message\UriInterface $uri, bool $preserveHost=false) : void
    public withoutHeader(mixed $header) : void

    This class implements \Psr\Http\Message\RequestInterface, \Psr\Http\Message\MessageInterface


    Class: \Grav\Framework\Psr7\Uri

    Visibility Function
    public __construct(\string $uri='') : void
    public __toString() : void
    public getAuthority() : mixed
    public getFragment() : mixed
    public getHost() : mixed
    public getPath() : mixed
    public getPort() : mixed
    public getQuery() : mixed
    public getQueryParams() : array
    public getScheme() : mixed
    public getUserInfo() : mixed
    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\Psr7\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(mixed $fragment) : void
    public withHost(mixed $host) : void
    public withPath(mixed $path) : void
    public withPort(mixed $port) : void
    public withQuery(mixed $query) : void
    public withQueryParams(array $params) : \Psr\Http\Message\UriInterface
    public withScheme(mixed $scheme) : void
    public withUserInfo(mixed $user, mixed $password=null) : void

    This class implements \Psr\Http\Message\UriInterface


    Class: \Grav\Framework\Psr7\UploadedFile

    Visibility Function
    public __construct(\Grav\Framework\Psr7\StreamInterface/string/\Grav\Framework\Psr7\resource $streamOrFile, int $size, int $errorStatus, string/null $clientFilename=null, string/null $clientMediaType=null) : void
    public getClientFilename() : mixed
    public getClientMediaType() : mixed
    public getError() : mixed
    public getSize() : mixed
    public getStream() : mixed
    public moveTo(mixed $targetPath) : void

    This class implements \Psr\Http\Message\UploadedFileInterface


    Class: \Grav\Framework\Psr7\ServerRequest

    Class ServerRequest

    Visibility Function
    public __construct(\string $method, string/\Grav\Framework\Psr7\UriInterface $uri, array $headers=array(), string/null/\Grav\Framework\Psr7\resource/\Grav\Framework\Psr7\StreamInterface $body=null, \string $version='1.1', array $serverParams=array()) : void
    public getAttribute(string $name, mixed $default=null) : mixed
    Retrieve a single derived request attribute. Retrieves a single derived request attribute as described in getAttributes(). If the attribute has not been previously set, returns the default value as provided. This method obviates the need for a hasAttribute() method, as it allows specifying a default value to return if the attribute is not found.
    public getAttributes() : array Attributes derived from the request.
    Retrieve attributes derived from the request. The request "attributes" may be used to allow injection of any parameters derived from the request: e.g., the results of path match operations; the results of decrypting cookies; the results of deserializing non-form-encoded message bodies; etc. Attributes will be application and request specific, and CAN be mutable.
    public getBody() : mixed
    public getContentCharset() : string/null
    Get serverRequest content character set, if known. Note: This method is not part of the PSR-7 standard.
    public getContentLength() : int/null
    Get serverRequest content length, if known. Note: This method is not part of the PSR-7 standard.
    public getContentType() : string/null The serverRequest content type, if known
    Get serverRequest content type. Note: This method is not part of the PSR-7 standard.
    public getCookieParam(string $key, mixed $default=null) : mixed
    Fetch cookie value from cookies sent by the client to the server. Note: This method is not part of the PSR-7 standard.
    public getCookieParams() : array
    Retrieve cookies. Retrieves cookies sent by the client to the server. The data MUST be compatible with the structure of the $_COOKIE superglobal.
    public getHeader(mixed $header) : mixed
    public getHeaderLine(mixed $header) : mixed
    public getHeaders() : mixed
    public getMediaType() : string/null The serverRequest media type, minus content-type params
    Get serverRequest media type, if known. Note: This method is not part of the PSR-7 standard.
    public getMediaTypeParams() : mixed[]
    Get serverRequest media type params, if known. Note: This method is not part of the PSR-7 standard.
    public getMethod() : mixed
    public getParam(string $key, string $default=null) : mixed The parameter value.
    Fetch serverRequest parameter value from body or query string (in that order). Note: This method is not part of the PSR-7 standard.
    public getParams() : mixed[]
    Fetch associative array of body and query string parameters. Note: This method is not part of the PSR-7 standard.
    public getParsedBody() : null/array/object The deserialized body parameters, if any. These will typically be an array or object.
    Retrieve any parameters provided in the request body. If the request Content-Type is either application/x-www-form-urlencoded or multipart/form-data, and the request method is POST, this method MUST return the contents of $_POST. Otherwise, this method may return any results of deserializing the request body content; as parsing returns structured content, the potential types MUST be arrays or objects only. A null value indicates the absence of body content.
    public getParsedBodyParam(string $key, mixed $default=null) : mixed
    Fetch parameter value from serverRequest body. Note: This method is not part of the PSR-7 standard.
    public getProtocolVersion() : mixed
    public getQueryParam(string $key, mixed $default=null) : mixed
    Fetch parameter value from query string. Note: This method is not part of the PSR-7 standard.
    public getQueryParams() : array
    Retrieve query string arguments. Retrieves the deserialized query string arguments, if any. Note: the query params might not be in sync with the URI or server params. If you need to ensure you are only getting the original values, you may need to parse the query string from getUri()->getQuery() or from the QUERY_STRING server param.
    public getRequest() : \Psr\Http\Message\ServerRequestInterface
    Returns the decorated request. Since the underlying Request is immutable as well exposing it is not an issue, because it's state cannot be altered
    public getRequestTarget() : mixed
    public getServerParam(string $key, mixed $default=null) : mixed
    Retrieve a server parameter. Note: This method is not part of the PSR-7 standard.
    public getServerParams() : array
    Retrieve server parameters. Retrieves data related to the incoming request environment, typically derived from PHP's $_SERVER superglobal. The data IS NOT REQUIRED to originate from $_SERVER.
    public getUploadedFiles() : array An array tree of UploadedFileInterface instances; an empty array MUST be returned if no data is present.
    Retrieve normalized file upload data. This method returns upload metadata in a normalized tree, with each leaf an instance of Psr\Http\Message\UploadedFileInterface. These values MAY be prepared from $_FILES or the message body during instantiation, or MAY be injected via withUploadedFiles().
    public getUri() : mixed
    public hasHeader(mixed $header) : bool
    public isDelete() : bool
    Is this a DELETE serverRequest? Note: This method is not part of the PSR-7 standard.
    public isGet() : bool
    Is this a GET serverRequest? Note: This method is not part of the PSR-7 standard.
    public isHead() : bool
    Is this a HEAD serverRequest? Note: This method is not part of the PSR-7 standard.
    public isMethod(string $method) : bool
    Does this serverRequest use a given method? Note: This method is not part of the PSR-7 standard.
    public isOptions() : bool
    Is this a OPTIONS serverRequest? Note: This method is not part of the PSR-7 standard.
    public isPatch() : bool
    Is this a PATCH serverRequest? Note: This method is not part of the PSR-7 standard.
    public isPost() : bool
    Is this a POST serverRequest? Note: This method is not part of the PSR-7 standard.
    public isPut() : bool
    Is this a PUT serverRequest? Note: This method is not part of the PSR-7 standard.
    public isXhr() : bool
    Is this an XHR serverRequest? Note: This method is not part of the PSR-7 standard.
    public withAddedHeader(mixed $header, mixed $value) : void
    public withAttribute(string $name, mixed $value) : \Psr\Http\Message\static
    Return an instance with the specified derived request attribute. This method allows setting a single derived request attribute as described in getAttributes(). This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the updated attribute.
    public withAttributes(array $attributes) : void
    public withBody(\Psr\Http\Message\StreamInterface $body) : void
    public withCookieParams(array $cookies) : \Psr\Http\Message\static
    Return an instance with the specified cookies. The data IS NOT REQUIRED to come from the $_COOKIE superglobal, but MUST be compatible with the structure of $_COOKIE. Typically, this data will be injected at instantiation. This method MUST NOT update the related Cookie header of the request instance, nor related values in the server params. This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the updated cookie values.
    public withHeader(mixed $header, mixed $value) : void
    public withMethod(mixed $method) : void
    public withParsedBody(null/array/object $data) : \Psr\Http\Message\static
    Return an instance with the specified body parameters. These MAY be injected during instantiation. If the request Content-Type is either application/x-www-form-urlencoded or multipart/form-data, and the request method is POST, use this method ONLY to inject the contents of $_POST. The data IS NOT REQUIRED to come from $_POST, but MUST be the results of deserializing the request body content. Deserialization/parsing returns structured data, and, as such, this method ONLY accepts arrays or objects, or a null value if nothing was available to parse. As an example, if content negotiation determines that the request data is a JSON payload, this method could be used to create a request instance with the deserialized parameters. This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the updated body parameters. typically be in an array or object.
    public withProtocolVersion(mixed $version) : void
    public withQueryParams(array $query) : \Psr\Http\Message\static
    Return an instance with the specified query string arguments. These values SHOULD remain immutable over the course of the incoming request. They MAY be injected during instantiation, such as from PHP's $_GET superglobal, or MAY be derived from some other value such as the URI. In cases where the arguments are parsed from the URI, the data MUST be compatible with what PHP's parse_str() would return for purposes of how duplicate query parameters are handled, and how nested sets are handled. Setting query string arguments MUST NOT change the URI stored by the request, nor the values in the server params. This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the updated query string arguments. $_GET.
    public withRequest(\Psr\Http\Message\RequestInterface $request) : \Grav\Framework\Psr7\self
    Exchanges the underlying request with another.
    public withRequestTarget(mixed $requestTarget) : void
    public withUploadedFiles(array $uploadedFiles) : \Psr\Http\Message\static
    Create a new instance with the specified uploaded files. This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the updated body parameters.
    public withUri(\Psr\Http\Message\UriInterface $uri, bool $preserveHost=false) : void
    public withoutAttribute(string $name) : \Psr\Http\Message\static
    Return an instance that removes the specified derived request attribute. This method allows removing a single derived request attribute as described in getAttributes(). This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that removes the attribute.
    public withoutHeader(mixed $header) : void

    This class implements \Psr\Http\Message\ServerRequestInterface, \Psr\Http\Message\MessageInterface, \Psr\Http\Message\RequestInterface


    Class: \Grav\Framework\RequestHandler\RequestHandler

    Visibility Function
    public __construct(array $middleware, \callable $default, \Grav\Framework\RequestHandler\ContainerInterface/null/\Psr\Container\ContainerInterface $container=null) : void
    Delegate constructor.
    public addCallable(\string $name, \callable $callable) : \Grav\Framework\RequestHandler\$this
    Add callable initializing Middleware that will be executed as soon as possible.
    public addMiddleware(\string $name, \Psr\Http\Server\MiddlewareInterface $middleware) : \Grav\Framework\RequestHandler\$this
    Add Middleware that will be executed as soon as possible.
    public handle(\Psr\Http\Message\ServerRequestInterface $request) : void

    This class implements \Psr\Http\Server\RequestHandlerInterface


    Class: \Grav\Framework\RequestHandler\Exception\NotFoundException

    Visibility Function
    public __construct(\Psr\Http\Message\ServerRequestInterface $request, \Throwable/null/\Throwable $previous=null) : void
    NotFoundException constructor.
    public getRequest() : mixed

    This class extends \Grav\Framework\RequestHandler\Exception\RequestException

    This class implements \Throwable


    Class: \Grav\Framework\RequestHandler\Exception\PageExpiredException

    Visibility Function
    public __construct(\Psr\Http\Message\ServerRequestInterface $request, \Throwable/null/\Throwable $previous=null) : void
    PageExpiredException constructor.

    This class extends \Grav\Framework\RequestHandler\Exception\RequestException

    This class implements \Throwable


    Class: \Grav\Framework\RequestHandler\Exception\NotHandledException

    Visibility Function

    This class extends \Grav\Framework\RequestHandler\Exception\NotFoundException

    This class implements \Throwable


    Class: \Grav\Framework\RequestHandler\Exception\InvalidArgumentException

    Visibility Function
    public __construct(string $message='', mixed/null $invalidMiddleware=null, int $code, \Grav\Framework\RequestHandler\Exception\Throwable/null/\Throwable $previous=null) : void
    InvalidArgumentException constructor.
    public getInvalidMiddleware() : mixed/null
    Return the invalid middleware

    This class extends \InvalidArgumentException

    This class implements \Throwable


    Class: \Grav\Framework\RequestHandler\Exception\RequestException

    Visibility Function
    public __construct(\Psr\Http\Message\ServerRequestInterface $request, \string $message, \int $code=500, \Throwable/null/\Throwable $previous=null) : void
    public getHttpCode() : mixed
    public getHttpReason() : mixed
    public getRequest() : \Psr\Http\Message\ServerRequestInterface

    This class extends \RuntimeException

    This class implements \Throwable


    Class: \Grav\Framework\RequestHandler\Middlewares\Exceptions

    Visibility Function
    public process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler) : void

    This class implements \Psr\Http\Server\MiddlewareInterface


    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
    DEPRECATED - 1.6 Use ->toString(true) or ->getUri() instead.
    public getExtension() : 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 toString(\bool $includeRoot=false) : string
    public withAddedPath(string $path) : \Grav\Framework\Route\Route
    public withExtension(string $extension) : \Grav\Framework\Route\Route
    public withGravParam(string $param, mixed $value) : \Grav\Framework\Route\Route
    public withQueryParam(string $param, mixed $value) : \Grav\Framework\Route\Route
    public withRoot(string $root) : \Grav\Framework\Route\$this
    Allow the ability to set the root to something else
    public withRoute(string $route) : \Grav\Framework\Route\$this
    Allow the ability to set the route to something else
    public withoutGravParams() : void
    public withoutParams() : void
    public withoutQueryParams() : void
    protected copy() : void
    protected getUriPath(bool $includeRoot=false) : 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() : bool
    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 isSessionStarted() : bool
    http://php.net/manual/en/function.session-status.php#113468 Check if session is started nicely.
    protected setOption(string $key, mixed $value) : void

    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() : bool
    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\Session\Exceptions\SessionException

    Visibility Function

    This class extends \RuntimeException

    This class implements \Throwable


    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.


    Class: \Grav\Installer\Install

    Grav installer. NOTE: This class can be initialized during upgrade from an older version of Grav. Make sure it runs there!

    Visibility Function
    public __invoke(\string $zip) : void
    public checkRequirements() : array List of failed requirements. If the list is empty, installation can go on.
    NOTE: This method can only be called after $grav['plugins']->init().
    public finalize() : void
    public install() : void
    public static instance() : void
    public prepare() : void
    public setZip(\string $zip) : void
    protected checkPlugins(mixed $results, array $plugins) : void
    protected checkVersion(mixed $results, mixed $type, mixed $name, array $check, mixed $version) : void

    Results