\Whups_Query_Manager

The whups query manager.

Copyright 2001-2002 Robert E. Coyle robertecoyle@hotmail.com Copyright 2001-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (BSD). If you did not receive this file, see http://www.horde.org/licenses/bsdl.php.

Summary

Methods
Properties
Constants
__construct()
getQuery()
getQueryBySlug()
hasPermission()
listQueries()
newQuery()
save()
delete()
No public properties found
No constants found
_getQuery()
$_shareManager
N/A
No private methods found
No private properties found
N/A

Properties

$_shareManager

$_shareManager : \Horde_Share

Horde_Share instance for managing shares.

Type

\Horde_Share

Methods

__construct()

__construct() 

Constructor.

getQuery()

getQuery(integer  $queryId) : \Whups_Query

Returns a specific query identified by its id.

Parameters

integer $queryId

A query id.

Throws

\Whups_Exception

Returns

\Whups_Query

The matching query or null if not found.

getQueryBySlug()

getQueryBySlug(string  $slug) : \Whups_Query

Returns a specific query identified by its slug name.

Parameters

string $slug

A query slug.

Throws

\Whups_Exception

Returns

\Whups_Query

The matching query or null if not found.

hasPermission()

hasPermission(integer  $queryId, string  $userid, integer  $permission, string  $creator = null) : boolean

Checks to see if a user has a given permission to $queryId.

Parameters

integer $queryId

The query to check.

string $userid

The userid of the user.

integer $permission

A Horde_Perms::* constant to test for.

string $creator

The creator of the event.

Returns

boolean —

Whether or not $userid has $permission.

listQueries()

listQueries(  $user,   $return_slugs = false) 

List queries.

Parameters

$user
$return_slugs

newQuery()

newQuery() 

save()

save(\Whups_Query  $query) 

Parameters

\Whups_Query $query

The query to save.

Throws

\Whups_Exception

delete()

delete(\Whups_Query  $query) 

Parameters

\Whups_Query $query

The query to delete.

_getQuery()

_getQuery(\Horde_Share_Object  $share) : \Whups_Query

Builds a query object from a share object.

Parameters

\Horde_Share_Object $share

A share object representing a query.

Returns

\Whups_Query

The query object built from the share.