xref: /plugin/pureldap/vendor/freedsx/ldap/src/FreeDSx/Ldap/Protocol/ProtocolElementInterface.php (revision dad993c57a70866aa1db59c43f043769c2eb7ed0)
10b3fd2d3SAndreas Gohr<?php
2*dad993c5SAndreas Gohr
30b3fd2d3SAndreas Gohr/**
40b3fd2d3SAndreas Gohr * This file is part of the FreeDSx LDAP package.
50b3fd2d3SAndreas Gohr *
60b3fd2d3SAndreas Gohr * (c) Chad Sikorra <Chad.Sikorra@gmail.com>
70b3fd2d3SAndreas Gohr *
80b3fd2d3SAndreas Gohr * For the full copyright and license information, please view the LICENSE
90b3fd2d3SAndreas Gohr * file that was distributed with this source code.
100b3fd2d3SAndreas Gohr */
110b3fd2d3SAndreas Gohr
120b3fd2d3SAndreas Gohrnamespace FreeDSx\Ldap\Protocol;
130b3fd2d3SAndreas Gohr
140b3fd2d3SAndreas Gohruse FreeDSx\Asn1\Type\AbstractType;
15*dad993c5SAndreas Gohruse FreeDSx\Ldap\Exception\ProtocolException;
160b3fd2d3SAndreas Gohr
170b3fd2d3SAndreas Gohr/**
180b3fd2d3SAndreas Gohr * Methods needed to transform an object to/from ASN1 representation.
190b3fd2d3SAndreas Gohr *
200b3fd2d3SAndreas Gohr * @author Chad Sikorra <Chad.Sikorra@gmail.com>
210b3fd2d3SAndreas Gohr */
220b3fd2d3SAndreas Gohrinterface ProtocolElementInterface
230b3fd2d3SAndreas Gohr{
240b3fd2d3SAndreas Gohr    /**
250b3fd2d3SAndreas Gohr     * Returns the Asn1 representation of an object that can be used by an encoder.
260b3fd2d3SAndreas Gohr     *
270b3fd2d3SAndreas Gohr     * @return AbstractType
280b3fd2d3SAndreas Gohr     */
290b3fd2d3SAndreas Gohr    public function toAsn1(): AbstractType;
300b3fd2d3SAndreas Gohr
310b3fd2d3SAndreas Gohr    /**
320b3fd2d3SAndreas Gohr     * @param AbstractType $type
330b3fd2d3SAndreas Gohr     * @return mixed
34*dad993c5SAndreas Gohr     * @throws ProtocolException
350b3fd2d3SAndreas Gohr     */
360b3fd2d3SAndreas Gohr    public static function fromAsn1(AbstractType $type);
370b3fd2d3SAndreas Gohr}
38