PHP 클래스 Adldap\Query\Builder

파일 보기 프로젝트 열기: adldap2/adldap2 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$paginated boolean Determines whether the current query is paginated.

보호된 프로퍼티들

프로퍼티 타입 설명
$bindings array The query bindings.
$connection Adldap\Connections\ConnectionInterface The current connection instance.
$dn string | null The distinguished name to perform searches upon.
$grammar Grammar The current grammar instance.
$raw boolean Determines whether or not to return LDAP results in their raw array format.
$read boolean Determines whether or not to search LDAP on the base scope.
$recursive boolean Determines whether or not to search LDAP recursively.
$schema Adldap\Schemas\SchemaInterface The current schema instance.
$sortByDirection string The direction to sort the results by.
$sortByField string The field to sort search results by.
$sortByFlags integer The sort flags for sorting query results.

공개 메소드들

메소드 설명
__call ( string $method, array $parameters ) : mixed Handle dynamic method calls on the query builder object to be directed to the query processor.
__construct ( Adldap\Connections\ConnectionInterface $connection, Grammar $grammar, Adldap\Schemas\SchemaInterface $schema = null ) Constructor.
addBinding ( Adldap\Query\Bindings\AbstractBinding $value, string $type = 'where' ) : Builder Adds a binding to the current query.
clearBindings ( ) : Builder Clears all query bindings.
dynamicWhere ( string $method, string $parameters ) Handles dynamic "where" clauses to the query.
find ( string $anr, array | string $columns = [] ) : mixed Finds a record using ambiguous name resolution.
findBaseDn ( ) : string | boolean Finds the Base DN of your domain controller.
findBy ( string $attribute, string $value, array | string $columns = [] ) : mixed Finds a record by the specified attribute and value.
findByDn ( string | array $dn, array | string $columns = [] ) : boolean | Model Finds a record by its distinguished name.
findByDnOrFail ( string $dn, array | string $columns = [] ) : Model Finds a record by its distinguished name.
findByOrFail ( string $attribute, string $value, array | string $columns = [] ) : mixed Finds a record by the specified attribute and value.
findBySid ( string $sid, array | string $columns = [] ) : mixed Finds a record by its Object SID.
findMany ( array $anrs = [], array $columns = [] ) : mixed Finds multiple records using ambiguous name resolution.
findManyBy ( string $attribute, array $values = [], array $columns = [] ) : mixed Finds many records by the specified attribute.
findOrFail ( string $anr, array | string $columns = [] ) : mixed Finds a record using ambiguous name resolution. If a record is not found, an exception is thrown.
first ( array | string $columns = [] ) : Model | array | null Returns the first entry in a search result.
firstOrFail ( array | string $columns = [] ) : Model Returns the first entry in a search result.
get ( ) : Collection | array Returns the current query.
getBindings ( ) : array Returns all of the query builder bindings.
getConnection ( ) : Adldap\Connections\ConnectionInterface Returns the current Connection instance.
getDn ( ) : string Returns the builders DN to perform searches upon.
getFilters ( ) : array Returns the filters on the current builder.
getGrammar ( ) : Grammar Returns the current Grammar instance.
getOrWheres ( ) : array Returns the or wheres on the current builder.
getQuery ( ) : string Compiles and returns the current query string.
getSchema ( ) : Adldap\Schemas\SchemaInterface Returns the current schema.
getSelects ( ) : array Returns the current selected fields to retrieve.
getSortByDirection ( ) : string Returns the query builders sort by direction.
getSortByField ( ) : string Returns the query builders sort by field.
getSortByFlags ( ) : integer Returns the query builders sort by flags.
getUnescapedQuery ( ) : string Returns the unescaped query.
getWheres ( ) : array Returns the wheres on the current builder.
hasSelects ( ) : boolean Returns true / false depending if the current object contains selects.
in ( string $dn ) : Builder Alias for setting the base DN of the query.
isPaginated ( ) : boolean Returns bool that determines whether the current query builder will return paginated results.
isRaw ( ) : boolean Returns bool that determines whether the current query builder will return raw results.
isSorted ( ) : boolean Returns bool that determines whether the current query builder will return sorted results.
newInstance ( ) : Builder Returns a new Query Builder instance.
orWhere ( string $field, string | null $operator = null, string | null $value = null ) : Builder Adds an or where clause to the current query.
orWhereApproximatelyEquals ( string $field, string $value ) : Builder Adds a or where approximately equals clause to the current query.
orWhereContains ( string $field, string $value ) : Builder Adds an or where contains clause to the current query.
orWhereEndsWith ( string $field, string $value ) : Builder Adds an or where ends with clause to the current query.
orWhereEquals ( string $field, string $value ) : Builder Adds an or where equals clause to the current query.
orWhereHas ( string $field ) : Builder Adds an or where has clause to the current query.
orWhereNotContains ( string $field, string $value ) : Builder Adds an or where *not* contains clause to the current query.
orWhereNotEndsWith ( string $field, string $value ) : Builder Adds an or where *not* ends with clause to the current query.
orWhereNotHas ( string $field ) : Builder Adds a where not has clause to the current query.
orWhereNotStartsWith ( string $field, string $value ) : Builder Adds an or where *not* starts with clause to the current query.
orWhereStartsWith ( string $field, string $value ) : Builder Adds an or where starts with clause to the current query.
paginate ( integer $perPage = 50, integer $currentPage, boolean $isCritical = true ) : Paginator | boolean Paginates the current LDAP query.
query ( string $query ) : Collection | array Performs the specified query on the current LDAP connection.
raw ( boolean $raw = true ) : Builder Sets the recursive property to tell the search whether or not to return the LDAP results in their raw format.
rawFilter ( array | string $filters = [] ) : Builder Adds a raw filter to the current query.
read ( boolean $read = true ) : Builder Sets the recursive property to tell the search whether or not to search on the base scope and return a single entry.
recursive ( boolean $recursive = true ) : Builder Sets the recursive property to tell the search whether or not to search recursively.
select ( array | string $fields = [] ) : Builder Adds the inserted fields to query on the current LDAP connection.
setConnection ( Adldap\Connections\ConnectionInterface $connection ) : Builder Sets the current connection.
setDn ( string | null $dn = null ) : Builder Sets the DN to perform searches upon.
setGrammar ( Grammar $grammar ) : Builder Sets the current filter grammar.
setSchema ( Adldap\Schemas\SchemaInterface $schema = null ) : Builder Sets the current schema.
sortBy ( string $field, string $direction = 'asc', integer | null $flags = null ) : Builder Sorts the LDAP search results by the specified field and direction.
where ( string | array $field, string $operator = null, string $value = null, string $type = 'and' ) : Builder Adds a where clause to the current query.
whereApproximatelyEquals ( string $field, string $value ) : Builder Adds a where approximately equals clause to the current query.
whereContains ( string $field, string $value ) : Builder Adds a where contains clause to the current query.
whereDisabled ( ) : Builder Adds a disabled filter to the current query.
whereEnabled ( ) : Builder Adds a enabled filter to the current query.
whereEndsWith ( string $field, string $value ) : Builder Adds a where ends with clause to the current query.
whereEquals ( string $field, string $value ) : Builder Adds a where equals clause to the current query.
whereHas ( string $field ) : Builder Adds a where has clause to the current query.
whereNotContains ( string $field, string $value ) : Builder Adds a where contains clause to the current query.
whereNotHas ( string $field ) : Builder Adds a where not has clause to the current query.
whereNotStartsWith ( string $field, string $value ) : Builder Adds a where *not* starts with clause to the current query.
whereStartsWith ( string $field, string $value ) : Builder Adds a where starts with clause to the current query.

