本文整理汇总了PHP中Utilities::FindKey方法的典型用法代码示例。如果您正苦于以下问题:PHP Utilities::FindKey方法的具体用法?PHP Utilities::FindKey怎么用?PHP Utilities::FindKey使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Utilities
的用法示例。
在下文中一共展示了Utilities::FindKey方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct($message, $type)
{
$bootstrap = false;
if (!empty(Utilities::FindKey('BootstrapMessages', $GLOBALS['Config']))) {
$bootstrap = Utilities::FindKey('BootstrapMessages', $GLOBALS['Config']);
}
switch (strtoupper($type)) {
default:
case 'ERR':
case 'ERROR':
$style = 'danger';
break;
case 'SUCC':
case 'SUCCESS':
$style = 'success';
break;
case 'WARN':
case 'WARNING':
$style = 'warning';
break;
case 'INFO':
case 'INFORMATION':
$style = 'info';
break;
}
if ($bootstrap === true) {
$message = '<p class="alert alert-' . $style . '" role="alert">' . $message . '</p>';
}
echo $message;
}
示例2: runQuery
private static function runQuery($query, $params = null, $db)
{
try {
$stmt = $db->prepare($query);
$result = $stmt->execute($params);
return array('Result' => $stmt, 'Success' => true);
} catch (PDOException $ex) {
if (Utilities::FindKey('Debug', $GLOBALS['Config']) === true) {
$message = 'Error Message: ' . $ex->getMessage();
} else {
$message = 'Something went wrong while running the query. Please report to an administrator as soon as possible.';
}
return array('Result' => $message, 'Success' => false);
}
}
示例3:
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-lg-2"></div>
<div class="col-lg-8">
<div class="page-header">
<h1><?php
echo Utilities::FindKey('SiteTitle', $Config);
?>
<small>Documentation</small></h1>
</div>
<nav class="navbar navbar-default">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#nozframework-navbar-collapse" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="nozframework-navbar-collapse">
<ul class="nav navbar-nav navbar-left">
<li><a href="#">Getting Started</a></li>