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


PHP IPSUtils_Include函数代码示例

本文整理汇总了PHP中IPSUtils_Include函数的典型用法代码示例。如果您正苦于以下问题:PHP IPSUtils_Include函数的具体用法?PHP IPSUtils_Include怎么用?PHP IPSUtils_Include使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了IPSUtils_Include函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: IncludeClassByName

		private static function IncludeClassByName($className) {
			$pos = strpos($className, '_');
			if ($pos===false) {
				return;
			}
			$componentType = substr($className, 0, $pos);
			$componentType = str_replace('IPSModule','IPSComponent', $componentType);
			IPSUtils_Include ($className.'.class.php', 'IPSLibrary::app::core::IPSComponent::'.$componentType);
		}
开发者ID:KOS-CH,项目名称:IPSLibrary,代码行数:9,代码来源:IPSComponent.class.php

示例2: __construct

		/**
		 * @public
		 *
		 * Initialisierung des IPSComponentPlayer_Sonos Players
		 *
		 * @param string $address IP Addresse des Sonos Players 
		 */
		public function __construct( $address ) {
			if (file_exists(IPS_GetKernelDir().'scripts\\PHPSonos.inc.php')) {
			   include_once IPS_GetKernelDir().'scripts\\PHPSonos.inc.php';
			} else {
				IPSUtils_Include ('PHPSonos.class.php', 'IPSLibrary::app::hardware::Sonos');
			}
		   $this->address = $address;
		   $this->sonos   = new PHPSonos($address);
		}
开发者ID:KOS-CH,项目名称:IPSLibrary,代码行数:16,代码来源:IPSComponentPlayer_Sonos.class.php

示例3:

	/**@defgroup ipsmodulemanagergui IPSModuleManagerGUI
	 * @ingroup modules
	 * @{
	 *
	 * @file          IPSModuleManagerGUI.inc.php
	 * @author        Andreas Brauneis
	 * @version
	 *  Version 2.50.1, 09.08.2012<br/>
	 *
	 * IPSModuleManagerGUI API
	 *
	 */

	IPSUtils_Include ("IPSLogger.inc.php",                      "IPSLibrary::app::core::IPSLogger");
	IPSUtils_Include ("IPSModuleManagerGUI_Constants.inc.php",  "IPSLibrary::app::modules::IPSModuleManagerGUI");
	IPSUtils_Include ("IPSModuleManagerGUI_Utils.inc.php",      "IPSLibrary::app::modules::IPSModuleManagerGUI");

	/**
	 * Setz eine bestimmte Seite in der IPSModuleManagerGUI
	 *
	 * @param string $action Action String
	 * @param string $module optionaler Module String
	 * @param string $info optionaler Info String
	 */
	function IPSModuleManagerGUI_SetPage($action, $module='', $info='') {
		$baseId  = IPSUtil_ObjectIDByPath('Program.IPSLibrary.data.modules.IPSModuleManagerGUI');

		SetValue(IPS_GetObjectIDByIdent(IPSMMG_VAR_ACTION, $baseId), $action);
		SetValue(IPS_GetObjectIDByIdent(IPSMMG_VAR_MODULE, $baseId), $module);
		SetValue(IPS_GetObjectIDByIdent(IPSMMG_VAR_INFO, $baseId), $info);
	}
开发者ID:KOS-CH,项目名称:IPSLibrary,代码行数:31,代码来源:IPSModuleManagerGUI.inc.php

