PHP Класс Adldap\Models\Model

Наследование: implements ArrayAcces\ArrayAccess, implements JsonSerializabl\JsonSerializable
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$dateFormat string Default format is suited for MySQL timestamps.
$exists boolean Indicates if the model exists.

Защищенные свойства (Protected)

Свойство Тип Описание
$attributes array Contains the models attributes.
$dn string The models distinguished name.
$modifications array Contains the models modifications.
$original array Contains the models original attributes.
$query Adldap\Query\Builder The current query builder instance.
$schema Adldap\Schemas\SchemaInterface The current LDAP attribute schema.
$timestampFormat string The format that is used to convert AD timestamps to unix timestamps.

Открытые методы

Метод Описание
__construct ( array $attributes, Builder $builder ) Constructor.
__get ( mixed $key ) : boolean Dynamically retrieve attributes on the object.
__set ( mixed $key, mixed $value ) Dynamically set attributes on the object.
addModification ( BatchModification $modification ) Adds a modification to the models modifications array.
countAttributes ( ) : integer Returns the number of attributes inside the attributes property.
create ( ) : boolean Creates the entry in LDAP.
createAttribute ( string $attribute, mixed $value ) : boolean Creates an attribute on the current model.
delete ( ) : boolean Deletes the current entry.
deleteAttribute ( string $attribute ) : boolean Deletes an attribute on the current entry.
fill ( array $attributes = [] ) Fills the entry with the supplied attributes.
filterRawAttributes ( array $attributes = [], array | string $keys = ['count'] ) : array Filters the count key recursively from raw LDAP attributes.
getAttribute ( integer | string $key, integer | string $subKey = null ) : mixed Returns the models attribute with the specified key.
getAttributes ( ) : array Returns all of the models attributes.
getCommonName ( ) : string Returns the model's common name.
getDirty ( ) : array Get the attributes that have been changed since last sync.
getDistinguishedName ( ) : string | null Returns the model's distinguished name string.
getDn ( ) : string | null Returns the model's distinguished name string.
getDnBuilder ( ) : DistinguishedName Returns a DistinguishedName object for modifying the current models DN.
getFirstAttribute ( string $key ) : mixed Returns the first attribute by the specified key.
getModifications ( ) : array Sets and returns the models modifications.
getNewDnBuilder ( string $baseDn = '' ) : DistinguishedName Returns a new DistinguishedName object for building onto.
getOriginal ( ) : array Returns the models original attributes.
getQuery ( ) : Builder Returns the current query builder.
getSchema ( ) : Adldap\Schemas\SchemaInterface Returns the current model schema.
hasAttribute ( integer | string $key, integer | string $subKey = null ) : boolean Returns true / false if the specified attribute exists in the attributes array.
jsonSerialize ( ) : array Convert the object into something JSON serializable.
move ( string $rdn, string | null $newParentDn = null, boolean | true $deleteOldRdn = true ) : boolean Moves the current model to a new RDN and new parent.
newCollection ( mixed $items = [] ) : Collection Returns a new collection with the specified items.
newQuery ( ) : Builder Returns a new query builder instance.
offsetExists ( string $offset ) : boolean Determine if the given offset exists.
offsetGet ( string $offset ) : mixed Get the value for a given offset.
offsetSet ( string $offset, mixed $value ) : void Set the value at the given offset.
offsetUnset ( string $offset ) : void Unset the value at the given offset.
rename ( string $rdn ) : boolean Alias for the move method.
save ( ) : boolean Saves the changes to LDAP and returns the results.
setAttribute ( integer | string $key, mixed $value, integer | string $subKey = null ) Sets an attributes value by the specified key and sub-key.
setCommonName ( string $name ) Sets the model's common name.
setDistinguishedName ( string | DistinguishedName $dn ) Sets the model's distinguished name attribute.
setDn ( string $dn ) Sets the model's distinguished name attribute.
setFirstAttribute ( integer | string $key, mixed $value ) Sets the first attributes value by the specified key.
setModifications ( array $modifications = [] ) Sets the models modifications array.
setQuery ( Builder $builder ) Sets the current query builder.
setRawAttributes ( array $attributes = [] ) Sets the attributes property.
setSchema ( Adldap\Schemas\SchemaInterface $schema ) Sets the current model schema.
syncOriginal ( ) Synchronizes the models original attributes with the model's current attributes.
syncRaw ( ) : boolean Synchronizes the models attributes with the server values.
update ( ) : boolean Updates the model.
updateAttribute ( string $attribute, mixed $value ) : boolean Updates the specified attribute with the specified value.

