Start of using Attribute objects, rendering jpegphoto

This commit is contained in:
Deon George
2021-12-08 23:26:12 +11:00
parent 2ccc1d3b83
commit a80a2725bc
10 changed files with 147 additions and 99 deletions

View File

@@ -8,6 +8,8 @@ use LdapRecord\Models\Model;
use LdapRecord\Models\ModelNotFoundException;
use LdapRecord\Query\Model\Builder;
use App\Classes\LDAP\Attribute\Factory;
class Entry extends Model
{
/**
@@ -43,6 +45,16 @@ class Entry extends Model
return $result;
}
public function getAttributes(): array
{
$result = collect();
foreach (parent::getAttributes() as $attribute => $value) {
$result->put($attribute,Factory::create($attribute,$value));
}
return $result->toArray();
}
/**
* Return an icon for a DN based on objectClass
*