本文整理汇总了PHP中prado::getApplication方法的典型用法代码示例。如果您正苦于以下问题:PHP prado::getApplication方法的具体用法?PHP prado::getApplication怎么用?PHP prado::getApplication使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类prado
的用法示例。
在下文中一共展示了prado::getApplication方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTable
/**
* Obtains the metadata for the named table.
* @param string table name
* @return TDbTableSchema table metadata. Null if the named table does not exist.
*/
public function getTable($name)
{
if (isset($this->_tables[$name])) {
return $this->_tables[$name];
} else {
if (!isset($this->_cacheExclude[$name]) && ($duration = $this->_connection->schemaCachingDuration) > 0 && ($cache = prado::getApplication()->getCache()) !== null) {
$key = 'prado:dbschema' . $this->_connection->connectionString . ':' . $this->_connection->username . ':' . $name;
if (($table = $cache->get($key)) === false) {
$table = $this->createTable($name);
$cache->set($key, $table, $duration);
}
return $this->_tables[$name] = $table;
} else {
return $this->_tables[$name] = $this->createTable($name);
}
}
}
示例2: getDroppedControl
/**
* GetDroppedControl
*
* Compatibility method to get the dropped control
* @return TControl dropped control, or null if not found
*/
public function getDroppedControl()
{
$control = null;
$service = prado::getApplication()->getService();
if ($service instanceof TPageService) {
// Find the control
// Warning, this will not work if you have a '_' in your control Id !
$dropControlId = str_replace(TControl::CLIENT_ID_SEPARATOR, TControl::ID_SEPARATOR, $this->_dragElementId);
$control = $service->getRequestedPage()->findControl($dropControlId);
}
return $control;
}