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

Procedural File: sponsorship_api.php

Source Location: /core/sponsorship_api.php



Classes:

SponsorshipData
Sponsorship Data Structure Definition


Page Details:

Sponsorship API



Tags:

copyright:  Copyright (C) 2002 - 2010 MantisBT Team - mantisbt-dev@lists.sourceforge.net
copyright:  Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
link:  http://www.mantisbt.org


Includes:

require_once('bug_api.php') [line 33]
requires bug_api

require_once('history_api.php') [line 37]
requires history_api

require_once('email_api.php') [line 29]
requires email_api







sponsorship_cache_row [line 72]

array sponsorship_cache_row( int $p_sponsorship_id, [bool $p_trigger_errors = true])

Cache a sponsorship row if necessary and return the cached copy If the second parameter is true (default), trigger an error if the sponsorship can't be found. If the second parameter is false, return false if the sponsorship can't be found.



Parameters

int   $p_sponsorship_id  
bool   $p_trigger_errors  
[ Top ]



sponsorship_clear_cache [line 109]

null sponsorship_clear_cache( [int $p_sponsorship_id = null])

Clear the sponsorship cache (or just the given id if specified)



Parameters

int   $p_sponsorship_id  
[ Top ]



sponsorship_delete [line 355]

null sponsorship_delete( int $p_sponsorship_id)

delete a sponsorship given its id id can be an array of ids or just an id.



Parameters

int   $p_sponsorship_id  
[ Top ]



sponsorship_exists [line 126]

bool sponsorship_exists( int $p_sponsorship_id)

check to see if sponsorship exists by id

return true if it does, false otherwise




Parameters

int   $p_sponsorship_id  
[ Top ]



sponsorship_format_amount [line 251]

string sponsorship_format_amount( int $p_amount)

This function should return the string in a globalized format.



Tags:

todo:  add some currency formating in the future


Parameters

int   $p_amount  
[ Top ]



sponsorship_get [line 165]

array sponsorship_get( int $p_sponsorship_id)

get information about a sponsorship given its id



Parameters

int   $p_sponsorship_id  
[ Top ]



sponsorship_get_all_ids [line 189]

array sponsorship_get_all_ids( int $p_bug_id)

Return an array of Sponsorships associated with the specified bug id



Parameters

int   $p_bug_id  
[ Top ]



sponsorship_get_amount [line 222]

int sponsorship_get_amount( int $p_sponsorship_id)

Get the amount of sponsorships for the specified id(s) handles the case where $p_sponsorship_id is an array or an id.



Parameters

int   $p_sponsorship_id  
[ Top ]



sponsorship_get_currency [line 241]

string sponsorship_get_currency( )

Return the currency used for all sponsorships



[ Top ]



sponsorship_get_id [line 137]

int|false sponsorship_get_id( int $p_bug_id, [int $p_user_id = null])

return false if not found

otherwise returns sponsorship id




Parameters

int   $p_bug_id  
int   $p_user_id  
[ Top ]



sponsorship_set [line 275]

int sponsorship_set( int $p_sponsorship)

if sponsorship contains a non-zero id, then update the corresponding record.

if sponsorship contains a zero id, search for bug_id/user_id, if found, then update the entry otherwise add a new entry




Parameters

int   $p_sponsorship  
[ Top ]



sponsorship_update_bug [line 262]

null sponsorship_update_bug( int $p_bug_id)

Update bug to reflect sponsorship change

This is to be called after adding/updating/deleting sponsorships




Parameters

int   $p_bug_id  
[ Top ]



sponsorship_update_date [line 413]

true sponsorship_update_date( int $p_sponsorship_id)

updates the last_updated field



Parameters

int   $p_sponsorship_id  
[ Top ]



sponsorship_update_paid [line 389]

true sponsorship_update_paid( int $p_sponsorship_id, int $p_paid)

updates the paid field



Parameters

int   $p_sponsorship_id  
int   $p_paid  
[ Top ]



Documentation generated on Sun, 12 Dec 2010 23:50:50 +0900 by phpDocumentor 1.4.3
inserted by FC2 system