보호된 메소드들

메소드 설명
addDynamic ( string $segment, string $connector, array $parameters, integer $index ) : void Add a single dynamic where clause statement to the query.
newProcessor ( ) : Processor Returns a new query Processor instance.
newWhereBinding ( string $field, string $operator, string | null $value = null, string $type = 'and' ) : Where | Adldap\Query\Bindings\OrWhere Constructs a new where binding depending on the specified type.

메소드 상세

__call() 공개 메소드

Handle dynamic method calls on the query builder object to be directed to the query processor.
public __call ( string $method, array $parameters ) : mixed
$method string
$parameters array
리턴 mixed

__construct() 공개 메소드

Constructor.
public __construct ( Adldap\Connections\ConnectionInterface $connection, Grammar $grammar, Adldap\Schemas\SchemaInterface $schema = null )
$connection Adldap\Connections\ConnectionInterface
$grammar Grammar
$schema Adldap\Schemas\SchemaInterface

addBinding() 공개 메소드

Adds a binding to the current query.
public addBinding ( Adldap\Query\Bindings\AbstractBinding $value, string $type = 'where' ) : Builder
$value Adldap\Query\Bindings\AbstractBinding
$type string
리턴 Builder

addDynamic() 보호된 메소드

Add a single dynamic where clause statement to the query.
protected addDynamic ( string $segment, string $connector, array $parameters, integer $index ) : void
$segment string
$connector string
$parameters array
$index integer
리턴 void

