summaryrefslogtreecommitdiff
path: root/framework/Configuration/Provider/TProviderBase.php
diff options
context:
space:
mode:
authorjrags <>2006-09-19 03:04:28 +0000
committerjrags <>2006-09-19 03:04:28 +0000
commit2c8fcb129c45faecd1a480c44f8a1708f768b91d (patch)
tree43c0ad8bb4c8f669ef242f278de9ffa12d20b93c /framework/Configuration/Provider/TProviderBase.php
parentb767e82ec7bb04e747961e7ecee0e288fde719f0 (diff)
Inital Checkin of new membership and role providers. Currently still in development
Diffstat (limited to 'framework/Configuration/Provider/TProviderBase.php')
-rw-r--r--framework/Configuration/Provider/TProviderBase.php54
1 files changed, 54 insertions, 0 deletions
diff --git a/framework/Configuration/Provider/TProviderBase.php b/framework/Configuration/Provider/TProviderBase.php
new file mode 100644
index 00000000..2d44bf39
--- /dev/null
+++ b/framework/Configuration/Provider/TProviderBase.php
@@ -0,0 +1,54 @@
+<?php
+/**
+ * TProviderBase class.
+ * Provides a base implementation for the extensible provider model.
+ *
+ * @author Jason Ragsdale <jrags@jasrags.net>
+ * @version $Id: TProviderBase.php 1398 2006-09-08 19:31:03Z xue $
+ * @package System.Configuration.Provider
+ * @since 3.1
+ */
+abstract class TProviderBase
+{
+ private $_Description;
+ private $_Initialized = false;
+ private $_name;
+
+ public function __construct(){}
+
+ public function getDescription()
+ {
+ return $this->_Description;
+ }
+ public function getName()
+ {
+ return $this->_name;
+ }
+ public function Initialize($name,$config)
+ {
+ if ($this->_Initialized)
+ {
+ throw new TProviderException('Provider_Already_Initialized');
+ }
+ $this->_Initialized=true;
+
+ if ($name === null)
+ {
+ throw new TProviderException('name');
+ }
+
+ if (strlen($name) == 0)
+ {
+ throw new TProviderException('Config_provider_name_null_or_empty');
+ }
+
+ $this->_name = TPropertyValue::ensureString($name);
+
+ if ($config !== null && is_array($config))
+ {
+ $this->_Description = TPropertyValue::ensureString($config['description']);
+ unset($config['description']);
+ }
+ }
+}
+?> \ No newline at end of file