root/trunk/samples/app/modules/Default/models/AgaviSampleAppPriceFinderModel.class.php

Revision 2371, 446 bytes (checked in by david, 8 months ago)

merge [2370]

Line 
1<?php
2
3class AgaviSampleAppPriceFinderModel extends AgaviSampleAppDefaultBaseModel implements AgaviISingletonModel
4{
5  public function getPriceByProductName($productName)
6  {
7    switch(strtolower($productName)) {
8      case 'brains':
9        return 0.89;
10      case 'chainsaws':
11        return 129.99;
12      case 'mad coding skills':
13        return 14599;
14      case 'nonsense':
15        return 3.14;
16      case 'viagra':
17        return 14.69;
18      default:
19        return null;
20    }
21  }
22}
23
24?>
Note: See TracBrowser for help on using the browser.