Flextype API

Table of contents

Class: \Flextype\FrontmatterParser

Visibility Function
public static decode(**\string $input*) : void*
public static encode(**mixed $input*) : void*
public static parser(**\string $content*) : array*

Front matter parser |


Class: \Flextype\Parser

Visibility Function
public static decode(**\string $input, \string $parser*) : void*
public static encode(**mixed $input, \string $parser*) : void*

Class: \Flextype\YamlParser

Visibility Function
public static decode(**\string $input, int/\integer $flags*) : mixed The YAML converted to a PHP value*

Parses YAML into a PHP value. $array = YamlParser::decode($yaml_file_content); | | public static | encode(**mixed $input, \integer $inline=5, \integer $indent=2, \integer $flags=16*) : string A YAML string representing the original PHP value
Dumps a PHP value to a YAML string. The dump method, when supplied with an array, will do its best to convert the array into friendly YAML.* |


Class: \Flextype\JsonParser

Visibility Function
public static decode(**\string $input, \boolean $decode_assoc=true, \integer $decode_depth=512, int/\integer $decode_options*) : mixed The JSON converted to a PHP value*

Takes a JSON encoded string and converts it into a PHP variable. $array = JsonParser::decode($json_file_content); | | public static | encode(**mixed $input, int/\integer $encode_options, \integer $encode_depth=512*) : mixed The JSON converted to a PHP value
Returns the JSON representation of a value $result = JsonParser::encode($json_content);* |


Class: \Flextype\Entries

Visibility Function
public __construct(***mixed* **$flextype) : void

Constructor | | public | copy(**\string $id, \string $new_id, \boolean $recursive=false) : bool/null True on success, false on failure.
Copy entry(s) | | public | create(\string $id, array $data) : bool True on success, false on failure.
Create entry | | public | delete(\string $id) : bool True on success, false on failure.
Delete entry | | public | fetch(\string $id) : array/false The entry array data or false on failure.
Fetch single entry | | public | fetchAll(\string $id, array $args=array()) : array The entries array data
Fetch entries collection | | public | getDirLocation(\string $id) : string entry directory location
Get entry directory location | | public | getFileLocation(\string $id) : string entry file location
Get entry file location | | public | has(\string $id) : bool True on success, false on failure.
Check whether entry exists | | public | rename(\string $id, \string $new_id) : bool True on success, false on failure.
Rename entry | | public | update(\string $id, array $data*) : bool True on success, false on failure.
Update entry* |


Class: \Flextype\Snippets

Visibility Function
public __construct(***mixed* **$flextype, mixed $app) : void

Constructor | | public | copy(**\string $id, \string $new_id) : bool True on success, false on failure.
Copy snippet | | public | create(\string $id, \string $data='') : bool True on success, false on failure.
Create snippet | | public | delete(\string $id) : bool True on success, false on failure.
Delete snippet | | public | exec(\string $id) : string/bool Returns the contents of the output buffer and end output buffering. If output buffering isn't active then FALSE is returned.
Exec snippet | | public | fetch(\string $id) : string/false The snippet contents or false on failure.
Fetch snippet | | public | fetchAll() : array
Fetch Snippets | | public |
getDirLocation() : string Snippet dir path
Helper method getDirLocation | | public |
getFileLocation(\string $id) : string Snippet file path
Helper method getFileLocation | | public | has(\string $id) : bool True on success, false on failure.
Check whether snippet exists. | | public | rename(\string $id, \string $new_id) : bool True on success, false on failure.
Rename snippet | | public | update(\string $id, \string $data*) : bool True on success, false on failure.
Update Snippet* |


Class: \Flextype\Controller

Visibility Function
public __construct(**mixed $container*) : void*
__construct public __get(**mixed $property*) : void*

__get |


Class: \Flextype\Themes

Visibility Function
public __construct(**mixed $flextype*) : void*

Private construct method to enforce singleton behavior. | | public | getPartials(**\string $theme) : array
Get partials for theme | | public | getTemplates(\string $theme) : array
Get templates for theme | | public | getThemes() : array
Get list of themes | | public |
init(mixed $flextype, mixed $app*) : void
Init themes* |


Class: \Flextype\Cache

Visibility Function
public __construct(***mixed* **$flextype) : void

