Skip to content

Commit 92e5afd

Browse files
committed
Improved caching of schema
1 parent 8ec1d2b commit 92e5afd

File tree

2 files changed

+195
-183
lines changed

2 files changed

+195
-183
lines changed

app/Classes/LDAP/Schema/ObjectClass.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Illuminate\Support\Collection;
66
use Illuminate\Support\Facades\Log;
7-
use LdapRecord\Connection;
87

98
use App\Classes\LDAP\Server;
109
use App\Exceptions\InvalidUsage;
@@ -19,7 +18,6 @@
1918
class ObjectClass extends Base {
2019
// The server ID that this objectclass belongs to.
2120
private Server $server;
22-
private Connection $connection;
2321

2422
// Array of objectClass names from which this objectClass inherits
2523
private Collection $sup_classes;
@@ -51,7 +49,7 @@ class ObjectClass extends Base {
5149
*
5250
* eg: ( 2.5.6.0 NAME 'top' DESC 'top of the superclass chain' ABSTRACT MUST objectClass )
5351
*/
54-
public function __construct(string $line,Entry $entry,Server $server)
52+
public function __construct(string $line,Server $server)
5553
{
5654
parent::__construct($line);
5755

@@ -60,7 +58,6 @@ public function __construct(string $line,Entry $entry,Server $server)
6058
$strings = preg_split('/[\s,]+/',$line,-1,PREG_SPLIT_DELIM_CAPTURE);
6159

6260
// Init
63-
$this->connection = $entry->getConnection();
6461
$this->server = $server;
6562
$this->may_attrs = collect();
6663
$this->may_force = collect();

0 commit comments

Comments
 (0)