示例4: __construct

	 * @author        Andreas Brauneis
	 *
	 *
	 */

   /**
    * @class IPSComponentRGB_IPS868
    *
    * Definiert ein IPSComponentRGB_IPS868 Object, das ein IPSComponentRGB Object für Homematic implementiert.
    *
    * @author Andreas Brauneis
    * @version
    * Version 2.50.1, 31.01.2012<br/>
    */

	IPSUtils_Include ('IPSComponentRGB.class.php', 'IPSLibrary::app::core::IPSComponent::IPSComponentRGB');

	class IPSComponentRGB_IPS868 extends IPSComponentRGB {

		private $instanceId;
	
		/**
		 * @public
		 *
		 * Initialisierung eines IPSComponentRGB_IPS868 Objektes
		 *
		 * @param integer $instanceId InstanceId des IPS-RGBW868 Devices
		 */
		public function __construct($instanceId) {
			$this->instanceId = IPSUtil_ObjectIDByPath($instanceId);
		}
开发者ID:KOS-CH,项目名称:IPSLibrary,代码行数:31,代码来源:IPSComponentRGB_IPS868.class.php

示例5: array

	 * @{
	 *
	 * Dieses Script aktualisiert die Wetterdaten in IPS
	 *
	 * @file          IPSWeatherForcastAT_Refresh.ips.php
	 * @author        Andreas Brauneis
	 * @version
	 *  Version 2.50.1, 15.02.2012<br/>
	 *
	 */


	IPSUtils_Include ("IPSWeatherForcastAT_Constants.inc.php",     "IPSLibrary::app::modules::Weather::IPSWeatherForcastAT");
	IPSUtils_Include ("IPSWeatherForcastAT_Configuration.inc.php", "IPSLibrary::config::modules::Weather::IPSWeatherForcastAT");
	IPSUtils_Include ("IPSWeatherForcastAT_Utils.inc.php",         "IPSLibrary::app::modules::Weather::IPSWeatherForcastAT");
	IPSUtils_Include ("IPSLogger.inc.php",                         "IPSLibrary::app::core::IPSLogger");

	if (Sys_Ping(IPSWEATHERFAT_EXTERNAL_IP, 100)) {
		IPSLogger_Trc(__file__, "Refresh Weather Data");
		
		$stationGoogle   = IPSWEATHERFAT_GOOGLE_PLACE."-".IPSWEATHERFAT_GOOGLE_COUNTRY;
		$urlGoogle       = "http://www.google.com/ig/api?weather=".$stationGoogle."&hl=".IPSWEATHERFAT_GOOGLE_LANG;
		$DaySourceArray  = array('Mo.','Di.','Mi.','Do.','Fr.','Sa.','So.');
		$DayDisplayArray = array('Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag','Sonntag');

		$api = simplexml_load_string(utf8_encode(@Sys_GetURLContent($urlGoogle)));
		echo $urlGoogle;

		IPSWeatherFAT_SetValue('LastRefreshDateTime', date("Y-m-j H:i:s"));
		IPSWeatherFAT_SetValue('LastRefreshTime', date("H:i"));
开发者ID:KOS-CH,项目名称:IPSLibrary,代码行数:30,代码来源:IPSWeatherForcastAT_Refresh.ips.php

示例6: SyncButton

	 *
	 *
	 */

	/**
	 * @class IPSModuleSensor
	 *
	 * Definiert ein IPSModuleSensor Object, das als Wrapper für Sensoren in der IPSLibrary
	 * verwendet werden kann.
	 *
	 * @author Andreas Brauneis
	 * @version
	 *  Version 2.50.1, 09.06.2012<br/>
	 */

	IPSUtils_Include ('IPSModule.class.php', 'IPSLibrary::app::core::IPSComponent');

	abstract class IPSModuleSensor extends IPSModule {

		/**
		 * @public
		 *
		 * Ermöglicht die Synchronisation von Sensorwerten mit Modulen
		 *
		 * @param string $value Sensorwert
		 * @param IPSComponentSensor $component Sensor Komponente
		 */
		abstract public function SyncButton($value, IPSComponentSensor $component);

		/**
		 * @public
开发者ID:KOS-CH,项目名称:IPSLibrary,代码行数:31,代码来源:IPSModuleSensor.class.php

示例7: __construct

<?
	/**@addtogroup ipscomponent
	 * @{
	 *
	 * @file          IPSModuleAVControl_Entertainment.class.php
	 * @author        Andreas Brauneis
	 *
	 */

	IPSUtils_Include ("Entertainment_InterfaceIPSComponentAVControl.inc.php", "IPSLibrary::app::modules::Entertainment");
	IPSUtils_Include ('IPSModuleAVControl.class.php', 'IPSLibrary::app::core::IPSComponent::IPSComponentAVControl');

	/**
	 * @class IPSModuleAVControl_Entertainment
	 *
	 * Klasse zur Rückmeldung von Audio/Video Receivern an die Entertainment Steuerung
	 *
	 * @author Andreas Brauneis
	 * @version
	 * Version 2.50.1, 31.01.2012<br/>
	 */

	class IPSModuleAVControl_Entertainment extends IPSModuleAVControl {

		/**
		 * @public
		 *
		 * Initialisierung des IPSModuleAVControl_Entertainment
		 *
		 */
		public function __construct() {
开发者ID:KOS-CH,项目名称:IPSLibrary,代码行数:31,代码来源:IPSModuleAVControl_Entertainment.class.php

示例8: IPSModuleManager

<?
	 /**@addtogroup ipsmodulemanager
	 * @{
	 *
	 * Deinstallations Script für IPSModuleManager
	 *
	 * @file          IPSModuleManager_Deinstallation.ips.php
	 * @author        Andreas Brauneis
	 * @version
	 *  Version 2.50.1, 28.02.2012<br/>
	 *
	 *
	 */

	if (!isset($moduleManager)) {
		IPSUtils_Include ('IPSModuleManager.class.php', 'IPSLibrary::install::IPSModuleManager');

		echo 'ModuleManager Variable not set --> Create "default" ModuleManager';
		$moduleManager = new IPSModuleManager('IPSModuleManager');
	}


	/** @}*/
?>
开发者ID:KOS-CH,项目名称:IPSLibrary,代码行数:24,代码来源:IPSModuleManager_Deinstallation.ips.php

示例9: IPSModuleManager

	 */
	 
	if (!isset($moduleManager)) {
		IPSUtils_Include ('IPSModuleManager.class.php', 'IPSLibrary::install::IPSModuleManager');

		echo 'ModuleManager Variable not set --> Create "default" ModuleManager'."\n";
		$moduleManager = new IPSModuleManager('IPSEDIP');
	}

	$moduleManager->VersionHandler()->CheckModuleVersion('IPS','2.50');
	$moduleManager->VersionHandler()->CheckModuleVersion('IPSLogger','2.50.1');
	$moduleManager->VersionHandler()->CheckModuleVersion('IPSModuleManager','2.50.1');

	IPSUtils_Include ("IPSInstaller.inc.php",            "IPSLibrary::install::IPSInstaller");
	IPSUtils_Include ("IPSEDIP_Constants.inc.php",       "IPSLibrary::app::hardware::IPSEDIP");
	IPSUtils_Include ("IPSEDIP_Configuration.inc.php",   "IPSLibrary::config::hardware::IPSEDIP");

	$AppPath        = "Program.IPSLibrary.app.hardware.IPSEDIP";
	$DataPath       = "Program.IPSLibrary.data.hardware.IPSEDIP";
	$ConfigPath     = "Program.IPSLibrary.config.hardware.IPSEDIP";
	$HardwarePath   = "Hardware.EDIP";

	$IgnoreIOPortInstanceError    = $moduleManager->GetConfigValueBoolDef('IgnoreIOPortInstanceError', '', true);

	/* ---------------------------------------------------------------------- */
	/* EDIP Program Installation                                              */
	/* ---------------------------------------------------------------------- */

	$CategoryIdData = CreateCategoryPath($DataPath);
	$CategoryIdApp  = CreateCategoryPath($AppPath);
	$CategoryIdHW   = CreateCategoryPath($HardwarePath);
开发者ID:KOS-CH,项目名称:IPSLibrary,代码行数:31,代码来源:IPSEDIP_Installation.ips.php

示例10: explode

	SetVariableConstant ('"NP_ID_CDALBUM"',       $albumId,                'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer');
	SetVariableConstant ("NP_ID_CDINTERPRET",     $interpretId,            'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer');

	SetVariableConstant ("NP_ID_CATEGORYLIST",    $categoryId,             'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer');
	SetVariableConstant ("NP_ID_CDALBUMLIST",     $cdAlbumListId,          'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer');
	SetVariableConstant ("NP_ID_CDALBUMNAV",      $cdAlbumNavId,           'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer');
	SetVariableConstant ('"NP_ID_CDTRACKLIST"',   $cdTrackListId,          'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer');
	SetVariableConstant ("NP_ID_CDTRACKNAV",      $cdTrackNavId,           'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer');
	SetVariableConstant ("NP_ID_RADIOLIST",       $radioListId,            'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer');
	SetVariableConstant ("NP_ID_RADIONAV",        $radioNavId,             'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer');
	SetVariableConstant ("NP_ID_SOURCE",          $sourceId,               'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer');
	SetVariableConstant ('"NP_ID_CONTROL"',       $controlId,              'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer');

	// Installation of Components
	IPSUtils_Include ("NetPlayer_Constants.inc.php",     "IPSLibrary::app::modules::NetPlayer");
	IPSUtils_Include ("NetPlayer_Configuration.inc.php", "IPSLibrary::config::modules::NetPlayer");

	$params = explode(',',NETPLAYER_COMPONENT);
	if ($params[0] == 'IPSComponentPlayer_Mediaplayer') {
	   if (!is_numeric($params[1])) {
	      $pathItems = explode('.',$params[1]);
	      $mediaPlayerName = $pathItems[count($pathItems)-1];
	      unset($pathItems[count($pathItems)-1]);
	      $path = implode('.', $pathItems);
			$categoryId  = CreateCategoryPath($path);

			// Create MediaPlayer
   		$mediaPlayerInstanceId   = CreateMediaPlayer($mediaPlayerName, $categoryId, 0);
   		$mediaPlayerTitel        = IPS_GetVariableIDByName('Titel', $mediaPlayerInstanceId);

   		// Register Message Handler
开发者ID:KOS-CH,项目名称:IPSLibrary,代码行数:31,代码来源:NetPlayer_Installation.ips.php

示例11: CreateVariable

	$NauticBeg         = CreateVariable("NauticBegin",            3 /*String*/,  $categoryId_DataValues,  310, '~String', $scriptId_Refresh, '');
	$NauticEnd         = CreateVariable("NauticEnd",              3 /*String*/,  $categoryId_DataValues,  320, '~String', $scriptId_Refresh, '');
	$NauticBegLim      = CreateVariable("NauticBeginLimited",     3 /*String*/,  $categoryId_DataValues,  330, '~String', $scriptId_Refresh, '');
	$NauticEndLim      = CreateVariable("NauticEndLimited",       3 /*String*/,  $categoryId_DataValues,  340, '~String', $scriptId_Refresh, '');
	$NauticDisplay     = CreateVariable("NauticDisplay",          3 /*String*/,  $categoryId_DataValues,  350, '~String', null,              '00:00 - 00:00');
	$NauticLimits      = CreateVariable("NauticLimits",           3 /*String*/,  $categoryId_DataValues,  360, '~String', $scriptId_Refresh, '04:30-06:30/19:30-21:30');

	$AstronomicBeg     = CreateVariable("AstronomicBegin",        3 /*String*/,  $categoryId_DataValues,  410, '~String', $scriptId_Refresh, '');
	$AstronomicEnd     = CreateVariable("AstronomicEnd",          3 /*String*/,  $categoryId_DataValues,  420, '~String', $scriptId_Refresh, '');
	$AstronomicBegLim  = CreateVariable("AstronomicBeginLimited", 3 /*String*/,  $categoryId_DataValues,  430, '~String', $scriptId_Refresh, '');
	$AstronomicEndLim  = CreateVariable("AstronomicEndLimited",   3 /*String*/,  $categoryId_DataValues,  440, '~String', $scriptId_Refresh, '');
	$AstronomicDisplay = CreateVariable("AstronomicDisplay",      3 /*String*/,  $categoryId_DataValues,  450, '~String', null,              '00:00 - 00:00');
	$AstronomicLimits  = CreateVariable("AstronomicLimits",       3 /*String*/,  $categoryId_DataValues,  460, '~String', $scriptId_Refresh, '04:00-06:00/20:00-22:00');

	IPSUtils_Include ("IPSTwilight.ips.php", "IPSLibrary::app::modules::Weather::IPSTwilight");

	// ----------------------------------------------------------------------------------------------------------------------------
	// WebFront Installation
	// ----------------------------------------------------------------------------------------------------------------------------
	if ($WFC10_Enabled) {
		$categoryId_WebFront         = CreateCategoryPath($WFC10_Path);
		$categoryId_WebFrontTopLeft  = CreateCategory(  'TopLeft',  $categoryId_WebFront, 10);
		$categoryId_WebFrontTopRight = CreateCategory(  'TopRight', $categoryId_WebFront, 20);
		$categoryId_WebFrontBottom   = CreateCategory(  'Bottom',   $categoryId_WebFront, 30);
		$categoryId_WebFrontRight    = CreateCategory(  'Right',    $categoryId_WebFront, 40);

		CreateLinkByDestination('Sonnen-Aufgang/Untergang', $SunriseDisplay,    $categoryId_WebFrontTopLeft,  10);
		CreateLinkByDestination('Limits',                   $SunriseLimits,     $categoryId_WebFrontTopRight, 10);
		CreateLinkByDestination('Zivile Dämmerung',         $CivilDisplay,      $categoryId_WebFrontTopLeft,  20);
		CreateLinkByDestination('Limits',                   $CivilLimits,       $categoryId_WebFrontTopRight, 20);
开发者ID:KOS-CH,项目名称:IPSLibrary,代码行数:30,代码来源:IPSTwilight_Installation.ips.php

示例12: IPSModuleManager

	 *
	 * @file          IPSLogger_Deinstallation.ips.php
	 * @author        Andreas Brauneis
	 * @version
	 *  Version 2.50.1, 25.02.2012<br/>
	 *
	 */

	if (!isset($moduleManager)) {
		IPSUtils_Include ('IPSModuleManager.class.php', 'IPSLibrary::install::IPSModuleManager');

		echo 'ModuleManager Variable not set --> Create "default" ModuleManager'.PHP_EOL;
		$moduleManager = new IPSModuleManager('IPSLogger');
	}

	IPSUtils_Include ("IPSInstaller.inc.php",            "IPSLibrary::install::IPSInstaller");

	$WFC10_ConfigId = $moduleManager->GetConfigValueIntDef('ID', 'WFC10', GetWFCIdDefault());
	DeleteWFCItems ($WFC10_ConfigId, 'IPSLogger_Widget');

	Unregister_PhpErrorHandler($moduleManager);

	// ------------------------------------------------------------------------------------------------
	function Unregister_PhpErrorHandler($moduleManager) {
		$file = IPS_GetKernelDir().'scripts\\__autoload.php';

		if (!file_exists($file)) {
			return;
		}
		$FileContent = file_get_contents($file);
		$includeCommand = 'IPSUtils_Include("IPSLogger_PhpErrorHandler.inc.php", "IPSLibrary::app::core::IPSLogger");';
开发者ID:KOS-CH,项目名称:IPSLibrary,代码行数:31,代码来源:IPSLogger_Deinstallation.ips.php

示例13:

	 *
	 * Dieses File inkludiert alle benötigten Files der Entertainment Steuerung um alle wesentlichen
	 * Funktionen der Entertainment Steuerung ansteueren zu können.
    */

	IPSUtils_Include ("IPSLogger.inc.php",                   "IPSLibrary::app::core::IPSLogger");
	include_once "Entertainment_Constants.inc.php";
	IPSUtils_Include ("Entertainment_IDs.inc.php",           "IPSLibrary::app::modules::Entertainment");
	IPSUtils_Include ("Entertainment_Configuration.inc.php", "IPSLibrary::config::modules::Entertainment");
	include_once "Entertainment_Communication.inc.php";
	include_once "Entertainment_Control.inc.php";
	include_once "Entertainment_Room.inc.php";
	include_once "Entertainment_Power.inc.php";
	include_once "Entertainment_Device.inc.php";
	include_once "Entertainment_Source.inc.php";
	IPSUtils_Include ("Entertainment_Custom.inc.php", "IPSLibrary::config::modules::Entertainment");
	include_once "Entertainment_Connect.inc.php";
	include_once "Entertainment_RemoteControl.inc.php";
   /** @}*/

	/**@defgroup entertainment_visu Entertainment Visualisierung
	 * @ingroup entertainment
	 * @{
	 *
	 *@page visu_entertainment_webfront Entertainment WebFront Visualisierung
	 *
	 * Alle Funktionen der Entertainment Steuerung können auch über WebFront Interface bedient werden.
	 * 
	 * Die Visualisierung bietet eine Übersicht mit dem Zustand aller Räume und Geräte
	 *@image html Entertainment_WebFrontOverview.png "Übersicht" 
	 *
开发者ID:KOS-CH,项目名称:IPSLibrary,代码行数:31,代码来源:Entertainment.inc.php

示例14: CreateVariable

	$Forecast3DayOfWeek       = CreateVariable("Tomorrow2Day",          3 /*String*/,  $categoryId_Data,  400,  '~String',  null, '');
	$Forecast3TempMin         = CreateVariable("Tomorrow2TempMin",      1 /*Integer*/, $categoryId_Data,  410,  null,       null, 0);
	$Forecast3TempMax         = CreateVariable("Tomorrow2TempMax",      1 /*Integer*/, $categoryId_Data,  420,  null,       null, 0);
	$Forecast3TextShort       = CreateVariable("Tomorrow2ForecastLong", 3 /*String*/,  $categoryId_Data,  430,  '~String',  null, '');
	$Forecast3TextLong        = CreateVariable("Tomorrow2ForecastShort",3 /*String*/,  $categoryId_Data,  440,  '~String',  null, '');
	$Forecast3Icon            = CreateVariable("Tomorrow2Icon",         3 /*String*/,  $categoryId_Data,  450,  '~String',  null, '');

	$iForecast                = CreateVariable("iForecast",             3 /*String*/,  $categoryId_Data,  1000, '~HTMLBox', null, '<iframe frameborder="0" width="100%" height="4000px" src="../user/Weather/Weather.php"</iframe>');

	// Webfront Installation
	if ($WFC10_Enabled) {
		DeleteWFCItems($WFC10_ConfigId, $WFC10_TabPaneItem.$WFC10_TabItem);
		CreateWFCItemTabPane      ($WFC10_ConfigId, $WFC10_TabPaneItem, $WFC10_TabPaneParent,  $WFC10_TabPaneOrder, $WFC10_TabPaneName, $WFC10_TabPaneIcon);
		CreateWFCItemExternalPage ($WFC10_ConfigId, $WFC10_TabPaneItem.$WFC10_TabItem, $WFC10_TabPaneItem, $WFC10_TabOrder, $WFC10_TabName, $WFC10_TabIcon, "user\/IPSWeatherForcastAT\/Weather.php", 'false' /*BarBottomVisible*/);
		ReloadAllWebFronts();
	}

	// iPhone Installation
	if ($Mobile_Enabled) {
		$mobileId  = CreateCategoryPath($Mobile_Path, $Mobile_PathOrder, $Mobile_PathIcon);
		$mobileId  = CreateCategoryPath($Mobile_Path.'.'.$Mobile_Name, $Mobile_Order, $Mobile_Icon);

		CreateLink('Vorhersage',      $iForecast, $mobileId, 10);
	}

	// Execute Data Refresh
	IPSUtils_Include ("IPSWeatherForcastAT_Refresh.ips.php", "IPSLibrary::app::modules::Weather::IPSWeatherForcastAT");

	/** @}*/
?>
开发者ID:KOS-CH,项目名称:IPSLibrary,代码行数:30,代码来源:IPSWeatherForcastAT_Installation.ips.php

示例15: SearchLastRepositories

	function SearchLastRepositories() {
		IPSUtils_Include ("IPSModuleManager.class.php", "IPSLibrary::install::IPSModuleManager");
		$moduleManager = $_IPS['MODULEMANAGER'];
		$infos    = $moduleManager->GetModuleInfos();
		$modules  = $moduleManager->GetInstalledModules();

		//print_r($modules);
		foreach ($modules as $module=>$data) {
			$downloadFile = IPS_GetKernelDir().'scripts\\IPSLibrary\\install\\DownloadListFiles\\'.$module.'_FileList.ini';
			$configFile   = IPS_GetKernelDir().'scripts\\IPSLibrary\\install\\InitializationFiles\\'.$module.'.ini';
			if (!file_exists($downloadFile) or !file_exists($configFile)) {
				$moduleManager->LogHandler()->Debug('Remove Module "'.$module.'" from InstalledModules (No Ini Files found)');
				$versionHandler = new IPSFileVersionHandler($module);
				$versionHandler->DeleteModule();
			} else {
				$moduleManager  = new IPSModuleManager($module, '', sys_get_temp_dir(), true);
				$versionHandler = $moduleManager->VersionHandler();
				$repository     = $versionHandler->GetModuleRepository();

				// Search current Repository
				if ($repository=='') {
					$files = scandir(IPS_GetKernelDir().'\\logs\\', 1);
					foreach ($files as $file) {
						// Found LogFile
						if ($repository<>'') {
							break;
						} elseif (strpos($file,'IPSModuleManager_')!==false) {
							$fileContent = file_get_contents(IPS_GetKernelDir().'\\logs\\'.$file);
							$lines = explode(PHP_EOL, $fileContent);
							$line1 = '';
							$line2 = '';
							if (count($lines)>0) {
								$line1 = $lines[0];
							}
							if (count($lines)>1) {
								$line2 = $lines[1];
							}

							// Found LogFile for Module
							if (   strpos($line1,'Set Version '.$module.'=')!==false
							    or strpos($line2,''.$module.'_FileList.ini')!==false) {
								//echo 'found '.$module; //return;

								// Search Repository
								foreach ($lines as $idx=>$line) {

									// Found Repository
									if (strpos($line,' --> '.IPS_GetKernelDir().'scripts\\IPSLibrary\\install\\DownloadListFiles\\'.$module.'_FileList.ini')!==false) {
										$start = strpos($line,'Copy ')+5;
										$end   = strpos($line,'IPSLibrary',strpos($line,'IPSLibrary')+1);
										$repository = substr($line, $start, $end-$start);
										break;
									}
								}
							}
						}
					}
					$moduleManager->LogHandler()->Debug('Add Last Repository: '.$module.'='.$repository);
					$versionHandler->SetModuleRepository($repository);
				}
				echo $module.'='.$repository.PHP_EOL;
			}
		}
	}
开发者ID:KOS-CH,项目名称:IPSLibrary,代码行数:64,代码来源:IPSModuleManager_Installation.ips.php


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