clearBindings() 공개 메소드

Clears all query bindings.
public clearBindings ( ) : Builder
리턴 Builder

dynamicWhere() 공개 메소드

Handles dynamic "where" clauses to the query.
public dynamicWhere ( string $method, string $parameters )
$method string
$parameters string

find() 공개 메소드

Finds a record using ambiguous name resolution.
public find ( string $anr, array | string $columns = [] ) : mixed
$anr string
$columns array | string
리턴 mixed

findBaseDn() 공개 메소드

Finds the Base DN of your domain controller.
public findBaseDn ( ) : string | boolean
리턴 string | boolean

findBy() 공개 메소드

Finds a record by the specified attribute and value.
public findBy ( string $attribute, string $value, array | string $columns = [] ) : mixed
$attribute string
$value string
$columns array | string
리턴 mixed

findByDn() 공개 메소드

Finds a record by its distinguished name.
public findByDn ( string | array $dn, array | string $columns = [] ) : boolean | Model
$dn string | array
$columns array | string
리턴 boolean | Adldap\Models\Model

findByDnOrFail() 공개 메소드

Fails upon no records returned.
public findByDnOrFail ( string $dn, array | string $columns = [] ) : Model
$dn string
$columns array | string
리턴 Adldap\Models\Model

findByOrFail() 공개 메소드

If no record is found an exception is thrown.
public findByOrFail ( string $attribute, string $value, array | string $columns = [] ) : mixed
$attribute string
$value string
$columns array | string
리턴 mixed

findBySid() 공개 메소드

Finds a record by its Object SID.
public findBySid ( string $sid, array | string $columns = [] ) : mixed
$sid string
$columns array | string
리턴 mixed

findMany() 공개 메소드

Finds multiple records using ambiguous name resolution.
public findMany ( array $anrs = [], array $columns = [] ) : mixed
$anrs array
$columns array
리턴 mixed

findManyBy() 공개 메소드

Finds many records by the specified attribute.
public findManyBy ( string $attribute, array $values = [], array $columns = [] ) : mixed
$attribute string
$values array
$columns array
리턴 mixed

findOrFail() 공개 메소드

Finds a record using ambiguous name resolution. If a record is not found, an exception is thrown.
public findOrFail ( string $anr, array | string $columns = [] ) : mixed
$anr string
$columns array | string
리턴 mixed

first() 공개 메소드

Returns the first entry in a search result.
public first ( array | string $columns = [] ) : Model | array | null
$columns array | string
리턴 Adldap\Models\Model | array | null

