Skip to content

Commit

Permalink
Add type to MVC class name in MVC factory
Browse files Browse the repository at this point in the history
  • Loading branch information
laoneo committed Aug 23, 2017
1 parent 4c6ad38 commit 80a405b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libraries/src/MVC/Factory/MVCFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function __construct($namespace, CMSApplication $application)
*/
public function createModel($name, $prefix = '', array $config = array())
{
return $this->createInstance('Model\\' . ucfirst($name), $prefix, $config);
return $this->createInstance('Model\\' . ucfirst($name) .'Model', $prefix, $config);
}

/**
Expand All @@ -80,7 +80,7 @@ public function createModel($name, $prefix = '', array $config = array())
*/
public function createView($name, $prefix = '', $type = '', array $config = array())
{
return $this->createInstance('View\\' . ucfirst($name) . '\\' . ucfirst($type), $prefix, $config);
return $this->createInstance('View\\' . ucfirst($name) . '\\' . ucfirst($type) . 'View', $prefix, $config);
}

/**
Expand All @@ -97,7 +97,7 @@ public function createView($name, $prefix = '', $type = '', array $config = arra
*/
public function createTable($name, $prefix = '', array $config = array())
{
return $this->createInstance('Table\\' . ucfirst($name), $prefix, $config);
return $this->createInstance('Table\\' . ucfirst($name) . 'Table', $prefix, $config);
}

/**
Expand Down

0 comments on commit 80a405b

Please sign in to comment.