Download the PHP package keltiecochrane/themosis-illuminate without Composer
On this page you can find all versions of the php package keltiecochrane/themosis-illuminate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download keltiecochrane/themosis-illuminate
More information about keltiecochrane/themosis-illuminate
Files in keltiecochrane/themosis-illuminate
Package themosis-illuminate
Short Description A themosis plugin that implements the illuminate/cache packing with a WP_Object_Cache driver
License GPL-3.0-or-later
Informations about the package themosis-illuminate
Themosis Illuminate
A package for the Themosis framework that implements various Illuminate packages, some replace the Themosis packages (such as config and validator.) Also loads in most of Laravel's helper functions (see below.)
Install
Install through composer: -
composer require keltiecochrane/themosis-illuminate
See below for how to activate the individual packages.
Packages
The following packages have been implemented: -
- illuminate/config
- illuminate/filesystem
- illuminate/mail
- illuminate/translation
- illuminate/validation
Config
To use the config (which we recommend as it implements ArrayAccess which is required by most of the package implementations here) you'll need to replace Themosis' Service Provider and Facade. It's API compatible but implements additional features (it seems likely Themosis will eventually move to the Illuminate package in the future too.) Also allows config files to be extended, which is useful in parent/child scenarios.
Activation
Add the service provider to your theme/resources/config/providers.config.php
: -
KeltieCochrane\Illuminate\Config\ConfigServiceProvider::class
,
Replace the facade in your theme/resources/config/theme.config.php
: -
'Config' => KeltieCochrane\Illuminate\Config\ConfigFacade::class,
Note: You don't necassarily have to add the facade at this moment, as it effectively does the same thing that the Themosis facade, but it's worth adding in case we need to make any changes in line with the Illuminate facade in the future.
Examples
Use at you normally would, e.g.: -
Filesystem
The filesystem is required by Translation and Validation, but is a useful feature to have anyway.
Activation
Copy the filesystem.config.php
file to your theme/resources/config
folder, some defaults have been setup for you.
Add the service provider to your theme/resources/config/providers.config.php
: -
KeltieCochrane\Illuminate\Filesystem\FilesystemServiceProvider::class,
Optionally add the facades in your theme/resources/config/theme.config.php
: -
Examples
See the Laravel docs for more info.
Mail is optional and not required by anything else, but is a nicer way of sending emails than through WordPress. A wp_mail Transport is provided and is used by default, so if your WordPress instance can send mail so can the Mail service.
Activation
Copy the mail.config.php
file to your theme/resources/config
folder, configure as appropriate.
If you're going to be using an external service such as MailGun or SparkPost you'll need to add the following to your theme/resources/services.config.php
(you may need to create this file if you haven't already got one): -
Add the service provider to your theme/resources/config/providers.config.php
: -
KeltieCochrane\Illuminate\Mail\MailServiceProvider::class,
Optionally add the facades in your theme/resources/config/theme.config.php
: -
'Mail' => KeltieCochrane\Illuminate\Mail\MailFacade::class,
Examples
See the Laravel docs for more info.
Translation
Translation requires Filesystem to be loaded in and is required by Validation.
Activation
Add the service provider to your theme/resources/config/providers.config.php
: -
KeltieCochrane\Illuminate\Translation\TranslationServiceProvider::class,
Optionally add the facades in your theme/resources/config/theme.config.php
: -
'Lang' => KeltieCochrane\Illuminate\Translation\LangFacade::class,
Files
You can add translations from the Laravel, you'll need to add them to your theme/resources/lang
folder, the only one worth copying for now is the validation file (if indeed you're using validation.) You can of course create your own files to add translation throughout your site, but we'd still recommend using a translation plugin.
Examples
See the Laravel docs for more info.
Validation
Validation requires Translation and Filesystem. It replaces the built in Themosis Validator (if you use the facade) which is more of a sanatiser than a validator. The Validator has been extended with a valid_nonce
rule that can be used to verify a nonce.
Activation
Add the service provider to your theme/resources/config/providers.config.php
: -
KeltieCochrane\Illuminate\Validation\ValidationServiceProvider::class,
Add the facades in your theme/resources/config/theme.config.php
: -
'Validator' => KeltieCochrane\Illuminate\Validation\ValidatorFacade::class,
Examples
See the Laravel docs for more info.
Helpers
The following (additional) helpers are available: -
- array_add
- array_collapse
- array_divide
- array_dot
- array_first
- array_flatten
- array_forget
- array_has
- array_last
- array_only
- array_pluck
- array_prepend
- array_pull
- array_sort
- array_sort_recursive
- array_where
- array_wrap
- camel_case
- class_basename
- class_uses_recursive
- collect
- config
- data_fill
- data_get
- data_set
- ends_with
- env
- head
- kebab_case
- last
- object_get
- preg_replace_array
- retry
- request
- snake_case
- str_finish
- str_limit
- str_plural
- str_random
- str_replace_array
- str_replace_first
- str_replace_last
- str_singular
- str_slug
- studly_case
- tap
- title_case
- trait_uses_recursive
- trans
- trans_choice
- validator
- windows_os
See the Laravel docs for more info.
Todo
- Tests - a lot of this is trusting in the Laravel packages and Themosis behaving themselves
- Add more packages
- Possibly merge Cache and Logger into this so there's one package to rule them all
Support
This package is provided as is, though we'll endeavour to help where we can.
Contributing
Any contributions would be encouraged and much appreciated, you can contribute by: -
- Reporting bugs
- Suggesting features
- Sending pull requests
All versions of themosis-illuminate with dependencies
composer/installers Version ~1.2
themosis/framework Version ^1.3
illuminate/support Version ^5.4
illuminate/filesystem Version ^5.4
illuminate/validation Version ^5.4
illuminate/translation Version ^5.4
illuminate/mail Version ^5.4
illuminate/config Version ^5.4
league/flysystem Version ~1.0
illuminate/database Version ^5.4