firstOrFail() 공개 메소드

If no entry is found, an exception is thrown.
public firstOrFail ( array | string $columns = [] ) : Model
$columns array | string
리턴 Adldap\Models\Model

get() 공개 메소드

Returns the current query.
public get ( ) : Collection | array
리턴 Illuminate\Support\Collection | array

getBindings() 공개 메소드

Returns all of the query builder bindings.
public getBindings ( ) : array
리턴 array

getConnection() 공개 메소드

Returns the current Connection instance.
public getConnection ( ) : Adldap\Connections\ConnectionInterface
리턴 Adldap\Connections\ConnectionInterface

getDn() 공개 메소드

Returns the builders DN to perform searches upon.
public getDn ( ) : string
리턴 string

getFilters() 공개 메소드

Returns the filters on the current builder.
public getFilters ( ) : array
리턴 array

getGrammar() 공개 메소드

Returns the current Grammar instance.
public getGrammar ( ) : Grammar
리턴 Grammar

getOrWheres() 공개 메소드

Returns the or wheres on the current builder.
public getOrWheres ( ) : array
리턴 array

getQuery() 공개 메소드

Compiles and returns the current query string.
public getQuery ( ) : string
리턴 string

getSchema() 공개 메소드

Returns the current schema.
public getSchema ( ) : Adldap\Schemas\SchemaInterface
리턴 Adldap\Schemas\SchemaInterface

getSelects() 공개 메소드

Returns the current selected fields to retrieve.
public getSelects ( ) : array
리턴 array

getSortByDirection() 공개 메소드

Returns the query builders sort by direction.
public getSortByDirection ( ) : string
리턴 string

getSortByField() 공개 메소드

Returns the query builders sort by field.
public getSortByField ( ) : string
리턴 string

getSortByFlags() 공개 메소드

Returns the query builders sort by flags.
public getSortByFlags ( ) : integer
리턴 integer

getUnescapedQuery() 공개 메소드

Returns the unescaped query.
public getUnescapedQuery ( ) : string
리턴 string

getWheres() 공개 메소드

Returns the wheres on the current builder.
public getWheres ( ) : array
리턴 array

hasSelects() 공개 메소드

Returns true / false depending if the current object contains selects.
public hasSelects ( ) : boolean
리턴 boolean

in() 공개 메소드

Alias for setting the base DN of the query.
public in ( string $dn ) : Builder
$dn string
리턴 Builder

isPaginated() 공개 메소드

Returns bool that determines whether the current query builder will return paginated results.
public isPaginated ( ) : boolean
리턴 boolean

isRaw() 공개 메소드

Returns bool that determines whether the current query builder will return raw results.
public isRaw ( ) : boolean
리턴 boolean

isSorted() 공개 메소드

Returns bool that determines whether the current query builder will return sorted results.
public isSorted ( ) : boolean
리턴 boolean

newInstance() 공개 메소드

Returns a new Query Builder instance.
public newInstance ( ) : Builder
리턴 Builder

newProcessor() 보호된 메소드

Returns a new query Processor instance.
protected newProcessor ( ) : Processor
리턴 Processor

newWhereBinding() 보호된 메소드

Constructs a new where binding depending on the specified type.
protected newWhereBinding ( string $field, string $operator, string | null $value = null, string $type = 'and' ) : Where | Adldap\Query\Bindings\OrWhere
$field string
$operator string
$value string | null
$type string
리턴 Adldap\Query\Bindings\Where | Adldap\Query\Bindings\OrWhere

orWhere() 공개 메소드

Adds an or where clause to the current query.
public orWhere ( string $field, string | null $operator = null, string | null $value = null ) : Builder
$field string
$operator string | null
$value string | null
리턴 Builder

orWhereApproximatelyEquals() 공개 메소드

Adds a or where approximately equals clause to the current query.
public orWhereApproximatelyEquals ( string $field, string $value ) : Builder
$field string
$value string
리턴 Builder

