1
0
mirror of https://github.com/php/doc-de.git synced 2026-03-24 07:12:15 +01:00
Files
archived-doc-de/reference/datetime/datetimeimmutable/createfrominterface.xml
Martin Samesch 5cf6de8b59 Sync with EN
2025-12-10 13:54:49 +01:00

85 lines
2.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 3a8c3e77df070a046c9d5b56b68926ca2d7e5ee3 Maintainer: samesch Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="datetimeimmutable.createfrominterface" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>DateTimeImmutable::createFromInterface</refname>
<refpurpose>Liefert ein neues DateTimeImmutable-Objekt, das das angegebene DateTimeInterface-Objekt kapselt</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="DateTimeImmutable">
<modifier>public</modifier> <modifier>static</modifier> <type>DateTimeImmutable</type><methodname>DateTimeImmutable::createFromInterface</methodname>
<methodparam><type>DateTimeInterface</type><parameter>object</parameter></methodparam>
</methodsynopsis>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>object</parameter></term>
<listitem>
<para>
Das <classname>DateTimeInterface</classname>-Objekt, das in eine
nicht veränderbare Version konvertiert werden soll. Dieses Objekt wird
nicht verändert, sondern es wird ein neues
<classname>DateTimeImmutable</classname>-Objekt erstellt, das dieselben
Informationen über Datum, Uhrzeit und Zeitzone enthält.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Gibt eine neue <classname>DateTimeImmutable</classname>-Instanz zurück.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Erstellen eines unveränderbaren DateTime-Objekts</title>
<programlisting role="php" annotations="non-interactive">
<![CDATA[
<?php
$date = new DateTime("2014-06-20 11:45 Europe/London");
$immutable = DateTimeImmutable::createFromInterface($date);
$date = new DateTimeImmutable("2014-06-20 11:45 Europe/London");
$also_immutable = DateTimeImmutable::createFromInterface($date);
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->