protected function _genericReturn($key, $type)
    {
        $listName = $this->_getCorrectList($type);

        switch (true) {
            case !$key:
                return $this->$listName;

            case array_key_exists($key, $this->$listName):
                $list = &$this->$listName;
                return $list[$key];

            default:
                return null;
        }
    }
protected function _genericReturn($key, $type)
    {
        $listName = $this->_getCorrectList($type);

        switch (true) {
            case !$key:
                return $this->$listName;

            case array_key_exists($key, $this->$listName):
                $list = &$this->$listName;
                return $list[$key];

            default:
                return null;
        }
    }
protected function _genericReturn ( $ key , $ type ) { $ listName = $ this -> _getCorrectList ( $ type ) ; switch ( true ) { case ! $ key : return $ this -> $ listName ; case array_key_exists ( $ key , $ this -> $ listName ) : $ list = & $ this -> $ listName ; return $ list [ $ key ] ; default : return null ; } }
common return data method for class data lists

@param string $key
@param string $type
@return mixed|null
common return data method for class data lists