orWhereContains() 공개 메소드

Adds an or where contains clause to the current query.
public orWhereContains ( string $field, string $value ) : Builder
$field string
$value string
리턴 Builder

orWhereEndsWith() 공개 메소드

Adds an or where ends with clause to the current query.
public orWhereEndsWith ( string $field, string $value ) : Builder
$field string
$value string
리턴 Builder

orWhereEquals() 공개 메소드

Adds an or where equals clause to the current query.
public orWhereEquals ( string $field, string $value ) : Builder
$field string
$value string
리턴 Builder

orWhereHas() 공개 메소드

Adds an or where has clause to the current query.
public orWhereHas ( string $field ) : Builder
$field string
리턴 Builder

orWhereNotContains() 공개 메소드

Adds an or where *not* contains clause to the current query.
public orWhereNotContains ( string $field, string $value ) : Builder
$field string
$value string
리턴 Builder

orWhereNotEndsWith() 공개 메소드

Adds an or where *not* ends with clause to the current query.
public orWhereNotEndsWith ( string $field, string $value ) : Builder
$field string
$value string
리턴 Builder

orWhereNotHas() 공개 메소드

Adds a where not has clause to the current query.
public orWhereNotHas ( string $field ) : Builder
$field string
리턴 Builder

orWhereNotStartsWith() 공개 메소드

Adds an or where *not* starts with clause to the current query.
public orWhereNotStartsWith ( string $field, string $value ) : Builder
$field string
$value string
리턴 Builder

orWhereStartsWith() 공개 메소드

Adds an or where starts with clause to the current query.
public orWhereStartsWith ( string $field, string $value ) : Builder
$field string
$value string
리턴 Builder

paginate() 공개 메소드

Paginates the current LDAP query.
public paginate ( integer $perPage = 50, integer $currentPage, boolean $isCritical = true ) : Paginator | boolean
$perPage integer
$currentPage integer
$isCritical boolean
리턴 Adldap\Objects\Paginator | boolean

query() 공개 메소드

Performs the specified query on the current LDAP connection.
public query ( string $query ) : Collection | array
$query string
리턴 Illuminate\Support\Collection | array

raw() 공개 메소드

Sets the recursive property to tell the search whether or not to return the LDAP results in their raw format.
public raw ( boolean $raw = true ) : Builder
$raw boolean
리턴 Builder

rawFilter() 공개 메소드

Adds a raw filter to the current query.
public rawFilter ( array | string $filters = [] ) : Builder
$filters array | string
리턴 Builder

read() 공개 메소드

Sets the recursive property to tell the search whether or not to search on the base scope and return a single entry.
public read ( boolean $read = true ) : Builder
$read boolean
리턴 Builder

recursive() 공개 메소드

Sets the recursive property to tell the search whether or not to search recursively.
public recursive ( boolean $recursive = true ) : Builder
$recursive boolean
리턴 Builder

select() 공개 메소드

Adds the inserted fields to query on the current LDAP connection.
public select ( array | string $fields = [] ) : Builder
$fields array | string
리턴 Builder

setConnection() 공개 메소드

Sets the current connection.
public setConnection ( Adldap\Connections\ConnectionInterface $connection ) : Builder
$connection Adldap\Connections\ConnectionInterface
리턴 Builder

setDn() 공개 메소드

Sets the DN to perform searches upon.
public setDn ( string | null $dn = null ) : Builder
$dn string | null
리턴 Builder

setGrammar() 공개 메소드

Sets the current filter grammar.
public setGrammar ( Grammar $grammar ) : Builder
$grammar Grammar
리턴 Builder

setSchema() 공개 메소드

Sets the current schema.
public setSchema ( Adldap\Schemas\SchemaInterface $schema = null ) : Builder
$schema Adldap\Schemas\SchemaInterface
리턴 Builder

sortBy() 공개 메소드

