Initial commit with Symfony 2.1+Vendors
Signed-off-by: Gergely POLONKAI (W00d5t0ck) <polesz@w00d5t0ck.info>
This commit is contained in:
79
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/ConnectionEventArgs.php
vendored
Normal file
79
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/ConnectionEventArgs.php
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\Common\EventArgs,
|
||||
Doctrine\DBAL\Connection;
|
||||
|
||||
/**
|
||||
* Event Arguments used when a Driver connection is established inside Doctrine\DBAL\Connection.
|
||||
*
|
||||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
||||
* @link www.doctrine-project.com
|
||||
* @since 1.0
|
||||
* @version $Revision$
|
||||
* @author Benjamin Eberlei <kontakt@beberlei.de>
|
||||
*/
|
||||
class ConnectionEventArgs extends EventArgs
|
||||
{
|
||||
/**
|
||||
* @var Connection
|
||||
*/
|
||||
private $_connection = null;
|
||||
|
||||
public function __construct(Connection $connection)
|
||||
{
|
||||
$this->_connection = $connection;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Doctrine\DBAL\Connection
|
||||
*/
|
||||
public function getConnection()
|
||||
{
|
||||
return $this->_connection;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Doctrine\DBAL\Driver
|
||||
*/
|
||||
public function getDriver()
|
||||
{
|
||||
return $this->_connection->getDriver();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Doctrine\DBAL\Platforms\AbstractPlatform
|
||||
*/
|
||||
public function getDatabasePlatform()
|
||||
{
|
||||
return $this->_connection->getDatabasePlatform();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Doctrine\DBAL\Schema\AbstractSchemaManager
|
||||
*/
|
||||
public function getSchemaManager()
|
||||
{
|
||||
return $this->_connection->getSchemaManager();
|
||||
}
|
||||
}
|
74
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php
vendored
Normal file
74
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Event\Listeners;
|
||||
|
||||
use Doctrine\DBAL\Event\ConnectionEventArgs;
|
||||
use Doctrine\DBAL\Events;
|
||||
use Doctrine\Common\EventSubscriber;
|
||||
|
||||
/**
|
||||
* MySQL Session Init Event Subscriber which allows to set the Client Encoding of the Connection
|
||||
*
|
||||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
||||
* @link www.doctrine-project.com
|
||||
* @since 1.0
|
||||
* @version $Revision$
|
||||
* @author Benjamin Eberlei <kontakt@beberlei.de>
|
||||
* @deprecated Use "charset" option to PDO MySQL Connection instead.
|
||||
*/
|
||||
class MysqlSessionInit implements EventSubscriber
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $_charset;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $_collation;
|
||||
|
||||
/**
|
||||
* Configure Charset and Collation options of MySQL Client for each Connection
|
||||
*
|
||||
* @param string $charset
|
||||
* @param string $collation
|
||||
*/
|
||||
public function __construct($charset = 'utf8', $collation = false)
|
||||
{
|
||||
$this->_charset = $charset;
|
||||
$this->_collation = $collation;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ConnectionEventArgs $args
|
||||
* @return void
|
||||
*/
|
||||
public function postConnect(ConnectionEventArgs $args)
|
||||
{
|
||||
$collation = ($this->_collation) ? " COLLATE ".$this->_collation : "";
|
||||
$args->getConnection()->executeUpdate("SET NAMES ".$this->_charset . $collation);
|
||||
}
|
||||
|
||||
public function getSubscribedEvents()
|
||||
{
|
||||
return array(Events::postConnect);
|
||||
}
|
||||
}
|
79
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php
vendored
Normal file
79
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Event\Listeners;
|
||||
|
||||
use Doctrine\DBAL\Event\ConnectionEventArgs;
|
||||
use Doctrine\DBAL\Events;
|
||||
use Doctrine\Common\EventSubscriber;
|
||||
|
||||
/**
|
||||
* Should be used when Oracle Server default enviroment does not match the Doctrine requirements.
|
||||
*
|
||||
* The following enviroment variables are required for the Doctrine default date format:
|
||||
*
|
||||
* NLS_TIME_FORMAT="HH24:MI:SS"
|
||||
* NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
|
||||
* NLS_TIMESTAMP_FORMAT="YYYY-MM-DD HH24:MI:SS"
|
||||
* NLS_TIMESTAMP_TZ_FORMAT="YYYY-MM-DD HH24:MI:SS TZH:TZM"
|
||||
*
|
||||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
||||
* @link www.doctrine-project.com
|
||||
* @since 2.0
|
||||
* @author Benjamin Eberlei <kontakt@beberlei.de>
|
||||
*/
|
||||
class OracleSessionInit implements EventSubscriber
|
||||
{
|
||||
protected $_defaultSessionVars = array(
|
||||
'NLS_TIME_FORMAT' => "HH24:MI:SS",
|
||||
'NLS_DATE_FORMAT' => "YYYY-MM-DD HH24:MI:SS",
|
||||
'NLS_TIMESTAMP_FORMAT' => "YYYY-MM-DD HH24:MI:SS",
|
||||
'NLS_TIMESTAMP_TZ_FORMAT' => "YYYY-MM-DD HH24:MI:SS TZH:TZM",
|
||||
);
|
||||
|
||||
/**
|
||||
* @param array $oracleSessionVars
|
||||
*/
|
||||
public function __construct(array $oracleSessionVars = array())
|
||||
{
|
||||
$this->_defaultSessionVars = array_merge($this->_defaultSessionVars, $oracleSessionVars);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ConnectionEventArgs $args
|
||||
* @return void
|
||||
*/
|
||||
public function postConnect(ConnectionEventArgs $args)
|
||||
{
|
||||
if (count($this->_defaultSessionVars)) {
|
||||
array_change_key_case($this->_defaultSessionVars, \CASE_UPPER);
|
||||
$vars = array();
|
||||
foreach ($this->_defaultSessionVars AS $option => $value) {
|
||||
$vars[] = $option." = '".$value."'";
|
||||
}
|
||||
$sql = "ALTER SESSION SET ".implode(" ", $vars);
|
||||
$args->getConnection()->executeUpdate($sql);
|
||||
}
|
||||
}
|
||||
|
||||
public function getSubscribedEvents()
|
||||
{
|
||||
return array(Events::postConnect);
|
||||
}
|
||||
}
|
63
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/SQLSessionInit.php
vendored
Normal file
63
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/SQLSessionInit.php
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Event\Listeners;
|
||||
|
||||
use Doctrine\DBAL\Event\ConnectionEventArgs;
|
||||
use Doctrine\DBAL\Events;
|
||||
use Doctrine\Common\EventSubscriber;
|
||||
|
||||
/**
|
||||
* Session init listener for executing a single SQL statement right after a connection is opened.
|
||||
*
|
||||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
||||
* @link www.doctrine-project.com
|
||||
* @since 2.2
|
||||
* @author Benjamin Eberlei <kontakt@beberlei.de>
|
||||
*/
|
||||
class SQLSessionInit implements EventSubscriber
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $sql;
|
||||
|
||||
/**
|
||||
* @param string $sql
|
||||
*/
|
||||
public function __construct($sql)
|
||||
{
|
||||
$this->sql = $sql;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ConnectionEventArgs $args
|
||||
* @return void
|
||||
*/
|
||||
public function postConnect(ConnectionEventArgs $args)
|
||||
{
|
||||
$conn = $args->getConnection();
|
||||
$conn->exec($this->sql);
|
||||
}
|
||||
|
||||
public function getSubscribedEvents()
|
||||
{
|
||||
return array(Events::postConnect);
|
||||
}
|
||||
}
|
114
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php
vendored
Normal file
114
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php
vendored
Normal file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform,
|
||||
Doctrine\DBAL\Schema\Column,
|
||||
Doctrine\DBAL\Schema\TableDiff;
|
||||
|
||||
/**
|
||||
* Event Arguments used when SQL queries for adding table columns are generated inside Doctrine\DBAL\Platform\*Platform.
|
||||
*
|
||||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
||||
* @link www.doctrine-project.com
|
||||
* @since 2.2
|
||||
* @author Jan Sorgalla <jsorgalla@googlemail.com>
|
||||
*/
|
||||
class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs
|
||||
{
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Schema\Column
|
||||
*/
|
||||
private $_column = null;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Schema\TableDiff
|
||||
*/
|
||||
private $_tableDiff = null;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Platforms\AbstractPlatform
|
||||
*/
|
||||
private $_platform = null;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $_sql = array();
|
||||
|
||||
/**
|
||||
* @param \Doctrine\DBAL\Schema\Column $column
|
||||
* @param \Doctrine\DBAL\Schema\TableDiff $tableDiff
|
||||
* @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform
|
||||
*/
|
||||
public function __construct(Column $column, TableDiff $tableDiff, AbstractPlatform $platform)
|
||||
{
|
||||
$this->_column = $column;
|
||||
$this->_tableDiff = $tableDiff;
|
||||
$this->_platform = $platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Schema\Column
|
||||
*/
|
||||
public function getColumn()
|
||||
{
|
||||
return $this->_column;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Schema\TableDiff
|
||||
*/
|
||||
public function getTableDiff()
|
||||
{
|
||||
return $this->_tableDiff;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Platforms\AbstractPlatform
|
||||
*/
|
||||
public function getPlatform()
|
||||
{
|
||||
return $this->_platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|array $sql
|
||||
* @return \Doctrine\DBAL\Event\SchemaAlterTableAddColumnEventArgs
|
||||
*/
|
||||
public function addSql($sql)
|
||||
{
|
||||
if (is_array($sql)) {
|
||||
$this->_sql = array_merge($this->_sql, $sql);
|
||||
} else {
|
||||
$this->_sql[] = $sql;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getSql()
|
||||
{
|
||||
return $this->_sql;
|
||||
}
|
||||
}
|
114
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php
vendored
Normal file
114
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php
vendored
Normal file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform,
|
||||
Doctrine\DBAL\Schema\ColumnDiff,
|
||||
Doctrine\DBAL\Schema\TableDiff;
|
||||
|
||||
/**
|
||||
* Event Arguments used when SQL queries for changing table columns are generated inside Doctrine\DBAL\Platform\*Platform.
|
||||
*
|
||||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
||||
* @link www.doctrine-project.com
|
||||
* @since 2.2
|
||||
* @author Jan Sorgalla <jsorgalla@googlemail.com>
|
||||
*/
|
||||
class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs
|
||||
{
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Schema\ColumnDiff
|
||||
*/
|
||||
private $_columnDiff = null;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Schema\TableDiff
|
||||
*/
|
||||
private $_tableDiff = null;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Platforms\AbstractPlatform
|
||||
*/
|
||||
private $_platform = null;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $_sql = array();
|
||||
|
||||
/**
|
||||
* @param \Doctrine\DBAL\Schema\ColumnDiff $columnDiff
|
||||
* @param \Doctrine\DBAL\Schema\TableDiff $tableDiff
|
||||
* @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform
|
||||
*/
|
||||
public function __construct(ColumnDiff $columnDiff, TableDiff $tableDiff, AbstractPlatform $platform)
|
||||
{
|
||||
$this->_columnDiff = $columnDiff;
|
||||
$this->_tableDiff = $tableDiff;
|
||||
$this->_platform = $platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Schema\ColumnDiff
|
||||
*/
|
||||
public function getColumnDiff()
|
||||
{
|
||||
return $this->_columnDiff;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Schema\TableDiff
|
||||
*/
|
||||
public function getTableDiff()
|
||||
{
|
||||
return $this->_tableDiff;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Platforms\AbstractPlatform
|
||||
*/
|
||||
public function getPlatform()
|
||||
{
|
||||
return $this->_platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|array $sql
|
||||
* @return \Doctrine\DBAL\Event\SchemaAlterTableChangeColumnEventArgs
|
||||
*/
|
||||
public function addSql($sql)
|
||||
{
|
||||
if (is_array($sql)) {
|
||||
$this->_sql = array_merge($this->_sql, $sql);
|
||||
} else {
|
||||
$this->_sql[] = $sql;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getSql()
|
||||
{
|
||||
return $this->_sql;
|
||||
}
|
||||
}
|
99
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php
vendored
Normal file
99
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform,
|
||||
Doctrine\DBAL\Schema\Column,
|
||||
Doctrine\DBAL\Schema\TableDiff;
|
||||
|
||||
/**
|
||||
* Event Arguments used when SQL queries for creating tables are generated inside Doctrine\DBAL\Platform\*Platform.
|
||||
*
|
||||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
||||
* @link www.doctrine-project.com
|
||||
* @since 2.2
|
||||
* @author Jan Sorgalla <jsorgalla@googlemail.com>
|
||||
*/
|
||||
class SchemaAlterTableEventArgs extends SchemaEventArgs
|
||||
{
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Schema\TableDiff
|
||||
*/
|
||||
private $_tableDiff = null;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Platforms\AbstractPlatform
|
||||
*/
|
||||
private $_platform = null;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $_sql = array();
|
||||
|
||||
/**
|
||||
* @param \Doctrine\DBAL\Schema\TableDiff $tableDiff
|
||||
* @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform
|
||||
*/
|
||||
public function __construct(TableDiff $tableDiff, AbstractPlatform $platform)
|
||||
{
|
||||
$this->_tableDiff = $tableDiff;
|
||||
$this->_platform = $platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Schema\TableDiff
|
||||
*/
|
||||
public function getTableDiff()
|
||||
{
|
||||
return $this->_tableDiff;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Platforms\AbstractPlatform
|
||||
*/
|
||||
public function getPlatform()
|
||||
{
|
||||
return $this->_platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|array $sql
|
||||
* @return \Doctrine\DBAL\Event\SchemaAlterTableEventArgs
|
||||
*/
|
||||
public function addSql($sql)
|
||||
{
|
||||
if (is_array($sql)) {
|
||||
$this->_sql = array_merge($this->_sql, $sql);
|
||||
} else {
|
||||
$this->_sql[] = $sql;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getSql()
|
||||
{
|
||||
return $this->_sql;
|
||||
}
|
||||
}
|
114
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php
vendored
Normal file
114
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php
vendored
Normal file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform,
|
||||
Doctrine\DBAL\Schema\Column,
|
||||
Doctrine\DBAL\Schema\TableDiff;
|
||||
|
||||
/**
|
||||
* Event Arguments used when SQL queries for removing table columns are generated inside Doctrine\DBAL\Platform\*Platform.
|
||||
*
|
||||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
||||
* @link www.doctrine-project.com
|
||||
* @since 2.2
|
||||
* @author Jan Sorgalla <jsorgalla@googlemail.com>
|
||||
*/
|
||||
class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs
|
||||
{
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Schema\Column
|
||||
*/
|
||||
private $_column = null;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Schema\TableDiff
|
||||
*/
|
||||
private $_tableDiff = null;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Platforms\AbstractPlatform
|
||||
*/
|
||||
private $_platform = null;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $_sql = array();
|
||||
|
||||
/**
|
||||
* @param \Doctrine\DBAL\Schema\Column $column
|
||||
* @param \Doctrine\DBAL\Schema\TableDiff $tableDiff
|
||||
* @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform
|
||||
*/
|
||||
public function __construct(Column $column, TableDiff $tableDiff, AbstractPlatform $platform)
|
||||
{
|
||||
$this->_column = $column;
|
||||
$this->_tableDiff = $tableDiff;
|
||||
$this->_platform = $platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Schema\Column
|
||||
*/
|
||||
public function getColumn()
|
||||
{
|
||||
return $this->_column;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Schema\TableDiff
|
||||
*/
|
||||
public function getTableDiff()
|
||||
{
|
||||
return $this->_tableDiff;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Platforms\AbstractPlatform
|
||||
*/
|
||||
public function getPlatform()
|
||||
{
|
||||
return $this->_platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|array $sql
|
||||
* @return \Doctrine\DBAL\Event\SchemaAlterTableRemoveColumnEventArgs
|
||||
*/
|
||||
public function addSql($sql)
|
||||
{
|
||||
if (is_array($sql)) {
|
||||
$this->_sql = array_merge($this->_sql, $sql);
|
||||
} else {
|
||||
$this->_sql[] = $sql;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getSql()
|
||||
{
|
||||
return $this->_sql;
|
||||
}
|
||||
}
|
129
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php
vendored
Normal file
129
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform,
|
||||
Doctrine\DBAL\Schema\Column,
|
||||
Doctrine\DBAL\Schema\TableDiff;
|
||||
|
||||
/**
|
||||
* Event Arguments used when SQL queries for renaming table columns are generated inside Doctrine\DBAL\Platform\*Platform.
|
||||
*
|
||||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
||||
* @link www.doctrine-project.com
|
||||
* @since 2.2
|
||||
* @author Jan Sorgalla <jsorgalla@googlemail.com>
|
||||
*/
|
||||
class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $_oldColumnName = null;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Schema\Column
|
||||
*/
|
||||
private $_column = null;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Schema\TableDiff
|
||||
*/
|
||||
private $_tableDiff = null;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Platforms\AbstractPlatform
|
||||
*/
|
||||
private $_platform = null;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $_sql = array();
|
||||
|
||||
/**
|
||||
* @param string $oldColumnName
|
||||
* @param \Doctrine\DBAL\Schema\Column $column
|
||||
* @param \Doctrine\DBAL\Schema\TableDiff $tableDiff
|
||||
* @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform
|
||||
*/
|
||||
public function __construct($oldColumnName, Column $column, TableDiff $tableDiff, AbstractPlatform $platform)
|
||||
{
|
||||
$this->_oldColumnName = $oldColumnName;
|
||||
$this->_column = $column;
|
||||
$this->_tableDiff = $tableDiff;
|
||||
$this->_platform = $platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getOldColumnName()
|
||||
{
|
||||
return $this->_oldColumnName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Schema\Column
|
||||
*/
|
||||
public function getColumn()
|
||||
{
|
||||
return $this->_column;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Schema\TableDiff
|
||||
*/
|
||||
public function getTableDiff()
|
||||
{
|
||||
return $this->_tableDiff;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Platforms\AbstractPlatform
|
||||
*/
|
||||
public function getPlatform()
|
||||
{
|
||||
return $this->_platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|array $sql
|
||||
* @return \Doctrine\DBAL\Event\SchemaAlterTableRenameColumnEventArgs
|
||||
*/
|
||||
public function addSql($sql)
|
||||
{
|
||||
if (is_array($sql)) {
|
||||
$this->_sql = array_merge($this->_sql, $sql);
|
||||
} else {
|
||||
$this->_sql[] = $sql;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getSql()
|
||||
{
|
||||
return $this->_sql;
|
||||
}
|
||||
}
|
137
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaColumnDefinitionEventArgs.php
vendored
Normal file
137
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaColumnDefinitionEventArgs.php
vendored
Normal file
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\DBAL\Connection,
|
||||
Doctrine\DBAL\Schema\Column;
|
||||
|
||||
/**
|
||||
* Event Arguments used when the portable column definition is generated inside Doctrine\DBAL\Schema\AbstractSchemaManager.
|
||||
*
|
||||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
||||
* @link www.doctrine-project.com
|
||||
* @since 2.2
|
||||
* @author Jan Sorgalla <jsorgalla@googlemail.com>
|
||||
*/
|
||||
class SchemaColumnDefinitionEventArgs extends SchemaEventArgs
|
||||
{
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Schema\Column
|
||||
*/
|
||||
private $_column = null;
|
||||
|
||||
/**
|
||||
* Raw column data as fetched from the database
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $_tableColumn = null;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $_table = null;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $_database = null;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Connection
|
||||
*/
|
||||
private $_connection = null;
|
||||
|
||||
/**
|
||||
* @param array $tableColumn
|
||||
* @param string $table
|
||||
* @param string $database
|
||||
* @param \Doctrine\DBAL\Connection $conn
|
||||
*/
|
||||
public function __construct(array $tableColumn, $table, $database, Connection $connection)
|
||||
{
|
||||
$this->_tableColumn = $tableColumn;
|
||||
$this->_table = $table;
|
||||
$this->_database = $database;
|
||||
$this->_connection = $connection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows to clear the column which means the column will be excluded from
|
||||
* tables column list.
|
||||
*
|
||||
* @param null|\Doctrine\DBAL\Schema\Column $column
|
||||
* @return SchemaColumnDefinitionEventArgs
|
||||
*/
|
||||
public function setColumn(Column $column = null)
|
||||
{
|
||||
$this->_column = $column;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Schema\Column
|
||||
*/
|
||||
public function getColumn()
|
||||
{
|
||||
return $this->_column;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getTableColumn()
|
||||
{
|
||||
return $this->_tableColumn;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getTable()
|
||||
{
|
||||
return $this->_table;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDatabase()
|
||||
{
|
||||
return $this->_database;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Connection
|
||||
*/
|
||||
public function getConnection()
|
||||
{
|
||||
return $this->_connection;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Platforms\AbstractPlatform
|
||||
*/
|
||||
public function getDatabasePlatform()
|
||||
{
|
||||
return $this->_connection->getDatabasePlatform();
|
||||
}
|
||||
}
|
114
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php
vendored
Normal file
114
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php
vendored
Normal file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform,
|
||||
Doctrine\DBAL\Schema\Column,
|
||||
Doctrine\DBAL\Schema\Table;
|
||||
|
||||
/**
|
||||
* Event Arguments used when SQL queries for creating table columns are generated inside Doctrine\DBAL\Platform\AbstractPlatform.
|
||||
*
|
||||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
||||
* @link www.doctrine-project.com
|
||||
* @since 2.2
|
||||
* @author Jan Sorgalla <jsorgalla@googlemail.com>
|
||||
*/
|
||||
class SchemaCreateTableColumnEventArgs extends SchemaEventArgs
|
||||
{
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Schema\Column
|
||||
*/
|
||||
private $_column = null;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Schema\Table
|
||||
*/
|
||||
private $_table = null;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Platforms\AbstractPlatform
|
||||
*/
|
||||
private $_platform = null;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $_sql = array();
|
||||
|
||||
/**
|
||||
* @param \Doctrine\DBAL\Schema\Column $column
|
||||
* @param \Doctrine\DBAL\Schema\Table $table
|
||||
* @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform
|
||||
*/
|
||||
public function __construct(Column $column, Table $table, AbstractPlatform $platform)
|
||||
{
|
||||
$this->_column = $column;
|
||||
$this->_table = $table;
|
||||
$this->_platform = $platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Schema\Column
|
||||
*/
|
||||
public function getColumn()
|
||||
{
|
||||
return $this->_column;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Schema\Table
|
||||
*/
|
||||
public function getTable()
|
||||
{
|
||||
return $this->_table;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Platforms\AbstractPlatform
|
||||
*/
|
||||
public function getPlatform()
|
||||
{
|
||||
return $this->_platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|array $sql
|
||||
* @return \Doctrine\DBAL\Event\SchemaCreateTableColumnEventArgs
|
||||
*/
|
||||
public function addSql($sql)
|
||||
{
|
||||
if (is_array($sql)) {
|
||||
$this->_sql = array_merge($this->_sql, $sql);
|
||||
} else {
|
||||
$this->_sql[] = $sql;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getSql()
|
||||
{
|
||||
return $this->_sql;
|
||||
}
|
||||
}
|
128
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php
vendored
Normal file
128
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform,
|
||||
Doctrine\DBAL\Schema\Table;
|
||||
|
||||
/**
|
||||
* Event Arguments used when SQL queries for creating tables are generated inside Doctrine\DBAL\Platform\AbstractPlatform.
|
||||
*
|
||||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
||||
* @link www.doctrine-project.com
|
||||
* @since 2.2
|
||||
* @author Jan Sorgalla <jsorgalla@googlemail.com>
|
||||
*/
|
||||
class SchemaCreateTableEventArgs extends SchemaEventArgs
|
||||
{
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Schema\Table
|
||||
*/
|
||||
private $_table = null;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $_columns = null;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $_options = null;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Platforms\AbstractPlatform
|
||||
*/
|
||||
private $_platform = null;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $_sql = array();
|
||||
|
||||
/**
|
||||
* @param \Doctrine\DBAL\Schema\Table $table
|
||||
* @param array $columns
|
||||
* @param array $options
|
||||
* @param Doctrine\DBAL\Platforms\AbstractPlatform $platform
|
||||
*/
|
||||
public function __construct(Table $table, array $columns, array $options, AbstractPlatform $platform)
|
||||
{
|
||||
$this->_table = $table;
|
||||
$this->_columns = $columns;
|
||||
$this->_options = $options;
|
||||
$this->_platform = $platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Schema\Table
|
||||
*/
|
||||
public function getTable()
|
||||
{
|
||||
return $this->_table;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getColumns()
|
||||
{
|
||||
return $this->_columns;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getOptions()
|
||||
{
|
||||
return $this->_options;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Platforms\AbstractPlatform
|
||||
*/
|
||||
public function getPlatform()
|
||||
{
|
||||
return $this->_platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|array $sql
|
||||
* @return \Doctrine\DBAL\Event\SchemaCreateTableEventArgs
|
||||
*/
|
||||
public function addSql($sql)
|
||||
{
|
||||
if (is_array($sql)) {
|
||||
$this->_sql = array_merge($this->_sql, $sql);
|
||||
} else {
|
||||
$this->_sql[] = $sql;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getSql()
|
||||
{
|
||||
return $this->_sql;
|
||||
}
|
||||
}
|
98
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php
vendored
Normal file
98
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform,
|
||||
Doctrine\DBAL\Schema\Table;
|
||||
|
||||
/**
|
||||
* Event Arguments used when the SQL query for dropping tables are generated inside Doctrine\DBAL\Platform\AbstractPlatform.
|
||||
*
|
||||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
||||
* @link www.doctrine-project.com
|
||||
* @since 2.2
|
||||
* @author Jan Sorgalla <jsorgalla@googlemail.com>
|
||||
*/
|
||||
class SchemaDropTableEventArgs extends SchemaEventArgs
|
||||
{
|
||||
/**
|
||||
* @var string|\Doctrine\DBAL\Schema\Table
|
||||
*/
|
||||
private $_table = null;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Platforms\AbstractPlatform
|
||||
*/
|
||||
private $_platform = null;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $_sql = null;
|
||||
|
||||
/**
|
||||
* @param string|\Doctrine\DBAL\Schema\Table $table
|
||||
* @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform
|
||||
*/
|
||||
public function __construct($table, AbstractPlatform $platform)
|
||||
{
|
||||
if (!$table instanceof Table && !is_string($table)) {
|
||||
throw new \InvalidArgumentException('SchemaCreateTableEventArgs expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.');
|
||||
}
|
||||
|
||||
$this->_table = $table;
|
||||
$this->_platform = $platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|\Doctrine\DBAL\Schema\Table
|
||||
*/
|
||||
public function getTable()
|
||||
{
|
||||
return $this->_table;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Platforms\AbstractPlatform
|
||||
*/
|
||||
public function getPlatform()
|
||||
{
|
||||
return $this->_platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sql
|
||||
* @return \Doctrine\DBAL\Event\SchemaDropTableEventArgs
|
||||
*/
|
||||
public function setSql($sql)
|
||||
{
|
||||
$this->_sql = $sql;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSql()
|
||||
{
|
||||
return $this->_sql;
|
||||
}
|
||||
}
|
56
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaEventArgs.php
vendored
Normal file
56
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaEventArgs.php
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\Common\EventArgs;
|
||||
|
||||
/**
|
||||
* Base class for schema related events.
|
||||
*
|
||||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
||||
* @link www.doctrine-project.com
|
||||
* @since 2.2
|
||||
* @author Jan Sorgalla <jsorgalla@googlemail.com>
|
||||
*/
|
||||
class SchemaEventArgs extends EventArgs
|
||||
{
|
||||
/**
|
||||
* @var boolean
|
||||
*/
|
||||
private $_preventDefault = false;
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Event\SchemaEventArgs
|
||||
*/
|
||||
public function preventDefault()
|
||||
{
|
||||
$this->_preventDefault = true;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isDefaultPrevented()
|
||||
{
|
||||
return $this->_preventDefault;
|
||||
}
|
||||
}
|
122
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaIndexDefinitionEventArgs.php
vendored
Normal file
122
vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaIndexDefinitionEventArgs.php
vendored
Normal file
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
/*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.doctrine-project.org>.
|
||||
*/
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\DBAL\Connection,
|
||||
Doctrine\DBAL\Schema\Index;
|
||||
|
||||
/**
|
||||
* Event Arguments used when the portable index definition is generated inside Doctrine\DBAL\Schema\AbstractSchemaManager.
|
||||
*
|
||||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
||||
* @link www.doctrine-project.com
|
||||
* @since 2.2
|
||||
* @author Jan Sorgalla <jsorgalla@googlemail.com>
|
||||
*/
|
||||
class SchemaIndexDefinitionEventArgs extends SchemaEventArgs
|
||||
{
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Schema\Index
|
||||
*/
|
||||
private $_index = null;
|
||||
|
||||
/**
|
||||
* Raw index data as fetched from the database
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $_tableIndex = null;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $_table = null;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\DBAL\Connection
|
||||
*/
|
||||
private $_connection = null;
|
||||
|
||||
/**
|
||||
* @param array $tableIndex
|
||||
* @param string $table
|
||||
* @param \Doctrine\DBAL\Connection $conn
|
||||
*/
|
||||
public function __construct(array $tableIndex, $table, Connection $connection)
|
||||
{
|
||||
$this->_tableIndex = $tableIndex;
|
||||
$this->_table = $table;
|
||||
$this->_connection = $connection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows to clear the index which means the index will be excluded from
|
||||
* tables index list.
|
||||
*
|
||||
* @param null|\Doctrine\DBAL\Schema\Index $index
|
||||
* @return SchemaIndexDefinitionEventArgs
|
||||
*/
|
||||
public function setIndex(Index $index = null)
|
||||
{
|
||||
$this->_index = $index;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Schema\Index
|
||||
*/
|
||||
public function getIndex()
|
||||
{
|
||||
return $this->_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getTableIndex()
|
||||
{
|
||||
return $this->_tableIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getTable()
|
||||
{
|
||||
return $this->_table;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Connection
|
||||
*/
|
||||
public function getConnection()
|
||||
{
|
||||
return $this->_connection;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Doctrine\DBAL\Platforms\AbstractPlatform
|
||||
*/
|
||||
public function getDatabasePlatform()
|
||||
{
|
||||
return $this->_connection->getDatabasePlatform();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user