本文整理匯總了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;
}