* Support php 5.3 for sql parser lib.

This commit is contained in:
qixinzhi
2023-02-10 11:24:24 +08:00
parent 7c2e937eda
commit 7c122a0b29
648 changed files with 13815 additions and 279048 deletions
+13 -12
View File
@@ -1,4 +1,5 @@
<?php
/**
* Defines a component that is later extended to parse specialized components or
* keywords.
@@ -8,15 +9,15 @@
* count on the *Component classes to do their job.
*/
declare(strict_types=1);
namespace PhpMyAdmin\SqlParser;
use Exception;
/**
* A component (of a statement) is a part of a statement that is common to
* multiple query types.
*
* @category Components
*
* @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
abstract class Component
{
@@ -28,18 +29,18 @@ abstract class Component
* @param TokensList $list the list of tokens that are being parsed
* @param array $options parameters for parsing
*
* @return mixed
* @throws \Exception not implemented yet
*
* @throws Exception not implemented yet.
* @return mixed
*/
public static function parse(
Parser $parser,
TokensList $list,
array $options = []
array $options = array()
) {
// This method should be abstract, but it can't be both static and
// abstract.
throw new Exception(Translator::gettext('Not implemented yet.'));
throw new \Exception(Translator::gettext('Not implemented yet.'));
}
/**
@@ -51,15 +52,15 @@ abstract class Component
* @param mixed $component the component to be built
* @param array $options parameters for building
*
* @return mixed
* @throws \Exception not implemented yet
*
* @throws Exception not implemented yet.
* @return string
*/
public static function build($component, array $options = [])
public static function build($component, array $options = array())
{
// This method should be abstract, but it can't be both static and
// abstract.
throw new Exception(Translator::gettext('Not implemented yet.'));
throw new \Exception(Translator::gettext('Not implemented yet.'));
}
/**