blob: e00f259a3a3a5ea5a39b9b2e1ca20beb10162692 [file] [log] [blame]
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02001<?php
2
3namespace Adldap\Models;
4
5/**
6 * Class Computer.
7 *
8 * Represents an LDAP computer / server.
9 */
10class Computer extends Entry
11{
12 use Concerns\HasMemberOf;
13 use Concerns\HasDescription;
14 use Concerns\HasLastLogonAndLogOff;
15 use Concerns\HasUserAccountControl;
16 use Concerns\HasCriticalSystemObject;
17
18 /**
19 * Returns the computers operating system.
20 *
21 * @link https://msdn.microsoft.com/en-us/library/ms679076(v=vs.85).aspx
22 *
23 * @return string
24 */
25 public function getOperatingSystem()
26 {
27 return $this->getFirstAttribute($this->schema->operatingSystem());
28 }
29
30 /**
31 * Returns the computers operating system version.
32 *
33 * @link https://msdn.microsoft.com/en-us/library/ms679079(v=vs.85).aspx
34 *
35 * @return string
36 */
37 public function getOperatingSystemVersion()
38 {
39 return $this->getFirstAttribute($this->schema->operatingSystemVersion());
40 }
41
42 /**
43 * Returns the computers operating system service pack.
44 *
45 * @link https://msdn.microsoft.com/en-us/library/ms679078(v=vs.85).aspx
46 *
47 * @return string
48 */
49 public function getOperatingSystemServicePack()
50 {
51 return $this->getFirstAttribute($this->schema->operatingSystemServicePack());
52 }
53
54 /**
55 * Returns the computers DNS host name.
56 *
57 * @return string
58 */
59 public function getDnsHostName()
60 {
61 return $this->getFirstAttribute($this->schema->dnsHostName());
62 }
63
64 /**
65 * Returns the computers bad password time.
66 *
67 * @link https://msdn.microsoft.com/en-us/library/ms675243(v=vs.85).aspx
68 *
69 * @return int
70 */
71 public function getBadPasswordTime()
72 {
73 return $this->getFirstAttribute($this->schema->badPasswordTime());
74 }
75
76 /**
77 * Returns the computers account expiry date.
78 *
79 * @link https://msdn.microsoft.com/en-us/library/ms675098(v=vs.85).aspx
80 *
81 * @return int
82 */
83 public function getAccountExpiry()
84 {
85 return $this->getFirstAttribute($this->schema->accountExpires());
86 }
87}