Constructor | | public | clear(**\string $id) : void
Clear Cache | | public | clearAll() : void
Clear ALL 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 | driver() : void
Returns driver variable | | public |
fetch(\string $id) : mixed The cached data or FALSE, if no cache entry exists for the given id.
Fetches an entry from the cache. | | public | getCacheDriver() : mixed
Get Cache Driver | | public |
getKey() : mixed
Get cache key. | | public |
getLifetime() : mixed
Retrieve the cache lifetime (in seconds) | | public |
save(\string $id, mixed $data, \integer $lifetime=null) : void
Puts data into the cache. If zero (the default), the entry never expires (although it may be deleted from the cache to make place for other entries). | | public | setLifetime(int/\integer $future) : void
Set the cache lifetime. | | protected | setApcuCacheDriver() : void
The ApcuCache driver uses the apcu_fetch, apcu_exists, etc. functions that come with PHP so no additional setup is required in order to use it. | | protected |
setArrayCacheDriver() : void
The ArrayCache driver stores the cache data in PHPs memory and is not persisted anywhere. This can be useful for caching things in memory for a single process when you don't need the cache to be persistent across processes. | | protected |
setCacheDriver(\string $driver_name) : void | | protected | setDefaultCacheDriverName(\string $driver_name) : void
Set Default Cache Driver Name | | protected | setFilesystemCacheDriver() : void
Filesystem cache Driver | | protected |
setMemcachedCacheDriver() : void
The MemcachedCache drivers stores the cache data in Memcached. | | protected |
setRedisCacheDriver() : void
The RedisCache driver stores the cache data in Redis and depends on the phpredis extension https://github.com/phpredis/phpredis | | protected |
setSQLite3CacheDriver() : void
The SQLite3Cache driver stores the cache data in a SQLite database and depends on the sqlite3 extension http://php.net/manual/en/book.sqlite3.php | | protected |
setWinCacheDriver() : void
The WinCacheCache driver uses the wincache_ucache_get, wincache_ucache_exists, etc. functions that come with the wincache extension http://php.net/manual/en/book.wincache.php | | protected |
setZendDataCacheDriver()* : void
The ZendDataCache driver uses the Zend Data Cache API available in the Zend Platform.* |


Class: \Flextype\Fieldsets

Visibility Function
public __construct(***mixed* **$flextype) : void

Constructor | | public | copy(**\string $id, \string $new_id) : bool True on success, false on failure.
Copy fieldset | | public | create(\string $id, array $data) : bool True on success, false on failure.
Create fieldset | | public | delete(\string $id) : bool True on success, false on failure.
Delete fieldset | | public | fetch(\string $id) : array/false The entry contents or false on failure.
Fetch fieldset | | public | fetchAll() : array
Fetch all fieldsets | | public |
getDirLocation() : mixed
Helper method getDirLocation | | public |
getFileLocation(\string $id) : mixed
Helper method getFileLocation | | public | has(\string $id) : bool True on success, false on failure.
Check whether fieldset exists. | | public | rename(\string $id, \string $new_id) : bool True on success, false on failure.
Rename fieldset | | public | update(\string $id, array $data*) : bool True on success, false on failure.
Update fieldset* |


Class: \Flextype\Plugins

Visibility Function
public __construct(**mixed $flextype, mixed $app*) : void*

Constructor | | public | getLocales() : array
Get locales | | public | init(**mixed $flextype, mixed $app*) : void
Init Plugins* |


Class: \Flextype\Middleware

Visibility Function
public __construct(**mixed $container*) : void*
__construct public __get(**mixed $property*) : void*

__get |


Class: \Flextype\Forms

Visibility Function
public __construct(***mixed* **$flextype) : void

Constructor | | public | render(**array $fieldset, array $values=array(), \Flextype\Request/\Psr\Http\Message\ServerRequestInterface $request, \Flextype\Response/\Psr\Http\Message\ResponseInterface $response) : string Returns form based on fieldsets
Render form | | protected | _actionHiddenField() : string Returns field
_actionHiddenField | | protected |
_csrfHiddenField() : string Returns field
_csrfHiddenField | | protected |
dateField(\string $name, \string $value) : string Returns field
Date field | | protected | getElementName(\string $element) : string Returns form element name
Get element name | | protected | hiddenField(\string $name, \string $value, array $property) : string Returns field
Hidden field | | protected | htmlField(\string $name, \string $value, array $property) : string Returns field
Html field | | protected | mediaSelectField(\string $name, array $options, \string $value, array $property) : string Returns field
Media select field | | protected | selectField(\string $name, array $options, \string $value, array $property) : string Returns field
Select field | | protected | tagsField(\string $name, \string $value) : string Returns field
Tags field | | protected | templateSelectField(\string $name, \string $value, array $property) : string Returns field
Template select field | | protected | textField(\string $name, \string $value, array $property) : string Returns field
Text field | | protected | textareaField(\string $name, \string $value, array $property) : string Returns field
Textarea field | | protected | visibilitySelectField(\string $name, array $options, \string $value, array $property*) : string Returns field
Visibility field* |


Class: \Flextype\AuthMiddleware

Visibility Function
public __invoke(**\Flextype\Request/\Psr\Http\Message\ServerRequestInterface $request, \Flextype\Response/\Psr\Http\Message\ResponseInterface $response, \callable $next*) : void*
__invoke

