src/UthandoCommon/Service/AbstractMapperService.php
public function getById($id, $col = null)
    {
        $id = (int) $id;
        $model = $this->getCacheItem($id);

        if (!$model) {
            $model = $this->getMapper()->getById($id, $col);

            if ($this->useCache) {
                $this->setCacheItem($id, $model);
            }
        }

        return $model;
    }
public function getById($id, $col = null)
    {
        $id = (int) $id;
        $model = $this->getCacheItem($id);

        if (!$model) {
            $model = $this->getMapper()->getById($id, $col);

            if ($this->useCache) {
                $this->setCacheItem($id, $model);
            }
        }

        return $model;
    }
public function getById ( $ id , $ col = null ) { $ id = ( int ) $ id ; $ model = $ this -> getCacheItem ( $ id ) ; if ( ! $ model ) { $ model = $ this -> getMapper ( ) -> getById ( $ id , $ col ) ; if ( $ this -> useCache ) { $ this -> setCacheItem ( $ id , $ model ) ; } } return $ model ; }
return one or more records from database by id

@param $id
@param null $col
@return array|mixed|ModelInterface
return one or more records from database by id