Защищенные методы

Метод Описание
convertStringToBool ( string $bool ) : null | boolean Converts the inserted string boolean to a PHP boolean.
normalizeAttributeKey ( string $key ) : string Returns a normalized attribute key.
originalIsNumericallyEquivalent ( string $key ) : boolean Determine if the new and old values for a given key are numerically equivalent.

Описание методов

__construct() публичный метод

Constructor.
public __construct ( array $attributes, Builder $builder )
$attributes array
$builder Adldap\Query\Builder

__get() публичный метод

Dynamically retrieve attributes on the object.
public __get ( mixed $key ) : boolean
$key mixed
Результат boolean

__set() публичный метод

Dynamically set attributes on the object.
public __set ( mixed $key, mixed $value )
$key mixed
$value mixed

addModification() публичный метод

Adds a modification to the models modifications array.
public addModification ( BatchModification $modification )
$modification Adldap\Objects\BatchModification

convertStringToBool() защищенный метод

Converts the inserted string boolean to a PHP boolean.
protected convertStringToBool ( string $bool ) : null | boolean
$bool string
Результат null | boolean

countAttributes() публичный метод

Returns the number of attributes inside the attributes property.
public countAttributes ( ) : integer
Результат integer

create() публичный метод

Creates the entry in LDAP.
public create ( ) : boolean
Результат boolean

createAttribute() публичный метод

Creates an attribute on the current model.
public createAttribute ( string $attribute, mixed $value ) : boolean
$attribute string
$value mixed
Результат boolean

delete() публичный метод

Deletes the current entry.
public delete ( ) : boolean
Результат boolean

deleteAttribute() публичный метод

Deletes an attribute on the current entry.
public deleteAttribute ( string $attribute ) : boolean
$attribute string
Результат boolean

fill() публичный метод

Fills the entry with the supplied attributes.
public fill ( array $attributes = [] )
$attributes array

filterRawAttributes() публичный метод

Filters the count key recursively from raw LDAP attributes.
public filterRawAttributes ( array $attributes = [], array | string $keys = ['count'] ) : array
$attributes array
$keys array | string
Результат array

getAttribute() публичный метод

If a sub-key is specified, it will try and retrieve it from the parent keys array.
public getAttribute ( integer | string $key, integer | string $subKey = null ) : mixed
$key integer | string
$subKey integer | string
Результат mixed

getAttributes() публичный метод

Returns all of the models attributes.
public getAttributes ( ) : array
Результат array

getCommonName() публичный метод

https://msdn.microsoft.com/en-us/library/ms675449(v=vs.85).aspx
public getCommonName ( ) : string
Результат string

getDirty() публичный метод

Get the attributes that have been changed since last sync.
public getDirty ( ) : array
Результат array

getDistinguishedName() публичный метод

https://msdn.microsoft.com/en-us/library/aa366101(v=vs.85).aspx
public getDistinguishedName ( ) : string | null
Результат string | null

getDn() публичный метод

(Alias for getDistinguishedName()) https://msdn.microsoft.com/en-us/library/aa366101(v=vs.85).aspx
public getDn ( ) : string | null
Результат string | null

getDnBuilder() публичный метод

Returns a DistinguishedName object for modifying the current models DN.
public getDnBuilder ( ) : DistinguishedName
Результат Adldap\Objects\DistinguishedName

getFirstAttribute() публичный метод

Returns the first attribute by the specified key.
public getFirstAttribute ( string $key ) : mixed
$key string
Результат mixed

getModifications() публичный метод

Sets and returns the models modifications.
public getModifications ( ) : array
Результат array

getNewDnBuilder() публичный метод

Returns a new DistinguishedName object for building onto.
public getNewDnBuilder ( string $baseDn = '' ) : DistinguishedName
$baseDn string
Результат Adldap\Objects\DistinguishedName

getOriginal() публичный метод

Returns the models original attributes.
public getOriginal ( ) : array
Результат array

getQuery() публичный метод

Returns the current query builder.
public getQuery ( ) : Builder
Результат Adldap\Query\Builder

getSchema() публичный метод

Returns the current model schema.
public getSchema ( ) : Adldap\Schemas\SchemaInterface
Результат Adldap\Schemas\SchemaInterface

hasAttribute() публичный метод

Returns true / false if the specified attribute exists in the attributes array.
public hasAttribute ( integer | string $key, integer | string $subKey = null ) : boolean
$key integer | string
$subKey integer | string
Результат boolean

jsonSerialize() публичный метод

Convert the object into something JSON serializable.
public jsonSerialize ( ) : array
Результат array

