mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 17:41:50 +01:00
Bundle - getBundleViewPath() method - verify name of bundle
This commit is contained in:
34
src/Exception/Bundle/IncorrectBundleNameException.php
Normal file
34
src/Exception/Bundle/IncorrectBundleNameException.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* (c) Meritoo.pl, http://www.meritoo.pl
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Meritoo\Common\Exception\Bundle;
|
||||
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* An exception used while name of bundle is incorrect
|
||||
*
|
||||
* @author Krzysztof Niziol <krzysztof.niziol@meritoo.pl>
|
||||
* @copyright Meritoo.pl
|
||||
*/
|
||||
class IncorrectBundleNameException extends Exception
|
||||
{
|
||||
/**
|
||||
* Class constructor
|
||||
*
|
||||
* @param string $bundleName Incorrect name of bundle
|
||||
*/
|
||||
public function __construct($bundleName)
|
||||
{
|
||||
$template = 'Name of bundle \'%s\' is incorrect. It should start with big letter and end with "Bundle". Is'
|
||||
. ' there everything ok?';
|
||||
|
||||
$message = sprintf($template, $bundleName);
|
||||
parent::__construct($message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user