本文整理匯總了PHP中TitanFramework::displayFrameworkError方法的典型用法代碼示例。如果您正苦於以下問題:PHP TitanFramework::displayFrameworkError方法的具體用法?PHP TitanFramework::displayFrameworkError怎麽用?PHP TitanFramework::displayFrameworkError使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TitanFramework
的用法示例。
在下文中一共展示了TitanFramework::displayFrameworkError方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Constructor
*
* @since 1.4
*/
function __construct($settings, $owner)
{
if (defined('WP_DEBUG')) {
if (WP_DEBUG == true) {
// Warn about deprecation, refer to `font` option
TitanFramework::displayFrameworkError(sprintf(__('%s has been deprecated and will be removed in version %s! Please use %s instead to avoid errors in the future.', TF_I18NDOMAIN), '<code>select-googlefont</code>', '<code>1.5</code>', '<code>font</code>'));
}
}
parent::__construct($settings, $owner);
add_filter('tf_generate_css_select-googlefont_' . $this->getOptionNamespace(), array($this, 'generateCSS'), 10, 2);
}
示例2: factory
public static function factory($settings, $owner)
{
$settings = array_merge(self::$defaultSettings, $settings);
$className = 'TitanFrameworkOption' . str_replace(' ', '', ucwords(str_replace('-', ' ', $settings['type'])));
// assume all the classes are already required
if (!class_exists($className) && !class_exists($settings['type'])) {
TitanFramework::displayFrameworkError(sprintf(__('Option type or extended class %s does not exist.', 'gossip'), '<code>' . $settings['type'] . '</code>', $settings), $settings);
return null;
}
if (class_exists($className)) {
$obj = new $className($settings, $owner);
return $obj;
}
$className = $settings['type'];
$obj = new $className($settings, $owner);
return $obj;
}