本文整理汇总了PHP中MDB2_Driver_Common::loadModule方法的典型用法代码示例。如果您正苦于以下问题:PHP MDB2_Driver_Common::loadModule方法的具体用法?PHP MDB2_Driver_Common::loadModule怎么用?PHP MDB2_Driver_Common::loadModule使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MDB2_Driver_Common
的用法示例。
在下文中一共展示了MDB2_Driver_Common::loadModule方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Creates a new tag list
*
* @param SiteApplication $app The application using this tag list. The
* application must include a
* SiteDatabaseModule and can optionally include
* SiteMemcacheModule and
* SiteMultipleInstanceModule.
* @param string $tag_list_string optional. A list of tag strings separated
* by '/' characters that are added to this
* list when the list is created. Duplicate
* tag strings are ignored.
* @param boolen $show_private_photos Whether or not to load photos marked
* as private. Default is to not show them.
*/
public function __construct(SiteApplication $app, $tag_list_string = null, $show_private_photos = false)
{
$this->app = $app;
$this->setDatabase($this->app->db);
$this->db->loadModule('Datatype', null, true);
$this->show_private_photos = $show_private_photos;
//SwatDB::setDebug();
//$this->app->memcache->flush();
$this->setTagsByString($tag_list_string);
}
示例2: tableExists
public function tableExists($table)
{
$this->db->loadModule('Manager', null, true);
$tables = $this->db->manager->listTables();
if (MDB2::isError($tables)) {
//$this->fail('Cannot list tables: '. $tables->getUserInfo());
return false;
}
return in_array(strtolower($table), array_map('strtolower', $tables));
}
示例3: dropTable
/**
* @brief drop a table
* @param string $tableName the table to drop
*/
public static function dropTable($tableName)
{
self::connectMDB2();
self::$MDB2->loadModule('Manager');
self::$MDB2->dropTable($tableName);
}
示例4: quoteArray
/**
* Quotes a PHP array into a PostgreSQL array
*
* This is used to quote the list of document types used in the internal
* SQL query.
*
* @param array $array the array to quote.
* @param string $type the SQL data type to use. The type is 'integer' by
* default.
*
* @return string the array quoted as an SQL array.
*/
protected function quoteArray($array, $type = 'integer')
{
$this->db->loadModule('Datatype');
$return = 'ARRAY[';
if (is_array($array)) {
$return .= $this->db->datatype->implodeArray($array, $type);
}
$return .= ']';
return $return;
}