本文整理汇总了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;
}