Add blueprints and fake content
This commit is contained in:
parent
1ff19bf38f
commit
8235816462
592 changed files with 22385 additions and 31535 deletions
|
@ -3,7 +3,7 @@
|
|||
namespace Kirby\Data;
|
||||
|
||||
use Kirby\Exception\Exception;
|
||||
use Kirby\Toolkit\F;
|
||||
use Kirby\Filesystem\F;
|
||||
|
||||
/**
|
||||
* The `Data` class provides readers and
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace Kirby\Data;
|
||||
|
||||
use Kirby\Exception\Exception;
|
||||
use Kirby\Toolkit\F;
|
||||
use Kirby\Filesystem\F;
|
||||
|
||||
/**
|
||||
* Base handler abstract,
|
||||
|
|
|
@ -34,7 +34,7 @@ class Json extends Handler
|
|||
*/
|
||||
public static function decode($string): array
|
||||
{
|
||||
if ($string === null) {
|
||||
if ($string === null || $string === '') {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace Kirby\Data;
|
|||
|
||||
use Kirby\Exception\BadMethodCallException;
|
||||
use Kirby\Exception\Exception;
|
||||
use Kirby\Toolkit\F;
|
||||
use Kirby\Filesystem\F;
|
||||
|
||||
/**
|
||||
* Reader and write of PHP files with data in a returned array
|
||||
|
@ -49,10 +49,10 @@ class PHP extends Handler
|
|||
/**
|
||||
* PHP strings shouldn't be decoded manually
|
||||
*
|
||||
* @param mixed $array
|
||||
* @param mixed $string
|
||||
* @return array
|
||||
*/
|
||||
public static function decode($array): array
|
||||
public static function decode($string): array
|
||||
{
|
||||
throw new BadMethodCallException('The PHP::decode() method is not implemented');
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ class Txt extends Handler
|
|||
*/
|
||||
public static function decode($string): array
|
||||
{
|
||||
if ($string === null) {
|
||||
if ($string === null || $string === '') {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ class Xml extends Handler
|
|||
*/
|
||||
public static function decode($string): array
|
||||
{
|
||||
if ($string === null) {
|
||||
if ($string === null || $string === '') {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ class Yaml extends Handler
|
|||
*/
|
||||
public static function decode($string): array
|
||||
{
|
||||
if ($string === null) {
|
||||
if ($string === null || $string === '') {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue