aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/exception
diff options
context:
space:
mode:
authorCHItA <mate.bartus@gmail.com>2015-06-05 17:43:30 +0200
committerMate Bartus <mate.bartus@gmail.com>2015-07-08 01:28:01 +0200
commit1b81bf5b2370c045a6369705d2a11a2b35fe2281 (patch)
treee1b2f4205fa3029734fb8fb909df067eae56cfed /phpBB/install/exception
parent0dc6029bfed10fac1a09a4fd8de7d1b31407693a (diff)
downloadforums-1b81bf5b2370c045a6369705d2a11a2b35fe2281.tar
forums-1b81bf5b2370c045a6369705d2a11a2b35fe2281.tar.gz
forums-1b81bf5b2370c045a6369705d2a11a2b35fe2281.tar.bz2
forums-1b81bf5b2370c045a6369705d2a11a2b35fe2281.tar.xz
forums-1b81bf5b2370c045a6369705d2a11a2b35fe2281.zip
[ticket/13740] Add better progress handling, also add log messages
PHPBB3-13740
Diffstat (limited to 'phpBB/install/exception')
-rw-r--r--phpBB/install/exception/invalid_service_name_exception.php69
-rw-r--r--phpBB/install/exception/module_not_found_exception.php42
-rw-r--r--phpBB/install/exception/task_not_found_exception.php42
3 files changed, 153 insertions, 0 deletions
diff --git a/phpBB/install/exception/invalid_service_name_exception.php b/phpBB/install/exception/invalid_service_name_exception.php
new file mode 100644
index 0000000000..e64cd2026f
--- /dev/null
+++ b/phpBB/install/exception/invalid_service_name_exception.php
@@ -0,0 +1,69 @@
+<?php
+/**
+ *
+ * This file is part of the phpBB Forum Software package.
+ *
+ * @copyright (c) phpBB Limited <https://www.phpbb.com>
+ * @license GNU General Public License, version 2 (GPL-2.0)
+ *
+ * For full copyright and license information, please see
+ * the docs/CREDITS.txt file.
+ *
+ */
+
+namespace phpbb\install\exception;
+
+class invalid_service_name_exception extends installer_exception
+{
+ /**
+ * @var string
+ */
+ private $params;
+
+ /**
+ * @var string
+ */
+ private $error;
+
+ /**
+ * Constructor
+ *
+ * @param string $error The name of the missing installer module
+ * @param array $params Additional values for message translation
+ */
+ public function __construct($error, $params = array())
+ {
+ $this->error = $error;
+ $this->params = $params;
+ }
+
+ /**
+ * Returns the language entry's name for the error
+ *
+ * @return string
+ */
+ public function get_error()
+ {
+ return $this->error;
+ }
+
+ /**
+ * Returns parameters for the language entry, if there is any
+ *
+ * @return array
+ */
+ public function get_params()
+ {
+ return $this->params;
+ }
+
+ /**
+ * Returns true, if there are any parameters set
+ *
+ * @return bool
+ */
+ public function has_params()
+ {
+ return (sizeof($this->params) !== 0);
+ }
+}
diff --git a/phpBB/install/exception/module_not_found_exception.php b/phpBB/install/exception/module_not_found_exception.php
new file mode 100644
index 0000000000..9fa03fad6e
--- /dev/null
+++ b/phpBB/install/exception/module_not_found_exception.php
@@ -0,0 +1,42 @@
+<?php
+/**
+ *
+ * This file is part of the phpBB Forum Software package.
+ *
+ * @copyright (c) phpBB Limited <https://www.phpbb.com>
+ * @license GNU General Public License, version 2 (GPL-2.0)
+ *
+ * For full copyright and license information, please see
+ * the docs/CREDITS.txt file.
+ *
+ */
+
+namespace phpbb\install\exception;
+
+class module_not_found_exception extends installer_exception
+{
+ /**
+ * @var string
+ */
+ private $module_service_name;
+
+ /**
+ * Constructor
+ *
+ * @param string $module_service_name The name of the missing installer module
+ */
+ public function __construct($module_service_name)
+ {
+ $this->module_service_name = $module_service_name;
+ }
+
+ /**
+ * Returns the missing installer module's service name
+ *
+ * @return string
+ */
+ public function get_module_service_name()
+ {
+ return $this->module_service_name;
+ }
+}
diff --git a/phpBB/install/exception/task_not_found_exception.php b/phpBB/install/exception/task_not_found_exception.php
new file mode 100644
index 0000000000..11486cc6b0
--- /dev/null
+++ b/phpBB/install/exception/task_not_found_exception.php
@@ -0,0 +1,42 @@
+<?php
+/**
+ *
+ * This file is part of the phpBB Forum Software package.
+ *
+ * @copyright (c) phpBB Limited <https://www.phpbb.com>
+ * @license GNU General Public License, version 2 (GPL-2.0)
+ *
+ * For full copyright and license information, please see
+ * the docs/CREDITS.txt file.
+ *
+ */
+
+namespace phpbb\install\exception;
+
+class task_not_found_exception extends installer_exception
+{
+ /**
+ * @var string
+ */
+ private $task_service_name;
+
+ /**
+ * Constructor
+ *
+ * @param string $task_service_name The name of the missing installer module
+ */
+ public function __construct($task_service_name)
+ {
+ $this->task_service_name = $task_service_name;
+ }
+
+ /**
+ * Returns the missing installer task's service name
+ *
+ * @return string
+ */
+ public function get_task_service_name()
+ {
+ return $this->task_service_name;
+ }
+}