move() публичный метод

Moves the current model to a new RDN and new parent.
public move ( string $rdn, string | null $newParentDn = null, boolean | true $deleteOldRdn = true ) : boolean
$rdn string
$newParentDn string | null
$deleteOldRdn boolean | true
Результат boolean

newCollection() публичный метод

Returns a new collection with the specified items.
public newCollection ( mixed $items = [] ) : Collection
$items mixed
Результат Illuminate\Support\Collection

newQuery() публичный метод

Returns a new query builder instance.
public newQuery ( ) : Builder
Результат Adldap\Query\Builder

normalizeAttributeKey() защищенный метод

Returns a normalized attribute key.
protected normalizeAttributeKey ( string $key ) : string
$key string
Результат string

offsetExists() публичный метод

Determine if the given offset exists.
public offsetExists ( string $offset ) : boolean
$offset string
Результат boolean

offsetGet() публичный метод

Get the value for a given offset.
public offsetGet ( string $offset ) : mixed
$offset string
Результат mixed

offsetSet() публичный метод

Set the value at the given offset.
public offsetSet ( string $offset, mixed $value ) : void
$offset string
$value mixed
Результат void

offsetUnset() публичный метод

Unset the value at the given offset.
public offsetUnset ( string $offset ) : void
$offset string
Результат void

originalIsNumericallyEquivalent() защищенный метод

Determine if the new and old values for a given key are numerically equivalent.
protected originalIsNumericallyEquivalent ( string $key ) : boolean
$key string
Результат boolean

rename() публичный метод

Alias for the move method.
public rename ( string $rdn ) : boolean
$rdn string
Результат boolean

save() публичный метод

Saves the changes to LDAP and returns the results.
public save ( ) : boolean
Результат boolean

setAttribute() публичный метод

Sets an attributes value by the specified key and sub-key.
public setAttribute ( integer | string $key, mixed $value, integer | string $subKey = null )
$key integer | string
$value mixed
$subKey integer | string

setCommonName() публичный метод

Sets the model's common name.
public setCommonName ( string $name )
$name string

setDistinguishedName() публичный метод

Sets the model's distinguished name attribute.
public setDistinguishedName ( string | DistinguishedName $dn )
$dn string | Adldap\Objects\DistinguishedName

setDn() публичный метод

(Alias for setDistinguishedName())
public setDn ( string $dn )
$dn string

setFirstAttribute() публичный метод

Sets the first attributes value by the specified key.
public setFirstAttribute ( integer | string $key, mixed $value )
$key integer | string
$value mixed

setModifications() публичный метод

Sets the models modifications array.
public setModifications ( array $modifications = [] )
$modifications array

setQuery() публичный метод

Sets the current query builder.
public setQuery ( Builder $builder )
$builder Adldap\Query\Builder

setRawAttributes() публичный метод

Sets the attributes property.
public setRawAttributes ( array $attributes = [] )
$attributes array

setSchema() публичный метод

Sets the current model schema.
public setSchema ( Adldap\Schemas\SchemaInterface $schema )
$schema Adldap\Schemas\SchemaInterface

syncOriginal() публичный метод

Synchronizes the models original attributes with the model's current attributes.
public syncOriginal ( )

syncRaw() публичный метод

Synchronizes the models attributes with the server values.
public syncRaw ( ) : boolean
Результат boolean

update() публичный метод

Updates the model.
public update ( ) : boolean
Результат boolean

updateAttribute() публичный метод

Updates the specified attribute with the specified value.
public updateAttribute ( string $attribute, mixed $value ) : boolean
$attribute string
$value mixed
Результат boolean

Описание свойств

$attributes защищенное свойство

Contains the models attributes.
protected array $attributes
Результат array

$dateFormat публичное свойство

Default format is suited for MySQL timestamps.
public string $dateFormat
Результат string

$dn защищенное свойство

The models distinguished name.
protected string $dn
Результат string

$exists публичное свойство

Indicates if the model exists.
public bool $exists
Результат boolean

$modifications защищенное свойство

Contains the models modifications.
protected array $modifications
Результат array

$original защищенное свойство

Contains the models original attributes.
protected array $original
Результат array

$query защищенное свойство

The current query builder instance.
protected Builder,Adldap\Query $query
Результат Adldap\Query\Builder

$schema защищенное свойство

The current LDAP attribute schema.
protected SchemaInterface,Adldap\Schemas $schema
Результат Adldap\Schemas\SchemaInterface

$timestampFormat защищенное свойство

The format that is used to convert AD timestamps to unix timestamps.
protected string $timestampFormat
Результат string