本文整理汇总了PHP中Functions::isArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Functions::isArray方法的具体用法?PHP Functions::isArray怎么用?PHP Functions::isArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Functions
的用法示例。
在下文中一共展示了Functions::isArray方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get
public function get($column)
{
$res = $this->getFileInArray();
if (Functions::isArray($res)) {
$lines = array();
foreach ($res as $line) {
if (isset($line[$column])) {
$lines[] = $line[$column];
}
}
return $lines;
}
return false;
}
示例2: setVariable
protected function setVariable($rA)
{
$this->cmpt = $i = 0;
if (Functions::isArray($rA)) {
foreach ($rA as $r) {
foreach ($this->columns as $column) {
if (strcmp($column["type"], "date") == 0) {
$this->data[$column["label"]][$i] = date(Config::$DATE_FORMAT, strtotime($r[$column["label"]]));
} elseif (strcmp($column["type"], "fulldate") == 0) {
$this->data[$column["label"]][$i] = date(Config::$DATE_FORMAT_FULL, strtotime($r[$column["label"]]));
} elseif (strcmp($column["type"], "datetime") == 0) {
$this->data[$column["label"]][$i] = date(Config::$DATE_FORMAT_TIME, strtotime($r[$column["label"]]));
} elseif (strcmp($column["type"], "int") == 0) {
$this->data[$column["label"]][$i] = intval($r[$column["label"]]);
} elseif (strcmp($column["type"], "password") != 0) {
$this->data[$column["label"]][$i] = $r[$column["label"]];
}
}
$i++;
}
}
}
示例3: secureValues
private function secureValues($array = array())
{
$temp = array();
foreach ($array as $key => $value) {
if (Functions::isArray($value)) {
$temp[$this->secureText($key)] = $this->secureValues($value);
} else {
$temp[$this->secureText($key)] = $this->secureText($value);
}
}
return $temp;
}
示例4: init
<?php
//require Functions::getTemplateDir()."plugins/recaptcha-1.11/recaptchalib.php";
if (strcmp("fr", Config::$CURRENT_LANGUAGE) == 0) {
$current = "-page";
} else {
$current = "";
}
$this->html->setCommonArray(array("%%INDEXCLASS%%" => "", "%%PORTFOLIO%%" => "", "%%BLOG%%" => "", "%%SERVICES%%" => "", "%%ABOUT%%" => "", "%%CONTACT%%" => "current" . $current));
echo $this->html->getFilteredText(Functions::getPublicFile("includes/head.html"));
echo $this->html->getFilteredText(Functions::getPublicFile("includes/header.html"));
$result = init($this, $request);
$publickey = "6LfMk_YSAAAAACZWDgHHzwswD4iVmIjbirsrBv2T";
$values = array("%%ERROR%%" => Functions::isArray($result) ? "<span style='font-weight:bold'>Les erreurs suivant sont identifiés:</span><div style='margin-left:15px;color:#f00'>" . implode($result, "<br />") . "</div>" : (strcmp($result, "no") == 0 ? "<span style='color:#0f0;font-weight:bold'>Le message été envoyé avec succés</span>" : $result), "%%NAME_INPUT%%" => isset($_POST["name"]) && !empty($_POST["name"]) ? $_POST["name"] : "", "%%EMAIL_INPUT%%" => isset($_POST["email"]) && !empty($_POST["email"]) ? $_POST["email"] : "", "%%SUBJECT_INPUT%%" => isset($_POST["subject"]) && !empty($_POST["subject"]) ? $_POST["subject"] : "", "%%MESSAGE_INPUT%%" => isset($_POST["message"]) && !empty($_POST["message"]) ? $_POST["message"] : "", "%%MD5%%" => md5(uniqid()));
$this->html->setCommonArray($values);
echo $this->html->getFilteredText(Functions::getPublicFile("pages/contact.html"));
echo $this->html->getFilteredText(Functions::getPublicFile("includes/footer.html"));
function init($servlet, $request = array())
{
if (isset($_POST["action"]) && strcmp("send", strtolower($_POST["action"])) == 0) {
//$privatekey = "6LfMk_YSAAAAAMIox5-yFggxrvwUmNH-gsiqROQO";
//$resp_captcha = recaptcha_check_answer ($privatekey,$_SERVER["REMOTE_ADDR"],$_POST["recaptcha_challenge_field"],$_POST["recaptcha_response_field"]);
//if(!$resp_captcha->is_valid)$error[]="Le code CAPTCHA ne correspond pas au code affiché sur l'image";
$input = "name";
if (!isset($_POST[$input]) || isset($_POST[$input]) && empty($_POST[$input])) {
$error[] = "(*) Nom doit être remplir";
}
$input = "email";
if (!isset($_POST[$input]) || isset($_POST[$input]) && empty($_POST[$input])) {
$error[] = "(*) Email doit être remplir";
} elseif (isset($_POST[$input]) && !Functions::isEmail($_POST[$input])) {
示例5: existMultipleValues
protected function existMultipleValues($values)
{
$res = $this->table->search($values);
if (Functions::isArray($res)) {
return true;
}
return false;
}
示例6: executeModelFetch
private function executeModelFetch($object, $blockWithObject, $reportLine, $replaceElements)
{
if ($object->getcount() > 0) {
do {
$blockWithObject .= $reportLine["blockText"];
if (function_exists($replaceElements)) {
$replaceChars = call_user_func($replaceElements, $object, $reportLine["objectName"]);
foreach ($replaceChars as $replacedKey => $replacedKeyBy) {
$blockWithObject = str_replace($replacedKey, $replacedKeyBy, $blockWithObject);
}
} elseif (Functions::isArray($replaceElements)) {
foreach ($replaceElements[$reportLine["objectName"]] as $replacedKey => $replacedKeyBy) {
$blockWithObject = str_replace($replacedKey, $replacedKeyBy, $blockWithObject);
}
}
} while ($object->isMore());
return array("objectName" => strtoupper($reportLine["objectName"]), "blockText" => $blockWithObject);
}
return array("objectName" => strtoupper($reportLine["objectName"]), "blockText" => $blockWithObject);
}