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

Procedural File: version_api.php

Source Location: /core/version_api.php



Classes:

VersionData
Version Data Structure Definition


Page Details:



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








version_add [line 170]

int version_add( int $p_project_id, string $p_version, [int $p_released = VERSION_FUTURE], [string $p_description = ''], [int $p_date_order = null], [bool $p_obsolete = false])

Add a version to the project



Parameters

int   $p_project_id  
string   $p_version  
int   $p_released  
string   $p_description  
int   $p_date_order  
bool   $p_obsolete  
[ Top ]



version_cache_array_rows [line 359]

null version_cache_array_rows( array $p_project_id_array)

Cache version information for an array of project id's



Parameters

array   $p_project_id_array  
[ Top ]



version_cache_row [line 82]

array version_cache_row( int $p_version_id, [bool $p_trigger_errors = true])

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



Parameters

int   $p_version_id  
bool   $p_trigger_errors  
[ Top ]



version_ensure_exists [line 141]

void version_ensure_exists( int $p_version_id)

Check whether the version exists

Trigger an error if it does not




Parameters

int   $p_version_id  
[ Top ]



version_ensure_unique [line 154]

void version_ensure_unique( string $p_version, [int $p_project_id = null])

Check whether the version is unique within a project

Trigger an error if it is not




Parameters

string   $p_version  
int   $p_project_id  
[ Top ]



version_exists [line 121]

bool version_exists( int $p_version_id)

Check whether the version exists

$p_project_id : null will use the current project, otherwise the specified project Returns true if the version exists, false otherwise




Parameters

int   $p_version_id  
[ Top ]



version_full_name [line 568]

string version_full_name( int $p_version_id, [bool $p_show_project = null], [int $p_current_project_id = null])

Gets the full name of a version. This may include the project name as a prefix (e.g. '[MantisBT] 1.2.0')



Tags:

return:  The full name of the version.


Parameters

int   $p_version_id   The version id.
bool   $p_show_project   Whether to include the project or not, null means include the project if different from current.
int   $p_current_project_id   The current project id or null to use the cookie.
[ Top ]



version_get [line 597]

VersionData version_get( int $p_version_id)

get information about a version given its id



Parameters

int   $p_version_id  
[ Top ]



version_get_all_rows [line 403]

array version_get_all_rows( int $p_project_id, [int $p_released = null], [bool $p_obsolete = false], [ $p_inherit = null])

Return all versions for the specified project



Tags:

return:  Array of version rows (in array format)


Parameters

int   $p_project_id  
int   $p_released  
bool   $p_obsolete  
   $p_inherit  
[ Top ]



version_get_all_rows_with_subs [line 463]

array version_get_all_rows_with_subs( int $p_project_id, [int $p_released = null], [bool $p_obsolete = false])

Return all versions for the specified project, including subprojects



Parameters

int   $p_project_id  
int   $p_released  
bool   $p_obsolete  
[ Top ]



version_get_field [line 548]

string version_get_field( int $p_version_id, string $p_field_name)

Get the specified field name for the specified version id.

triggers an error if version not found, otherwise returns the field value.




Parameters

int   $p_version_id  
string   $p_field_name  
[ Top ]



version_get_id [line 509]

int version_get_id( string $p_version, [int $p_project_id = null], [mixed $p_inherit = null])

Get the version_id, given the project_id and $p_version_id returns false if not found, otherwise returns the id.



Parameters

string   $p_version  
int   $p_project_id  
mixed   $p_inherit   true to look for version in parent projects, false not to, null to use default configuration.
[ Top ]



version_get_project_where_clause [line 654]

string version_get_project_where_clause( integer $p_project_id, bool $p_inherit)

Gets the where clause to use for retrieving versions.



Tags:

return:  The where clause not including WHERE.


Parameters

integer   $p_project_id   The project id to use.
bool   $p_inherit   Include versions from parent projects? true: yes, false: no, null: use default configuration.
[ Top ]



version_is_unique [line 132]

bool version_is_unique( string $p_version, [int $p_project_id = null])

Check whether the version name is unique

Returns true if the name is unique, false otherwise




Parameters

string   $p_version  
int   $p_project_id  
[ Top ]



version_prepare_db [line 627]

VersionData version_prepare_db( VersionData $p_version_info)

Return a copy of the version structure with all the instvars prepared for db insertion



Parameters

VersionData   $p_version_info  
[ Top ]



version_remove [line 285]

true version_remove( int $p_version_id, [string $p_new_version = ''])

Remove a version from the project



Parameters

int   $p_version_id  
string   $p_new_version  
[ Top ]



version_remove_all [line 331]

true version_remove_all( int $p_project_id)

Remove all versions associated with a project



Parameters

int   $p_project_id  
[ Top ]



version_should_show_product_version [line 641]

bool version_should_show_product_version( integer $p_project_id)

Checks whether the product version should be shown (i.e. report, update, view, print).



Tags:

return:  true: show, false: otherwise.


Parameters

integer   $p_project_id   The project id.
[ Top ]



version_update [line 200]

true version_update( VersionData $p_version_info)

Update the definition of a version



Parameters

VersionData   $p_version_info   @p_version_info
[ Top ]



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