ORMer

ORMer

ORMer is a free, open-source (MIT License) object-relational mapping class written in PHP.

Features

The primary goal is to provide ORM functionality while keeping things easy on the developer. It makes no assumptions about table/field naming conventions and requires minimal configuration (no XML config files). For Sqlite2 and MySQL 5.1.x it provides automatic relation discovery through foreign keys.

The most exciting feature is the ability to specify additional stipulations when referencing related data (such as the orders associated with a particular customer). See the second line of code in the example below.

Example

// Pull user objects "where email='me@host.com'"
$users = users::find()->where('email=:email')->parameter('email', 'me@host.com');
 
// Chain through to pull ordered products starting with "a"
// the database contains the following tables: users, orders, order_products, products
// order_products associates products with an order
$products = $users->orders->order_products->products->where('product.name like "a%"');
 
// Loop over them and display their names
foreach($products as $product) {
    echo $product->name;
}

External links


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Ormer — Or mer ([^o]r m[ e]r), n. (Zo[ o]l.) An abalone. [1913 Webster] …   The Collaborative International Dictionary of English

  • ormer — [ôr′mər] n. [Fr dial. (Channel Islands) < Fr ormier < L auris maris, ear of the sea (see EAR1 & MARE2): from its shape] [Brit. Dial.] term for ABALONE …   English World dictionary

  • Ormer Locklear — Aerialist actor Ormer Locklear Born Ormer Leslie Locklear October 29, 1891(1891 10 29) Greenville, Texas, U.S …   Wikipedia

  • ormer — /awr meuhr/, n. 1. an abalone, Haliotis tuberculata, living in waters of the Channel Islands. 2. any abalone. [1665 75; < F ormier < L auris maris ear of the sea] * * * …   Universalium

  • ormer — noun An abalone or sea ear, particularly Haliotis tuberculata, common in the Channel Islands. Syn: abalone, sea ear, ear shell …   Wiktionary

  • ormer — n. any abalone; abalone found in the Channel islands …   English contemporary dictionary

  • ormer — [ ɔ:mə] noun an abalone, especially one used as food in the Channel Islands. [Haliotis tuberculata and other species.] Origin C17: Channel Islands Fr., from Fr. ormier, from L. auris maris ear of the sea (because of its ear like shape) …   English new terms dictionary

  • ormer — or·mer …   English syllables

  • ormer — /ˈɔmə/ (say awmuh) noun 1. an abalone, Haliotis tuberculata, a gastropod mollusc abundant in the Channel Islands. 2. Chiefly British any abalone. {French ormier (from Latin auris maris sea ear) …  

  • ormer — n. an edible univalve mollusc, Haliotis tuberculata, having a flattened shell with a series of holes of increasing size along the outer margin. Also called sea ear. Etymology: Channel Islands F f. F ormier f. L auris maris ear of sea …   Useful english dictionary

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”