Upgrade to 3.6.0

This commit is contained in:
Bastian Allgeier
2021-11-16 14:53:37 +01:00
parent 7388fa4d24
commit 92b7a330fa
318 changed files with 20017 additions and 6878 deletions

View File

@@ -2,10 +2,61 @@
namespace Kirby\Parsley;
abstract class Schema
/**
* Block schema definition
*
* @since 3.5.0
*
* @package Kirby Parsley
* @author Bastian Allgeier <bastian@getkirby.com>,
* @link https://getkirby.com
* @copyright Bastian Allgeier GmbH
* @license https://getkirby.com/license
*/
class Schema
{
abstract public function fallback(string $html);
abstract public function marks(): array;
abstract public function nodes(): array;
abstract public function skip(): array;
/**
* Returns the fallback block when no
* other block type can be detected
*
* @param \Kirby\Parsley\Element|string $element
* @return array|null
*/
public function fallback($element): ?array
{
return null;
}
/**
* Returns a list of allowed inline marks
* and their parsing rules
*
* @return array
*/
public function marks(): array
{
return [];
}
/**
* Returns a list of allowed nodes and
* their parsing rules
*
* @return array
*/
public function nodes(): array
{
return [];
}
/**
* Returns a list of all elements that should be
* skipped and not be parsed at all
*
* @return array
*/
public function skip(): array
{
return [];
}
}