Varien_Convert_Profile_Abstract Class Reference

Inheritance diagram for Varien_Convert_Profile_Abstract:

Varien_Convert_Profile

List of all members.

Public Member Functions

 addAction (Varien_Convert_Action_Interface $action=null)
 setContainers (Varien_Convert_Container_Collection $containers)
 getContainers ()
 getContainer ($name=null)
 addContainer ($name, Varien_Convert_Container_Interface $container)
 getExceptions ()
 getDryRun ()
 setDryRun ($flag)
 addException (Varien_Convert_Exception $e)
 run ()

Protected Attributes

 $_actions
 $_containers
 $_exceptions = array()
 $_dryRun
 $_actionDefaultClass = 'Varien_Convert_Action'
 $_containerCollectionDefaultClass = 'Varien_Convert_Container_Collection'


Detailed Description

Definition at line 35 of file Abstract.php.


Member Function Documentation

addAction ( Varien_Convert_Action_Interface action = null  ) 

Definition at line 45 of file Abstract.php.

00046     {
00047         if (is_null($action)) {
00048             $action = new $this->_actionDefaultClass();
00049         }
00050         $this->_actions[] = $action;
00051         $action->setProfile($this);
00052         return $action;
00053     }

addContainer ( name,
Varien_Convert_Container_Interface container 
)

Definition at line 77 of file Abstract.php.

00078     {
00079         $container = $this->getContainers()->addItem($name, $container);
00080         $container->setProfile($this);
00081         return $container;
00082     }

addException ( Varien_Convert_Exception e  ) 

Definition at line 100 of file Abstract.php.

00101     {
00102         $this->_exceptions[] = $e;
00103         return $this;
00104     }

getContainer ( name = null  ) 

Definition at line 69 of file Abstract.php.

00070     {
00071         if (is_null($name)) {
00072             $name = '_default';
00073         }
00074         return $this->getContainers()->getItem($name);
00075     }

getContainers (  ) 

Definition at line 61 of file Abstract.php.

00062     {
00063         if (!$this->_containers) {
00064             $this->_containers = new $this->_containerCollectionDefaultClass();
00065         }
00066         return $this->_containers;
00067     }

getDryRun (  ) 

Definition at line 89 of file Abstract.php.

00090     {
00091         return $this->_dryRun;
00092     }

getExceptions (  ) 

Definition at line 84 of file Abstract.php.

00085     {
00086         return $this->_exceptions;
00087     }

run (  ) 

Definition at line 106 of file Abstract.php.

00107     {
00108         if (!$this->_actions) {
00109             $e = new Varien_Convert_Exception("Could not find any actions for this profile");
00110             $e->setLevel(Varien_Convert_Exception::FATAL);
00111             $this->addException($e);
00112             return;
00113         }
00114 
00115         foreach ($this->_actions as $action) {
00116             $action->run();
00117         }
00118         return $this;
00119     }

setContainers ( Varien_Convert_Container_Collection containers  ) 

Definition at line 55 of file Abstract.php.

00056     {
00057         $this->_containers = $containers;
00058         return $this;
00059     }

setDryRun ( flag  ) 

Definition at line 94 of file Abstract.php.

00095     {
00096         $this->_dryRun = $flag;
00097         return $this;
00098     }


Member Data Documentation

$_actionDefaultClass = 'Varien_Convert_Action' [protected]

Definition at line 42 of file Abstract.php.

$_actions [protected]

Definition at line 37 of file Abstract.php.

$_containerCollectionDefaultClass = 'Varien_Convert_Container_Collection' [protected]

Definition at line 43 of file Abstract.php.

$_containers [protected]

Definition at line 38 of file Abstract.php.

$_dryRun [protected]

Definition at line 40 of file Abstract.php.

$_exceptions = array() [protected]

Definition at line 39 of file Abstract.php.


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

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