PEPr
[ class tree: PEPr ] [ index: PEPr ] [ all elements ]

Class: proposal

Source Location: /pearweb_pepr-1.0.5/include/pepr/pepr-proposal.php

Class Overview


Establishes the procedures, objects and variables used throughout PEPr.


Author(s):

Version:

  • $Id: pepr-proposal.php 309391 2011-03-18 15:37:50Z till $

Copyright:

  • Copyright (c) 1997-2005 The PHP Group

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 35]
Establishes the procedures, objects and variables used throughout PEPr.

The $proposalStatiMap is defined here.

NOTE: Proposal constants are defined in pearweb/include/pear-config.php.

This source file is subject to version 3.0 of the PHP license, that is bundled with this package in the file LICENSE, and is available through the world-wide-web at the following URI: http://www.php.net/license/3_0.txt. If you did not receive a copy of the PHP license and are unable to obtain it through the world-wide-web, please send a note to license@php.net so we can mail you a copy immediately.

  • Author: Daniel Convissor <danielc@php.net>
  • Author: Tobias Schlitt <toby@php.net>
  • Version: $Id: pepr-proposal.php 309391 2011-03-18 15:37:50Z till $
  • Copyright: Copyright (c) 1997-2005 The PHP Group
  • License: PHP License


[ Top ]


Class Variables

$draft_date =

[line 43]


Type:   mixed


[ Top ]

$id =

[line 37]


Type:   mixed


[ Top ]

$links =

[line 49]


Type:   mixed


[ Top ]

$longened_date =

[line 46]


Type:   mixed


[ Top ]

$markup =

[line 51]


Type:   mixed


[ Top ]

$pkg_category =

[line 38]


Type:   mixed


[ Top ]

$pkg_deps =

[line 42]


Type:   mixed


[ Top ]

$pkg_description =

[line 41]


Type:   mixed


[ Top ]

$pkg_license =

[line 40]


Type:   mixed


[ Top ]

$pkg_name =

[line 39]


Type:   mixed


[ Top ]

$proposal_date =

[line 44]


Type:   mixed


[ Top ]

$status =  'draft'

[line 47]


Type:   mixed


[ Top ]

$user_handle =

[line 48]


Type:   mixed


[ Top ]

$votes =

[line 50]


Type:   mixed


[ Top ]

$vote_date =

[line 45]


Type:   mixed


[ Top ]



Method Detail

__construct (Constructor)   [line 53]

proposal __construct( $dbhResArr)


Parameters:

   $dbhResArr   — 

[ Top ]

addComment   [line 408]

void addComment( $comment, [ $table = 'package_proposal_changelog'])


Parameters:

   $comment   — 
   $table   — 

[ Top ]

addLink   [line 420]

void addLink( $link)


Parameters:

   $link   — 

[ Top ]

addVote   [line 397]

void addVote( $dbh, $vote)


Parameters:

   $dbh   — 
   $vote   — 

[ Top ]

checkTimeline   [line 549]

void checkTimeline( )


[ Top ]

compareStatus   [line 514]

bool compareStatus( string $operator, string $status)

Answers the question "Is this proposal $operator than $status?"

Parameters:

string   $operator   —  the operator (<, <=, ==, >=, >, !=)
string   $status   —  the status ('draft', 'vote', 'finished', etc)

[ Top ]

delete   [line 573]

void delete( &$dbh)


Parameters:

   &$dbh   — 

[ Top ]

fromArray   [line 58]

void fromArray( $dbhResArr)


Parameters:

   $dbhResArr   — 

[ Top ]

fromOld   [line 108]

void fromOld( $id)


Parameters:

   $id   — 

[ Top ]

get   [line 146]

object a get( &$dbh, int $id, object $dbh)

Look up proposal information based on the proposal ID number
  • Return: new proposal object. false if the $id provided is not numeric. null if the $id doesn't refer to an actual proposal.
  • Access: public

Parameters:

object   $dbh   —  the current DB object
int   $id   —  the ID number of the proposal being looked for
   &$dbh   — 

[ Top ]

getAll   [line 187]

array &getAll( &$dbh, [string $status = null], [int $limit = null], [string $order = null], object $dbh)

Receive a complete bunch of proposals.
  • Return: an array of proposal objects (maybe with 0 elements, if no proposals received)
  • Access: public

Parameters:

object   $dbh   —  the current DB object
string   $status   —  the of the proposals to select
int   $limit   —  limit the number of proposals to receive
string   $order   —  an SQL expression used by the "ORDER BY" statement
   &$dbh   — 

[ Top ]

getLinks   [line 245]

void getLinks( &$dbh)


Parameters:

   &$dbh   — 

[ Top ]

getParsedDescription   [line 85]

void getParsedDescription( )


[ Top ]

getRecent   [line 169]

void getRecent( $dbh, $n)


Parameters:

   $dbh   — 
   $n   — 

[ Top ]

getStatus   [line 498]

void getStatus( [ $humanReadable = false])


Parameters:

   $humanReadable   — 

[ Top ]

getVotes   [line 254]

void getVotes( &$dbh)


Parameters:

   &$dbh   — 

[ Top ]

isEditable   [line 540]

void isEditable( )


[ Top ]

isOwner   [line 428]

void isOwner( $handle)


Parameters:

   $handle   — 

[ Top ]

mayEdit   [line 436]

void mayEdit( [ $handle = ''])


Parameters:

   $handle   — 

[ Top ]

mayRePropose   [line 263]

void mayRePropose( $handle, [ $checkid = false])


Parameters:

   $handle   — 
   $checkid   — 

[ Top ]

mayVote   [line 477]

bool mayVote( &$dbh, string $userHandle, object $dbh)

Determine if the current user can vote on the current proposal

Rules:

  • Proposal must be in the "Called for Votes" phase.
  • User must be logged in.
  • User must be a full-featured PEAR developer.
  • Only one vote can be cast.
  • Proposers can't vote on their own package, though can for RFC's.

  • Access: public

Parameters:

object   $dbh   —  the current DB object
string   $userHandle   —  the user's handle
   &$dbh   — 

[ Top ]

search   [line 216]

void &search( $searchString)


Parameters:

   $searchString   — 

[ Top ]

sendActionEmail   [line 606]

void sendActionEmail( $event, $userType, [ $user_handle = null], [ $comment = ''])


Parameters:

   $event   — 
   $userType   — 
   $user_handle   — 
   $comment   — 

[ Top ]

store   [line 301]

void store( $dbh)


Parameters:

   $dbh   — 

[ Top ]

toRSSArray   [line 72]

void toRSSArray( [ $full = false])


Parameters:

   $full   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:44:05 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.