本文整理汇总了PHP中Properties::toArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Properties::toArray方法的具体用法?PHP Properties::toArray怎么用?PHP Properties::toArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Properties
的用法示例。
在下文中一共展示了Properties::toArray方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mergePropertiesFromFile
public static function mergePropertiesFromFile($file)
{
$props = new Properties($file);
SystemProperties::$properties = array_merge(SystemProperties::$properties, $props->toArray());
}
示例2: array
function make_DirGalleryArray($Galleries, $with_preview, $with_description)
{
#!!!!!!!!! hier muss noch nee prüfung rein das wenn galerie keine bilder hat sie erst garnich erscheint
$GALERIE_DIR = BASE_DIR . GALLERIES_DIR_NAME . "/";
$return_array = array();
if ($Galleries !== false and is_array($Galleries)) {
$galleries_array = $Galleries;
} else {
$galleries_array = getDirAsArray($GALERIE_DIR, "dir");
}
foreach ($galleries_array as $gallery) {
$description = array();
$gallery_images = getDirAsArray($GALERIE_DIR . $gallery, $this->allowed_pics);
# Galerie hat keine Bilder also nicht erstellen
if (count($gallery_images) < 1) {
continue;
}
# Bildbeschreibung soll benutzt werden und texte.conf.php gibts also erzeugen
if ($with_description === true and count($gallery_images) > 0 and file_exists($GALERIE_DIR . $gallery . "/" . "texte.conf.php")) {
$tmp_description = new Properties($GALERIE_DIR . $gallery . "/" . "texte.conf.php");
$description = $tmp_description->toArray();
unset($tmp_description);
}
foreach ($gallery_images as $image) {
# Bild hat kein Vorschaubild, Vorschaubilder sollen aber benutzt werden
# dann nicht ins array
if ($with_preview === true and !file_exists($GALERIE_DIR . $gallery . "/" . PREVIEW_DIR_NAME . "/" . $image)) {
continue;
}
#echo "$image<br>\n";
$return_array[$gallery][$image]['preview'] = false;
# Vorschaubilder sollen benutzt werden und Vorschaubild gibt es
if ($with_preview === true) {
$return_array[$gallery][$image]['preview'] = true;
}
$return_array[$gallery][$image]['description'] = false;
# Bildbeschreibung soll benutzt werden wenn vorhanden ins array
if ($with_description === true and isset($description[$image])) {
$return_array[$gallery][$image]['description'] = $description[$image];
}
}
# hat Galerie keine Bilder dann löschen
if (isset($return_array[$gallery]) and count($return_array[$gallery]) < 1) {
unset($return_array[$gallery]);
}
}
return $return_array;
}
示例3: Smileys
function Smileys($path)
{
$smileys = new Properties("{$path}/smileys.txt");
$this->smileysarray = $smileys->toArray();
}
示例4: foreach
# Plugin-Tab nur anzeigen wenn plugin Ordner mit mind. einem plugin vorhanden ist
/* if (count(getDirAsArray(PLUGIN_DIR_REL, "dir")) < 1 ) {
foreach($array_tabs as $key => $value) {
if($value == "plugins") {
unset($array_tabs[$key]);
break;
}
}
}
*/
$users_array = array();
$tmp_action = getRequestValue('action');
if (defined('MULTI_USER') and MULTI_USER) {
$USERS = new Properties(session_save_path() . (substr(session_save_path(), -1) != "/" ? "/" : "") . "users.conf.php");
$id = md5(session_id());
$users_array = $USERS->toArray();
unset($users_array[$id]);
# die refresh ajax anfrage
#!!!!!!!!!!!!!! kann gelöscht werden wenn ich das mit dem neuen multi mode fertig habe
/* if(getRequestValue('refresh_session') == "true") {
$hidden_action = "";
foreach($users_array as $action) {
if($action == "home" or $action == "login") continue;
if(in_array($action,$array_tabs))
$hidden_action .= ",".$action;
}
if(strlen($hidden_action) > 1)
$hidden_action = substr($hidden_action,1);
exit($hidden_action);
}*/
# es gab ein redirect
示例5: rsort
if (count($moziloPlace) > 0) {
rsort($moziloPlace);
$var_Place = 'var moziloPlace = "' . implode('|', $moziloPlace) . '|VALUE|DESCRIPTION";';
} else {
$var_Place = 'var moziloPlace = "VALUE|DESCRIPTION";';
}
$var_UserSyntax = '';
global $USER_SYNTAX;
$moziloUserSyntax = $USER_SYNTAX->toArray();
if (count($moziloUserSyntax) > 0) {
$moziloUserSyntax = array_keys($moziloUserSyntax);
rsort($moziloUserSyntax);
$var_UserSyntax = 'var moziloUserSyntax = "' . implode('|', $moziloUserSyntax) . '";';
}
$smileys = new Properties(BASE_DIR_CMS . "smileys/smileys.txt");
$moziloSmileys = $smileys->toArray();
$var_Smileys = '';
if (count($moziloSmileys) > 0) {
$moziloSmileys = array_keys($moziloSmileys);
rsort($moziloSmileys);
$var_Smileys = 'var moziloSmileys = "' . implode('|', $moziloSmileys) . '";';
}
$moziloSyntax = 'var moziloSyntax = "';
require_once BASE_DIR_CMS . "Syntax.php";
$syntax_elemente = get_class_methods('Syntax');
rsort($syntax_elemente);
foreach ($syntax_elemente as $element) {
if ($element == "syntax_hr") {
continue;
}
if (substr($element, 0, strlen("syntax_")) == "syntax_") {