File: Stock.php

package info (click to toggle)
php-horde-sesha 1.0.0~beta1-7
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 924 kB
  • ctags: 443
  • sloc: php: 1,809; xml: 338; makefile: 10; sh: 3
file content (21 lines) | stat: -rw-r--r-- 629 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
class Sesha_Entity_Stock extends Horde_Rdo_Base
{

    /**
     * Get a single Sesha_Entity_Value object by property
     * @params mixed property  Sesha_Entity_Property | integer property_id
     * @return Sesha_Entity_Value|null A Value if found
     */
    public function getValue($property)
    {
        $am = $this->_mapper->factory->create('Sesha_Entity_ValueMapper');
        return $am->findOne(array(
                    'stock_id' => $this->stock_id,
                    'property_id' => $property instanceof Sesha_Entity_Property ? $property->property_id : $property
                )
            );
    }

}