Class Component
Die Komponentenklasse stellt Methoden zur Verfügung, um Informationen der abgeleiteten Komponenten zu erhalten. Für den Zugriff auf eine Komponente muss die Instanz über Component::getInstance() geholt werden.
$component = \Alvine\Documentation\mycomponent\Component::getInstance();
Der Zugriff auf die Komponenten-Konfiguration erfolgt direkt über die Eigenschaften.
$component = \Alvine\Documentation\mycomponent\Component::getInstance(); // Projektspezifische Konfiguration einlesen $component->getConfiguration(\Alvine\IO\File\File('config.properties'));
Um Projektspezifische Konfigurationen zu verwenden, können die Konfigurations- werte überschrieben werden. Dies kann entweder über eine Datei oder ein Property-Objekt erfolgen.
$component = \Alvine\Documentation\mycomponent\Component::getInstance(); // Projektspezifische Konfiguration einlesen $component->loadCustomConfiguration(\Alvine\IO\File\File('config.properties')); // Alternativ über ein Property-Objekt $property = new \Alvine\Types\Properties(); $property->setValue('a.b.c', 'value1'); $property->setValue('a.b.d', 'value2'); $component->updateConfiguration($property);
- Alvine\Core\Alvine implements Serializable uses Alvine\Core\SerializableImplementation
- Alvine\Core\Component uses Alvine\Core\SingletonImplementation
Direct known subclasses
Alvine\Core\FrameworkNamespace: Alvine\Core
Package: Alvine\Core
Category: Framework
License: Licence
Author: schukai GmbH info@schukai.de
Version: Release: $Revision: 4039 $
Since: 20110904
Link: Alvine
Located at core/Component.class.php
protected
|
|
abstract protected
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
string
|
#
getVersion( )
Version in der Form major.minor.build ausgeben. Ist die Version in der Komponente nicht direkt gesetzt, so wird versucht diese aus dem Dateinamen der Phar-Datei zu ermitteln. Wird keine Version gefunden, so wird null zurückgegeben. |
public
string
|
|
public
|
|
public
|
#
updateConfigurationFromFile(
Anwendungsspezifische Konfiguration |
public
|
|
public
|
|
public
|
|
public
string
|
|
protected
|
|
public static
Alvine\Types\Collection<\Alvine\Core\Component>
|
|
public
[<\Alvine\Core\FrameworkException>]
|
__call(),
__clone(),
__get(),
__set(),
__toString(),
equals(),
getClass(),
getClone(),
getClosure(),
getHashCode(),
getID(),
getShortID(),
isCallable(),
isInstanceOf(),
propertyExists()
|
serialize(),
unserialize()
|
getInstance()
|
checkAndAdjustSerialisation(),
serialize(),
unserialize()
|
string |
REQUIRED_PHP_VERSION
Anforderungen und Grenzwerte an das System PHP-Version des Interpreters |
#
'5.6.0'
|
string |
VERSION_STABLE
Stabil |
#
'stable'
|
string |
VERSION_APLPHA
Entwicklungsversion |
#
'alpha'
|
string |
VERSION_BETA
Beta-Version |
#
'beta'
|
string |
VERSION_RC
Release Candidate |
#
'rc'
|
APIVERSION,
IDENTIFICATION,
SERIALVERSION,
VERSION
|
protected
Alvine\Application\Configuration\Properties
|
$configuration
Konfigurationswerte |
|
protected
null|string
|
$version
Version |
|
protected
string
|
$name
Name der Komponente |
|
protected
|
$ruleset
Regeln der Systemprüfung |
$hash,
$properties
|
$instances
|