Permalink
Browse files

Added storage_adapter handling to ModuleOptions class

  • Loading branch information...
1 parent a2f4e4d commit 8e1e3b529af46927d8f4fd398c8815a740094ff7 @adamlundrigan adamlundrigan committed Oct 24, 2012
View
1 autoload_classmap.php
@@ -15,6 +15,7 @@
'CdliTwoStageSignup\Mapper\EmailVerificationHydrator' => __DIR__ . '/src/CdliTwoStageSignup/Mapper/EmailVerificationHydrator.php',
'CdliTwoStageSignup\Mapper\EmailVerification\MapperInterface' => __DIR__ . '/src/CdliTwoStageSignup/Mapper/EmailVerification/MapperInterface.php',
'CdliTwoStageSignup\Mapper\EmailVerification\ZendDb' => __DIR__ . '/src/CdliTwoStageSignup/Mapper/EmailVerification/ZendDb.php',
+ 'CdliTwoStageSignup\Options\InfrastructureOptionsInterface' => __DIR__ . '/src/CdliTwoStageSignup/Options/InfrastructureOptionsInterface.php',
'CdliTwoStageSignup\Options\ModuleOptions' => __DIR__ . '/src/CdliTwoStageSignup/Options/ModuleOptions.php',
'CdliTwoStageSignup\Options\EmailOptionsInterface' => __DIR__ . '/src/CdliTwoStageSignup/Options/EmailOptionsInterface.php',
'CdliTwoStageSignup\Validator\AssertNoValidationInProgress' => __DIR__ . '/src/CdliTwoStageSignup/Validator/AssertNoValidationInProgress.php',
View
9 src/CdliTwoStageSignup/Options/InfrastructureOptionsInterface.php
@@ -0,0 +1,9 @@
+<?php
+namespace CdliTwoStageSignup\Options;
+
+use Zend\Stdlib\AbstractOptions;
+
+interface InfrastructureOptionsInterface
+{
+ public function setStorageAdapter($adapter);
+}
View
14 src/CdliTwoStageSignup/Options/ModuleOptions.php
@@ -4,11 +4,23 @@
use Zend\Stdlib\AbstractOptions;
class ModuleOptions extends AbstractOptions implements
- EmailOptionsInterface
+ EmailOptionsInterface, InfrastructureOptionsInterface
{
+ protected $storageAdapter = 'ZendDb';
protected $emailFromAddress = '';
protected $verificationEmailSubjectLine = 'Email Address Verification';
+ public function setStorageAdapter($adapter)
+ {
+ $this->storageAdapter = $adapter;
+ return $this;
+ }
+
+ public function getStorageAdapter()
+ {
+ return $this->storageAdapter;
+ }
+
public function setEmailFromAddress($email)
{
$this->emailFromAddress = $email;

0 comments on commit 8e1e3b5

Please sign in to comment.