Sorts the LDAP search results by the specified field and direction.
public sortBy ( string $field, string $direction = 'asc', integer | null $flags = null ) : Builder
$field string
$direction string
$flags integer | null
리턴 Builder

where() 공개 메소드

Adds a where clause to the current query.
public where ( string | array $field, string $operator = null, string $value = null, string $type = 'and' ) : Builder
$field string | array
$operator string
$value string
$type string
리턴 Builder

whereApproximatelyEquals() 공개 메소드

Adds a where approximately equals clause to the current query.
public whereApproximatelyEquals ( string $field, string $value ) : Builder
$field string
$value string
리턴 Builder

whereContains() 공개 메소드

Adds a where contains clause to the current query.
public whereContains ( string $field, string $value ) : Builder
$field string
$value string
리턴 Builder

whereDisabled() 공개 메소드

Adds a disabled filter to the current query.
public whereDisabled ( ) : Builder
리턴 Builder

whereEnabled() 공개 메소드

Adds a enabled filter to the current query.
public whereEnabled ( ) : Builder
리턴 Builder

whereEndsWith() 공개 메소드

Adds a where ends with clause to the current query.
public whereEndsWith ( string $field, string $value ) : Builder
$field string
$value string
리턴 Builder

whereEquals() 공개 메소드

Adds a where equals clause to the current query.
public whereEquals ( string $field, string $value ) : Builder
$field string
$value string
리턴 Builder

whereHas() 공개 메소드

Adds a where has clause to the current query.
public whereHas ( string $field ) : Builder
$field string
리턴 Builder

whereNotContains() 공개 메소드

Adds a where contains clause to the current query.
public whereNotContains ( string $field, string $value ) : Builder
$field string
$value string
리턴 Builder

whereNotHas() 공개 메소드

Adds a where not has clause to the current query.
public whereNotHas ( string $field ) : Builder
$field string
리턴 Builder

whereNotStartsWith() 공개 메소드

Adds a where *not* starts with clause to the current query.
public whereNotStartsWith ( string $field, string $value ) : Builder
$field string
$value string
리턴 Builder

whereStartsWith() 공개 메소드

Adds a where starts with clause to the current query.
public whereStartsWith ( string $field, string $value ) : Builder
$field string
$value string
리턴 Builder

프로퍼티 상세

$bindings 보호되어 있는 프로퍼티

The query bindings.
protected array $bindings
리턴 array

$connection 보호되어 있는 프로퍼티

The current connection instance.
protected ConnectionInterface,Adldap\Connections $connection
리턴 Adldap\Connections\ConnectionInterface

$dn 보호되어 있는 프로퍼티

The distinguished name to perform searches upon.
protected string|null $dn
리턴 string | null

$grammar 보호되어 있는 프로퍼티

The current grammar instance.
protected Grammar,Adldap\Query $grammar
리턴 Grammar

$paginated 공개적으로 프로퍼티

Determines whether the current query is paginated.
public bool $paginated
리턴 boolean

$raw 보호되어 있는 프로퍼티

Determines whether or not to return LDAP results in their raw array format.
protected bool $raw
리턴 boolean

$read 보호되어 있는 프로퍼티

Determines whether or not to search LDAP on the base scope.
protected bool $read
리턴 boolean

$recursive 보호되어 있는 프로퍼티

Determines whether or not to search LDAP recursively.
protected bool $recursive
리턴 boolean

$schema 보호되어 있는 프로퍼티

The current schema instance.
protected SchemaInterface,Adldap\Schemas $schema
리턴 Adldap\Schemas\SchemaInterface

$sortByDirection 보호되어 있는 프로퍼티

The direction to sort the results by.
protected string $sortByDirection
리턴 string

$sortByField 보호되어 있는 프로퍼티

The field to sort search results by.
protected string $sortByField
리턴 string

$sortByFlags 보호되어 있는 프로퍼티

The sort flags for sorting query results.
protected int $sortByFlags
리턴 integer