DAOBinaries Class Reference
[Binaries]
DAO class for Binaries. More...
Inheritance diagram for DAOBinaries:
Public Member Functions |
|
__get ($name) | |
Keep compatability to older version, where
data was a member, not outsourced to binariesdata. |
|
get_data () | |
Return data - that is the bytes forming this
binary. |
|
get_mime_base_type () | |
Returns the base type of this binary's mime
type e.g. |
|
Public Attributes |
|
$id | |
$mimetype | |
$name | |
Protected Member Functions |
|
create_table_object () | |
Create table description. |
Detailed Description
DAO class for Binaries.
Definition at line 8 of file binaries.model.php.
Member Function Documentation
DAOBinaries::__get | ( | $ | name | ) |
Keep compatability to older version, where data was a member, not outsourced to binariesdata.
Definition at line 52 of file binaries.model.php.
DAOBinaries::create_table_object | ( | ) | [protected] |
Create table description.
Reimplemented from DataObjectBase.
Definition at line 16 of file binaries.model.php.
00016 { 00017 return new DBTable( 00018 'binaries', 00019 array_merge(array( 00020 new DBFieldInt('id', null, DBFieldInt::AUTOINCREMENT | DBFieldInt::UNSIGNED | DBFieldInt::NOT_NULL), 00021 new DBFieldText('name', 200, null, DBFieldText::NOT_NULL), 00022 new DBFieldText('mimetype', 100, null, DBFieldText::NOT_NULL), 00023 ), $this->get_timestamp_field_declarations() 00024 ), 00025 'id' 00026 ); 00027 }
DAOBinaries::get_data | ( | ) |
Return data - that is the bytes forming this binary.
- Returns:
- string
Definition at line 44 of file binaries.model.php.
00044 { 00045 $data = DB::get_item('binariesdata', 'id_binary', $this->id); 00046 return $data ? $data->data : ''; 00047 }
DAOBinaries::get_mime_base_type | ( | ) |
Returns the base type of this binary's mime type e.g.
"text" for text/html
- Returns:
- string
Definition at line 34 of file binaries.model.php.
Member Data Documentation
DAOBinaries::$id |
Definition at line 9 of file binaries.model.php.
DAOBinaries::$mimetype |
Definition at line 11 of file binaries.model.php.
DAOBinaries::$name |
Definition at line 10 of file binaries.model.php.
The documentation for this class was generated from the following file:
- contributions/binaries/model/classes/binaries.model.php