<?php
// Own namespace
-namespace CoreFramework\Resolver\Action;
+namespace Org\Mxchange\CoreFramework\Resolver\Action;
// Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Generic\EmptyVariableException;
-use CoreFramework\Resolver\BaseResolver;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Resolver\BaseResolver;
+
+// Import SPL stuff
+use \InvalidArgumentException;
/**
* A generic action resolver class
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class BaseActionResolver extends BaseResolver {
+abstract class BaseActionResolver extends BaseResolver {
/**
* Validated action name
*/
* @param $namespace Namespace to look in
* @param $actionName The default action we shall execute
* @return $isValid Whether the given action is valid
- * @throws EmptyVariableException Thrown if given action is not set
+ * @throws InvalidArgumentException Thrown if given action is not set
*/
public function isActionValid ($namespace, $actionName) {
// By default nothing shall be valid
- $isValid = FALSE;
+ $isValid = false;
// Is a action set?
if (empty($namespace)) {
// Then thrown an exception here
- throw new EmptyVariableException(array($this, 'namespace'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
+ throw new InvalidArgumentException('Parameter "namespace" is empty');
} elseif (empty($actionName)) {
// Then thrown an exception here
- throw new EmptyVariableException(array($this, 'actionName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
- } // END - if
+ throw new InvalidArgumentException('Parameter "actionName" is empty');
+ }
// Create class name
$className = sprintf(
// Is this class already loaded?
if (class_exists($this->getClassName())) {
// This class does exist. :-)
- $isValid = TRUE;
+ $isValid = true;
} // END - if
// Set action name