Submit
Path:
~
/
/
proc
/
self
/
root
/
opt
/
psa
/
admin
/
plib
/
modules
/
letsencrypt
/
vendor
/
aws
/
aws-crt-php
/
src
/
AWS
/
CRT
/
File Content:
NativeResource.php
<?php /** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ namespace PleskLetsEncrypt\AWS\CRT; use PleskLetsEncrypt\AWS\CRT\CRT as CRT; /** * Base class for all native resources, tracks all outstanding resources * and provides basic leak checking */ abstract class NativeResource { protected static $crt = null; protected static $resources = []; protected $native = null; protected function __construct() { if (\is_null(self::$crt)) { self::$crt = new CRT(); } self::$resources[\spl_object_hash($this)] = 1; } protected function acquire($handle) { return $this->native = $handle; } protected function release() { $native = $this->native; $this->native = null; return $native; } function __destruct() { // Should have been destroyed and released by derived resource \assert($this->native == null); unset(self::$resources[\spl_object_hash($this)]); } }
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
Auth
---
0755
HTTP
---
0755
IO
---
0755
Internal
---
0755
CRT.php
13486 bytes
0644
Log.php
1101 bytes
0644
NativeResource.php
1073 bytes
0644
Options.php
1796 bytes
0644
N4ST4R_ID | Naxtarrr