mirror of
https://github.com/getgrav/grav.git
synced 2025-12-18 14:19:43 +01:00
Added new $grav['filesystem'] service using an instance of the new Filesystem object
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
* Added `Grav\Framework\Form\FormFlash` class to contain AJAX uploaded files in more reliable way
|
* Added `Grav\Framework\Form\FormFlash` class to contain AJAX uploaded files in more reliable way
|
||||||
* Added `Grav\Framework\Form\FormFlashFile` class which implements `UploadedFileInterface` from PSR-7
|
* Added `Grav\Framework\Form\FormFlashFile` class which implements `UploadedFileInterface` from PSR-7
|
||||||
* Added `Grav\Framework\Filesystem\Filesystem` class with methods to manipulate stream URLs
|
* Added `Grav\Framework\Filesystem\Filesystem` class with methods to manipulate stream URLs
|
||||||
|
* Added new `$grav['filesystem']` service using an instance of the new `Filesystem` object
|
||||||
* Grav 1.6: Flex: Added support for custom object index classes (API compatibility break)
|
* Grav 1.6: Flex: Added support for custom object index classes (API compatibility break)
|
||||||
1. [](#improved)
|
1. [](#improved)
|
||||||
* Improved `Grav\Framework\File\Formatter` classes to have abstract parent class and some useful methods
|
* Improved `Grav\Framework\File\Formatter` classes to have abstract parent class and some useful methods
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ class Grav extends Container
|
|||||||
'cache' => 'Grav\Common\Cache',
|
'cache' => 'Grav\Common\Cache',
|
||||||
'events' => 'RocketTheme\Toolbox\Event\EventDispatcher',
|
'events' => 'RocketTheme\Toolbox\Event\EventDispatcher',
|
||||||
'exif' => 'Grav\Common\Helpers\Exif',
|
'exif' => 'Grav\Common\Helpers\Exif',
|
||||||
|
'filesystem' => 'Grav\Framework\Filesystem\Filesystem',
|
||||||
'inflector' => 'Grav\Common\Inflector',
|
'inflector' => 'Grav\Common\Inflector',
|
||||||
'language' => 'Grav\Common\Language\Language',
|
'language' => 'Grav\Common\Language\Language',
|
||||||
'pages' => 'Grav\Common\Page\Pages',
|
'pages' => 'Grav\Common\Page\Pages',
|
||||||
|
|||||||
23
system/src/Grav/Common/Service/FilesystemServiceProvider.php
Normal file
23
system/src/Grav/Common/Service/FilesystemServiceProvider.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Grav.Common.Service
|
||||||
|
*
|
||||||
|
* @copyright Copyright (C) 2015 - 2018 Trilby Media, LLC. All rights reserved.
|
||||||
|
* @license MIT License; see LICENSE file for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Grav\Common\Service;
|
||||||
|
|
||||||
|
use Grav\Framework\Filesystem\Filesystem;
|
||||||
|
use Pimple\Container;
|
||||||
|
use Pimple\ServiceProviderInterface;
|
||||||
|
|
||||||
|
class FilesystemServiceProvider implements ServiceProviderInterface
|
||||||
|
{
|
||||||
|
public function register(Container $container)
|
||||||
|
{
|
||||||
|
$container['filesystem'] = function () {
|
||||||
|
return Filesystem::getInstance();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user