本文整理汇总了PHP中Horde_Db_Adapter::supportsMigrations方法的典型用法代码示例。如果您正苦于以下问题:PHP Horde_Db_Adapter::supportsMigrations方法的具体用法?PHP Horde_Db_Adapter::supportsMigrations怎么用?PHP Horde_Db_Adapter::supportsMigrations使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Horde_Db_Adapter
的用法示例。
在下文中一共展示了Horde_Db_Adapter::supportsMigrations方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor.
*
* @param Horde_Db_Adapter $connection A DB connection object.
* @param Horde_Log_Logger $logger A logger object.
* @param array $options Additional options for the migrator:
* - migrationsPath: directory with the
* migration files.
* - schemaTableName: table for storing
* the schema version.
*
* @throws Horde_Db_Migration_Exception
*/
public function __construct(Horde_Db_Adapter $connection, Horde_Log_Logger $logger = null, array $options = array())
{
if (!$connection->supportsMigrations()) {
throw new Horde_Db_Migration_Exception('This database does not yet support migrations');
}
$this->_connection = $connection;
$this->_logger = $logger ? $logger : new Horde_Support_Stub();
$this->_inflector = new Horde_Support_Inflector();
if (isset($options['migrationsPath'])) {
$this->_migrationsPath = $options['migrationsPath'];
}
if (isset($options['schemaTableName'])) {
$this->_schemaTableName = $options['schemaTableName'];
}
$this->_initializeSchemaInformation();
}
示例2: supportsMigrations
/**
* Does this adapter support migrations?
*
* @return boolean
*/
public function supportsMigrations()
{
return $this->_write->supportsMigrations();
}