PHP Class Whups_Query_Manager, horde

Copyright 2001-2002 Robert E. Coyle Copyright 2001-2016 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.
Author: Robert E. Coyle ([email protected])
Author: Jan Schneider ([email protected])
Show file Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_shareManager Horde_Share Horde_Share instance for managing shares.

Public Methods

Method Description
__construct ( ) Constructor.
delete ( Whups_Query $query )
getQuery ( integer $queryId ) : Whups_Query Returns a specific query identified by its id.
getQueryBySlug ( string $slug ) : Whups_Query Returns a specific query identified by its slug name.
hasPermission ( integer $queryId, string $userid, integer $permission, string $creator = null ) : boolean Checks to see if a user has a given permission to $queryId.
listQueries ( $user, $return_slugs = false ) List queries.
newQuery ( )
save ( Whups_Query $query )

Protected Methods

Method Description
_getQuery ( Horde_Share_Object $share ) : Whups_Query Builds a query object from a share object.

Method Details

__construct() public method

Constructor.
public __construct ( )

_getQuery() protected method

Builds a query object from a share object.
protected _getQuery ( Horde_Share_Object $share ) : Whups_Query
$share Horde_Share_Object A share object representing a query.
return Whups_Query The query object built from the share.

delete() public method

public delete ( Whups_Query $query )
$query Whups_Query The query to delete.

getQuery() public method

Returns a specific query identified by its id.
public getQuery ( integer $queryId ) : Whups_Query
$queryId integer A query id.
return Whups_Query The matching query or null if not found.

getQueryBySlug() public method

Returns a specific query identified by its slug name.
public getQueryBySlug ( string $slug ) : Whups_Query
$slug string A query slug.
return Whups_Query The matching query or null if not found.

hasPermission() public method

Checks to see if a user has a given permission to $queryId.
public hasPermission ( integer $queryId, string $userid, integer $permission, string $creator = null ) : boolean
$queryId integer The query to check.
$userid string The userid of the user.
$permission integer A Horde_Perms::* constant to test for.
$creator string The creator of the event.
return boolean Whether or not $userid has $permission.

listQueries() public method

List queries.
public listQueries ( $user, $return_slugs = false )

newQuery() public method

public newQuery ( )

save() public method

public save ( Whups_Query $query )
$query Whups_Query The query to save.

Property Details

$_shareManager protected property

Horde_Share instance for managing shares.
protected Horde_Share $_shareManager
return Horde_Share