当前位置: 首页>>代码示例>>PHP>>正文


PHP Utilities::FindKey方法代码示例

本文整理汇总了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;
 }
开发者ID:Nozemi,项目名称:MyFramework,代码行数:30,代码来源:MessageHandler.class.php

示例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);
     }
 }
开发者ID:Nozemi,项目名称:MyFramework,代码行数:15,代码来源:SQL.class.php

示例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>
开发者ID:Nozemi,项目名称:MyFramework,代码行数:30,代码来源:index.php


注:本文中的Utilities::FindKey方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。