Mage_Dataflow_Model_Convert_Adapter_Abstract Class Reference

Inheritance diagram for Mage_Dataflow_Model_Convert_Adapter_Abstract:

Mage_Dataflow_Model_Convert_Container_Abstract Mage_Dataflow_Model_Convert_Adapter_Interface Mage_Dataflow_Model_Convert_Container_Interface Mage_Catalog_Model_Convert_Adapter_Catalog Mage_Dataflow_Model_Convert_Adapter_Db_Table Mage_Dataflow_Model_Convert_Adapter_Http Mage_Dataflow_Model_Convert_Adapter_Http_Curl Mage_Dataflow_Model_Convert_Adapter_Io Mage_Dataflow_Model_Convert_Adapter_Soap Mage_Dataflow_Model_Convert_Adapter_Std Mage_Dataflow_Model_Convert_Adapter_Zend_Cache Mage_Dataflow_Model_Convert_Adapter_Zend_Db Mage_Dataflow_Model_Convert_Iterator_Http Mage_Dataflow_Model_Session_Adapter_Http Mage_Dataflow_Model_Session_Adapter_Iterator Mage_Eav_Model_Convert_Adapter_Entity Mage_Eav_Model_Convert_Adapter_Grid

List of all members.

Public Member Functions

 getResource ()
 setResource ($resource)
 getNumber ($value)

Protected Attributes

 $_resource


Detailed Description

Definition at line 35 of file Abstract.php.


Member Function Documentation

getNumber ( value  ) 

Definition at line 69 of file Abstract.php.

00070     {
00071         if (!($separator = $this->getBatchParams('decimal_separator'))) {
00072             $separator = '.';
00073         }
00074 
00075         $allow  = array('0',1,2,3,4,5,6,7,8,9,'-',$separator);
00076 
00077         $number = '';
00078         for ($i = 0; $i < strlen($value); $i ++) {
00079             if (in_array($value[$i], $allow)) {
00080                 $number .= $value[$i];
00081             }
00082         }
00083 
00084         if ($separator != '.') {
00085             $number = str_replace($separator, '.', $number);
00086         }
00087 
00088         return floatval($number);
00089     }

getResource (  ) 

Retrieve resource generic method

Returns:
object

Reimplemented in Mage_Catalog_Model_Convert_Adapter_Catalog, Mage_Dataflow_Model_Convert_Adapter_Db_Table, Mage_Dataflow_Model_Convert_Adapter_Zend_Cache, and Mage_Dataflow_Model_Convert_Adapter_Zend_Db.

Definition at line 52 of file Abstract.php.

00053     {
00054         return $this->_resource;
00055     }

setResource ( resource  ) 

Set resource for the adapter

Parameters:
object $resource
Returns:
Mage_Dataflow_Model_Convert_Adapter_Abstract

Definition at line 63 of file Abstract.php.

00064     {
00065         $this->_resource = $resource;
00066         return $this;
00067     }


Member Data Documentation

$_resource [protected]

Definition at line 45 of file Abstract.php.


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:05 2009 for Magento by  doxygen 1.5.8