com.lokorin.lokorin.lib
[ class tree: com.lokorin.lokorin.lib ] [ index: com.lokorin.lokorin.lib ] [ all elements ]

Class: DownloadItem

Source Location: /_includes/lib_downloads.php

Class Overview

TableEntry
   |
   --DownloadItem

Describes a download item. An file that is connected to a project and


Author(s):

  • Andreas Launila

Variables

Methods


Inherited Variables

Inherited Methods

Class: TableEntry

TableEntry::__construct()
Constructor for TableEntry.
TableEntry::getId()
Gets the unique identifier for the table entry.
TableEntry::readRow()
Processes the contents of a retrieved row that describes the entry.

Class Details

[line 104]
Describes a download item. An file that is connected to a project and

that can be downloaded from the site




Tags:

author:  Andreas Launila


[ Top ]


Class Variables

$counterId =

[line 147]

The unique identifier for the counter (of any) that is connected to the download item. The counter is increase once for every time the item us downloaded.



Tags:

access:  private

Type:   integer


[ Top ]

$description =

[line 134]

A description of what the item actually contains, what it can be used for and so on.



Tags:

access:  private

Type:   string


[ Top ]

$filePath =

[line 116]

The absolute path on the server filesystem for the downloadable item.



Tags:

access:  private

Type:   string


[ Top ]

$langId =

[line 140]

The unique identifier for the language that was used to create the download item.



Tags:

access:  private

Type:   integer


[ Top ]

$name =

[line 111]

The name of the item. The name does not reference the actual file that the download item is connected to, rather it is a short description of what the connected file actually is.



Tags:

access:  private

Type:   string


[ Top ]

$projectId =

[line 122]

The unique identifier of the project that the download item is connected to.



Tags:

access:  private

Type:   integer


[ Top ]

$version =

[line 128]

An optional version string, describing the current version of the downloadable item.



Tags:

access:  private

Type:   string


[ Top ]



Class Methods


constructor __construct [line 153]

DownloadItem __construct( integer $id)

Constructor for DownloadItem.



Tags:

access:  public


Overrides TableEntry::__construct() (Constructor for TableEntry.)

Parameters:

integer   $id   The unique identifier for the download item.

[ Top ]

method download [line 261]

void download( )

Downloads the download item.



Tags:

access:  public


[ Top ]

method getCounter [line 286]

Counter getCounter( )

Gets the counter (if any) associated with the download.



Tags:

return:  The associated counter. Use isValid() to check if it is indeed valid or if the download had no counter.
access:  public


[ Top ]

method getDescription [line 244]

string getDescription( )

Gets a description of the download item. The description describes what the file actually contains, along with any notes regarding it.



Tags:

return:  A description.
access:  public


[ Top ]

method getLanguage [line 253]

ProgrammingLanguage getLanguage( )

Gets the programming language of the download item.



Tags:

return:  The ProgrammingLanguage instance that represents the language that is used for the download item.
access:  public


[ Top ]

method getName [line 190]

string getName( )

Gets the name of the download item. The name is a short description of what the associated file actually is.



Tags:

return:  A describing name.
access:  public


[ Top ]

method getProject [line 277]

Project getProject( )

Gets the project that this download item is connected to.



Tags:

return:  The Project instance that represents the project that the download item is connected to.
access:  public


[ Top ]

method getSize [line 204]

integer getSize( )

Gets the size of the file that is connected to the download item in kilobytes.



Tags:

return:  The number of kilobytes that the connected file occupies.
access:  public


[ Top ]

method getSizeLabel [line 220]

void getSizeLabel( )

Gets the size of the file along with the unit, i.e. 'kB', 'MB' and so

on. Which unit is used is decided by the size of the file in the following way (the ranges are in kB):

  • [0, 1000): kB (no decimals)
  • [1000, 10000): MB (two decimals precision)
  • [10000, 100000): MB (one decomals precision)
  • [100000, 1000000): MB (no decimals)
  • [1000000, infinity): GB (two decimals precision)




Tags:

access:  public


[ Top ]

method readRow [line 169]

void readRow( mixed $row)



Tags:

access:  protected
see:  com.lokorin.lokorin.includes.TableEntry.readRow($row)


Overrides TableEntry::readRow() (Processes the contents of a retrieved row that describes the entry.)

[ Top ]


Documentation generated on Sun, 16 Apr 2006 21:03:20 +0200 by phpDocumentor 1.3.0RC4