Commit 77a1df1b authored by Shakarim Sapa's avatar Shakarim Sapa

FIX

parent 4919b1c6
......@@ -34,12 +34,11 @@ class Conditions {
* @throws \yii\web\ServerErrorHttpException
*/
public static function createConditions(){
var_dump(str_replace('|\|', DIRECTORY_SEPARATOR, self::$config['check-email-to-opening']['class'])); die;
$uniqueId=array();
// Перебираем все условия что указаны в конфиге
foreach(self::$config as $condition) {
// Если путь к классу указан, и файл по этому пути существует
if (isset($condition['class']) && file_exists(\Yii::getAlias('@mainRoot').DIRECTORY_SEPARATOR.str_replace('|\|', DIRECTORY_SEPARATOR, $condition['class']).'.php')) {
if (isset($condition['class']) && file_exists(\Yii::getAlias('@mainRoot').DIRECTORY_SEPARATOR.str_replace('\\', DIRECTORY_SEPARATOR, $condition['class']).'.php')) {
// Занесли класс в переменную
$class = $condition['class']::init();
// Проверяем наличие обязательных констант
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment