Class Scry

Description

The Scry:: class provides the Horde Polls system.

$Horde: scry/lib/Scry.php,v 1.71 2007/06/12 16:25:16 chuck Exp $

Copyright 2003-2007 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.fsf.org/copyleft/gpl.html.

Located in /lib/Scry.php (line 41)


	
			
Method Summary
 boolean canPoll ()
 string getDate (int $in, [ $default = null])
 string getExtendedResults (array $votes, array $respondents)
 array getIdentifierArray (integer $identitfier)
 array getIdentifiers ()
 void getMenu ([ $returnType = 'object'])
 array getPollActions (int $poll_id)
 string getResults (array $votes)
 array getStatusLabel (boolean $enabled, string $start, string $end)
 boolean hasPermission (integer $poll_id, [integer $perms = PERMS_READ])
Methods
canPoll (line 273)

Determine whether the user is allowed to create polls

  • return: True if the current user has permission to create a poll
boolean canPoll ()
getDate (line 50)

Return the date in the configured format.

  • return: The date in the $conf.php specified format.
string getDate (int $in, [ $default = null])
  • int $in: The date in UNIX epoch format.
  • $default
getExtendedResults (line 199)

Display the results of the poll including specifying who voted for each response.

  • return: The formatted display.
string getExtendedResults (array $votes, array $respondents)
  • array $votes: The results of the poll in an array.
  • array $respondents: Who chose what.
getIdentifierArray (line 128)

Turn an identifier bitmask into an array of identifiers.

  • return: An array of each identifier represented by $identitfier.
array getIdentifierArray (integer $identitfier)
  • integer $identitfier: The bitmask of identifiers.
getIdentifiers (line 98)

Returns the $conf allowed set of identifiers.

  • return: Array containing as keys allowed identifiers and their text lables as values.
array getIdentifiers ()
getMenu (line 235)
void getMenu ([ $returnType = 'object'])
  • $returnType
getPollActions (line 305)

Get a set of action links (Vote, Edit, Conclude, etc) for the given poll

  • return: Set of links valid for this poll
array getPollActions (int $poll_id)
  • int $poll_id: Poll ID for which to request links
getResults (line 149)

Work out the current status of the poll and return HTML formatting the results for display.

  • return: The formatted display.
string getResults (array $votes)
  • array $votes: The results of the poll in an array.
getStatusLabel (line 74)

Work out the current status of the poll and return a text label and a relative class name for the colouring.

  • return: Array with two elements, a string with the status of the poll and the name of css class relative to this status.
array getStatusLabel (boolean $enabled, string $start, string $end)
  • boolean $enabled: Is the poll enabled or not.
  • string $start: The start date in the UNIX epoch format.
  • string $end: The end date in the UNIX epoch format.
hasPermission (line 293)

Check the current user for edit permissions on a given poll.

  • return: True if current user has requested perms on given poll
boolean hasPermission (integer $poll_id, [integer $perms = PERMS_READ])
  • integer $poll_id: ID of poll to check
  • integer $perms: Requested level of permission

Documentation generated on Sun, 30 Jan 2011 05:37:10 +0000 by phpDocumentor 1.4.3