Initial Commit
This commit is contained in:
39
dependencies/daverandom/libdns/src/Decoder/DecodingContextFactory.php
vendored
Normal file
39
dependencies/daverandom/libdns/src/Decoder/DecodingContextFactory.php
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
/**
|
||||
* Creates DecodingContext objects
|
||||
*
|
||||
* PHP version 5.4
|
||||
*
|
||||
* @category LibDNS
|
||||
* @package Decoder
|
||||
* @author Chris Wright <https://github.com/DaveRandom>
|
||||
* @copyright Copyright (c) Chris Wright <https://github.com/DaveRandom>
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @version 2.0.0
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\LibDNS\Decoder;
|
||||
|
||||
use WP_Ultimo\Dependencies\LibDNS\Packets\Packet;
|
||||
use WP_Ultimo\Dependencies\LibDNS\Packets\LabelRegistry;
|
||||
/**
|
||||
* Creates DecodingContext objects
|
||||
*
|
||||
* @category LibDNS
|
||||
* @package Decoder
|
||||
* @author Chris Wright <https://github.com/DaveRandom>
|
||||
*/
|
||||
class DecodingContextFactory
|
||||
{
|
||||
/**
|
||||
* Create a new DecodingContext object
|
||||
*
|
||||
* @param \LibDNS\Packets\Packet $packet The packet to be decoded
|
||||
* @return \LibDNS\Decoder\DecodingContext
|
||||
*/
|
||||
public function create(Packet $packet) : DecodingContext
|
||||
{
|
||||
return new DecodingContext($packet, new LabelRegistry());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user