mirror of
https://github.com/flextype/flextype.git
synced 2025-08-08 22:26:46 +02:00
feat(core): Improve Flextype Application class #463
This commit is contained in:
@@ -8,18 +8,6 @@ use Doctrine\Common\Cache\ArrayCache;
|
||||
|
||||
class ArrayCacheAdapter implements CacheAdapterInterface
|
||||
{
|
||||
/**
|
||||
* Flextype Application
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function getDriver() : object
|
||||
{
|
||||
return new ArrayCache();
|
||||
|
@@ -19,11 +19,6 @@ use function time;
|
||||
|
||||
class Cache
|
||||
{
|
||||
/**
|
||||
* Flextype Application
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Unique cache key
|
||||
*
|
||||
@@ -59,7 +54,7 @@ class Cache
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
|
||||
|
||||
// Create Cache Directory
|
||||
! Filesystem::has(PATH['cache']) and Filesystem::createDir(PATH['cache']);
|
||||
|
@@ -9,18 +9,6 @@ use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
class FilesystemCacheAdapter implements CacheAdapterInterface
|
||||
{
|
||||
/**
|
||||
* Flextype Application
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function getDriver() : object
|
||||
{
|
||||
$cache_directory = PATH['cache'] . '/doctrine/';
|
||||
|
@@ -9,18 +9,6 @@ use Memecached;
|
||||
|
||||
class MemcachedCacheAdapter implements CacheAdapterInterface
|
||||
{
|
||||
/**
|
||||
* Flextype Application
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function getDriver() : object
|
||||
{
|
||||
$memcached = new Memecached();
|
||||
|
@@ -8,18 +8,6 @@ use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
class PhpArrayFileCacheAdapter implements CacheAdapterInterface
|
||||
{
|
||||
/**
|
||||
* Flextype Application
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function getDriver() : object
|
||||
{
|
||||
$cache_directory = PATH['cache'] . '/doctrine/';
|
||||
|
@@ -9,18 +9,6 @@ use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
class PhpFileCacheAdapter implements CacheAdapterInterface
|
||||
{
|
||||
/**
|
||||
* Flextype Application
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function getDriver() : object
|
||||
{
|
||||
$cache_directory = PATH['cache'] . '/doctrine/';
|
||||
|
@@ -10,18 +10,6 @@ use RedisException;
|
||||
|
||||
class RedisCacheAdapter implements CacheAdapterInterface
|
||||
{
|
||||
/**
|
||||
* Flextype Application
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function getDriver() : object
|
||||
{
|
||||
$redis = new Redis();
|
||||
|
@@ -10,18 +10,6 @@ use SQLite3;
|
||||
|
||||
class SQLite3CacheAdapter implements CacheAdapterInterface
|
||||
{
|
||||
/**
|
||||
* Flextype Application
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function getDriver() : object
|
||||
{
|
||||
$cache_directory = PATH['cache'] . '/doctrine/';
|
||||
|
@@ -8,18 +8,6 @@ use Doctrine\Common\Cache\WinCacheCache;
|
||||
|
||||
class WinCacheCacheAdapter implements CacheAdapterInterface
|
||||
{
|
||||
/**
|
||||
* Flextype Application
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function getDriver() : object
|
||||
{
|
||||
return new WinCacheCache();
|
||||
|
@@ -8,18 +8,6 @@ use Doctrine\Common\Cache\ZendDataCache;
|
||||
|
||||
class ZendDataCacheCacheAdapter implements CacheAdapterInterface
|
||||
{
|
||||
/**
|
||||
* Flextype Application
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function getDriver() : object
|
||||
{
|
||||
return new ZendDataCache();
|
||||
|
@@ -70,21 +70,6 @@ class Entries
|
||||
*/
|
||||
public $entries_id = null;
|
||||
|
||||
/**
|
||||
* Flextype Application
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch entry(entries)
|
||||
*
|
||||
|
@@ -43,21 +43,6 @@ use const UPLOAD_ERR_OK;
|
||||
|
||||
class MediaFiles
|
||||
{
|
||||
/**
|
||||
* Flextype Application
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload media file
|
||||
*
|
||||
|
@@ -14,21 +14,6 @@ use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
class MediaFilesMeta
|
||||
{
|
||||
/**
|
||||
* Flextype Application
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Update file meta information
|
||||
*
|
||||
|
@@ -17,21 +17,6 @@ use function str_replace;
|
||||
|
||||
class MediaFolders
|
||||
{
|
||||
/**
|
||||
* Flextype Application
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch folders(s)
|
||||
*
|
||||
|
@@ -11,21 +11,6 @@ namespace Flextype\App\Foundation\Media;
|
||||
|
||||
class MediaFoldersMeta
|
||||
{
|
||||
/**
|
||||
* Flextype Application
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get files directory meta location
|
||||
*
|
||||
|
@@ -24,11 +24,6 @@ use function trim;
|
||||
|
||||
class Plugins
|
||||
{
|
||||
/**
|
||||
* Flextype Application
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Locales array
|
||||
*
|
||||
@@ -43,8 +38,7 @@ class Plugins
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
$this->locales = flextype('yaml')->decode(Filesystem::read(ROOT_DIR . '/src/flextype/locales.yaml'));
|
||||
$this->locales = flextype('yaml')->decode(Filesystem::read(ROOT_DIR . '/src/flextype/locales.yaml'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -13,11 +13,6 @@ use function md5;
|
||||
|
||||
class Markdown
|
||||
{
|
||||
/**
|
||||
* Flextype Application
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Markdown
|
||||
*/
|
||||
@@ -30,7 +25,6 @@ class Markdown
|
||||
*/
|
||||
public function __construct($markdown)
|
||||
{
|
||||
|
||||
$this->markdown = $markdown;
|
||||
}
|
||||
|
||||
|
@@ -22,21 +22,6 @@ use const PHP_EOL;
|
||||
|
||||
class Frontmatter
|
||||
{
|
||||
/**
|
||||
* Flextype Application
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the FRONTMATTER representation of a value
|
||||
*
|
||||
|
@@ -27,21 +27,6 @@ class Json
|
||||
public const PRETTY = 0b0010;
|
||||
public const ESCAPE_UNICODE = 0b0100;
|
||||
|
||||
/**
|
||||
* Flextype Application
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the JSON representation of a value
|
||||
*
|
||||
|
@@ -33,21 +33,6 @@ class Yaml
|
||||
public const PARSE_CUSTOM_TAGS = 512;
|
||||
public const DUMP_EMPTY_ARRAY_AS_SEQUENCE = 1024;
|
||||
|
||||
/**
|
||||
* Flextype Application
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Native
|
||||
*
|
||||
|
Reference in New Issue
Block a user