Subclass of entry, purely for dealing with files.
More...
|
| __construct ($title, stored_file $file) |
| Overridden constructor to set up the file.
|
|
| __set ($field, $value) |
| Override __set to do proper dispatching for different things.
|
|
| add_category ($term, $scheme=null, $label=null) |
| Add a category to this entry "tags" should just pass a term here and no scheme or label.
|
|
| add_link ($otherentry, $reltype, $displayorder=null) |
| Add a link from this entry to another one.
|
|
| to_dom (DomDocument $dom, $feedauthor) |
| Create an entry element and append all the children And return it rather than adding it to the dom.
|
|
| validate () |
| Validate this entry.
|
|
|
array | $attachments = array() |
| attachments to this entry
|
|
string | $author |
| optional author (only if different to feed author)
|
|
mixed | $content |
| main content of the entry.
|
|
string | $id |
| entry id - something like forumpost6, must be unique to the feed
|
|
array | $links = array() |
| links from this entry to other entries
|
|
int | $published |
| published date (ctime) - unix timestamp
|
|
string | $summary |
| summary - for split long content
|
|
string | $title |
| title of the entry
|
|
string | $type |
| leap2a entry type
|
|
int | $updated |
| updated date - unix timestamp
|
|
|
| add_extra_links ($dom, $entry) |
| Implement the hook to add extra links to attach the file in an enclosure.
|
|
|
file_stored | $referencedfile |
| for the dealing file
|
|
Subclass of entry, purely for dealing with files.
- Copyright
- 2009 Penny Leach
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
portfolio_format_leap2a_file::__construct |
( |
| $title, |
|
|
stored_file | $file ) |
Overridden constructor to set up the file.
- Parameters
-
string | $title | title of the entry |
stored_file | $file | file storage instance |
◆ __set()
portfolio_format_leap2a_entry::__set |
( |
| $field, |
|
|
| $value ) |
|
inherited |
Override __set to do proper dispatching for different things.
Only allows the optional and required leap2a entry fields to be set
- Parameters
-
string | $field | property's name |
mixed | $value | property's value |
- Return values
-
◆ add_category()
portfolio_format_leap2a_entry::add_category |
( |
| $term, |
|
|
| $scheme = null, |
|
|
| $label = null ) |
|
inherited |
Add a category to this entry "tags" should just pass a term here and no scheme or label.
They will be automatically normalised if they have spaces.
- Parameters
-
string | $term | eg 'Offline' |
string | $scheme | (optional) eg resource_type |
string | $label | (optional) eg File |
◆ add_extra_links()
portfolio_format_leap2a_file::add_extra_links |
( |
| $dom, |
|
|
| $entry ) |
|
protected |
Implement the hook to add extra links to attach the file in an enclosure.
- Parameters
-
DomDocument | $dom | feed object |
DomDocument | $entry | feed added link |
Reimplemented from portfolio_format_leap2a_entry.
◆ add_link()
portfolio_format_leap2a_entry::add_link |
( |
| $otherentry, |
|
|
| $reltype, |
|
|
| $displayorder = null ) |
|
inherited |
Add a link from this entry to another one.
These will be collated at the end of the export (during to_xml) and validated at that point. This function does no validation
- Parameters
-
- Return values
-
portfolio_format_leap2a_entry | the current entry object. This is so that these calls can be chained eg $entry->add_link('something6', 'has_part')->add_link('something7', 'has_part'); |
◆ to_dom()
portfolio_format_leap2a_entry::to_dom |
( |
DomDocument | $dom, |
|
|
| $feedauthor ) |
|
inherited |
Create an entry element and append all the children And return it rather than adding it to the dom.
This is handled by the main writer object.
- Parameters
-
DomDocument | $dom | use this to create elements |
stdClass | $feedauthor | object of author(user) info |
- Return values
-
◆ validate()
portfolio_format_leap2a_entry::validate |
( |
| ) |
|
|
inherited |
Validate this entry.
At the moment this just makes sure required fields exist but it could also check things against a list, for example
- Todo
- MDL-31303 - add category with a scheme 'selection_type'
◆ $content
mixed portfolio_format_leap2a_entry::$content |
|
inherited |
The documentation for this class was generated from the following file:
- lib/portfolio/formats/leap2a/lib.php