This class extends \Flextype\Middleware


Class: \Flextype\EmitterTwigExtension

Visibility Function
public __construct(**mixed $flextype*) : void*

Constructor | | public | getGlobals() : mixed
Register Global variables in an extension |

This class extends \Twig\Extension\AbstractExtension

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


Class: \Flextype\MarkdownTwigExtension

Visibility Function
public __construct(**mixed $flextype*) : void*

Constructor | | public | getFilters() : array
Returns a list of filters to add to the existing list. | | public | markdown(**mixed $value*) : void
Markdown process* |

This class extends \Twig\Extension\AbstractExtension

This class implements \Twig\Extension\ExtensionInterface


Class: \Flextype\SnippetsTwigExtension

Visibility Function
public __construct(**mixed $flextype*) : void*

Constructor | | public | getGlobals() : mixed
Register Global variables in an extension |

This class extends \Twig\Extension\AbstractExtension

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


Class: \Flextype\I18nTwigExtension

Visibility Function
public getFilters() : array

Returns a list of filters to add to the existing list. | | public | getFunctions() : array
Returns a list of functions to add to the existing list. | | public | tr(**\string $translate, \string $locale=null, array $values=array()*) : void
Translate string* |

This class extends \Twig\Extension\AbstractExtension

This class implements \Twig\Extension\ExtensionInterface


Class: \Flextype\AssetsTwigExtension

Visibility Function
public getGlobals() : mixed

Register Global variables in an extension |

This class extends \Twig\Extension\AbstractExtension

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


Class: \Flextype\FlashTwigExtension

Visibility Function
public __construct(**mixed $flextype*) : void*

Constructor | | public | getFunctions() : array
Returns a list of functions to add to the existing list. | | public | getMessages(**\string $key=null*) : array
Returns Flash messages; If key is provided then returns messages for that key.* |

This class extends \Twig\Extension\AbstractExtension

This class implements \Twig\Extension\ExtensionInterface


Class: \Flextype\JsonTwigExtension

Visibility Function
public decode(**\string $input, \boolean $decode_assoc=true, \integer $decode_depth=512, \integer $decode_options*) : void*

Decode JSON | | public | encode(**mixed $input, \integer $encode_options, \integer $encode_depth=512) : void
Encode JSON | | public | getFunctions()* : array
Returns a list of functions to add to the existing list.* |

This class extends \Twig\Extension\AbstractExtension

This class implements \Twig\Extension\ExtensionInterface


Class: \Flextype\CsrfTwigExtension

Visibility Function
public __construct(**\Slim\Csrf\Guard $csrf*) : void*

Constructor | | public | csrf() : void
CSRF | | public | getFunctions() : array
Returns a list of functions to add to the existing list. | | public | getGlobals() : mixed
Register Global variables in an extension | | public | getName() : mixed |

This class extends \Twig\Extension\AbstractExtension

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


Class: \Flextype\EntriesTwigExtension

Visibility Function
public __construct(**mixed $flextype*) : void*

Constructor | | public | getGlobals() : mixed
Register Global variables in an extension |

This class extends \Twig\Extension\AbstractExtension

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


Class: \Flextype\FilesystemTwigExtension

Visibility Function
public basename(**mixed $value, string $suffix=''*) : void*
public ext(**mixed $file*) : void*
public getFunctions() : array

Callback for twig. | | public | has(**mixed $path) : bool | | public | list_contents(\string $directory='', \boolean $recursive=false) : void | | public | read(mixed $path*) : void* |

This class extends \Twig\Extension\AbstractExtension

This class implements \Twig\Extension\ExtensionInterface


Class: \Flextype\ShortcodesTwigExtension

Visibility Function
public __construct(**mixed $flextype*) : void*

Constructor | | public | getFilters() : array
Returns a list of filters to add to the existing list. | | public | shortcode(**mixed $value*) : void
Shorcode process* |

This class extends \Twig\Extension\AbstractExtension

This class implements \Twig\Extension\ExtensionInterface


Class: \Flextype\YamlTwigExtension

Visibility Function
public decode(**\string $input, \integer $flags*) : void*

Decode YAML | | public | encode(**mixed $input, \integer $inline=5, \integer $indent=2, \integer $flags=16) : void
Encode YAML | | public | getFunctions()* : array
Returns a list of functions to add to the existing list.* |

This class extends \Twig\Extension\AbstractExtension

This class implements \Twig\Extension\ExtensionInterface


Class: \Flextype\GlobalVarsTwigExtension

Visibility Function
public __construct(**mixed $flextype*) : void*

Constructor | | public | getGlobals() : mixed
Register Global variables in an extension |

This class extends \Twig\Extension\AbstractExtension

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