User:OliverCharles/ServerManual/Models

From MusicBrainz Wiki
< User:OliverCharles‎ | ServerManual
Revision as of 23:30, 26 July 2008 by OliverCharles (talk | contribs) (Sketching this page out (Imported from MoinMoin))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Within the Catalyst framework, models are the primary way to interact with data. This allows us to keep controllers abstract and also provides code reuse. Firstly, a bit about the models that we currently have - and how you can use them.

Current Models

MusicBrainz::Server::Model::Alias

load_for_entity $entity

MusicBrainz::Server::Model::Annotation

load_latest_annotation $entity

MusicBrainz::Server::Model::Artist

load $id

find_similar_artists $artist

MusicBrainz::Server::Model::CdToc

load_for_release $cdtoc

MusicBrainz::Server::Model::Documentation

fetch_page $page_id

MusicBrainz::Server::Model::Label

load $id

MusicBrainz::Server::Model::Relation

MusicBrainz::Server::Model::Release

find_linked_albums $entity

load $id

load_events $release

load_for_artist $artist, $all?

load_for_label $label

MusicBrainz::Server::Model::Tag

tog_tags $entity, $amount?

generate_tag_cloud $entity, $min_size?, $max_size, $bold_threshold?

MusicBrainz::Server::Model::Track

load $id

load_from_release $release

MusicBrainz::Server::Model::Url

load $id

Writing your own models