Logo white

Yarik / artbox-shop

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • artbox-shop
  • console
  • controllers
  • CheckController.php
  • Artbox great prepairings
    aee73024
    Yarik authored
    2017-05-29 19:06:13 +0300  
    Browse Code ยป
CheckController.php 549 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<?php
    namespace console\controllers;
    
    use yii\console\Controller;
    use yii\db\Exception;
    
    /**
     * Class CheckController
     *
     * @package console\controllers
     */
    class CheckController extends Controller
    {
        public function actionConnection($path)
        {
            $connection = \Yii::createObject(require( $path ));
            try {
                $connection->open();
            } catch (Exception $exception) {
                exit( 1 );
            }
            exit( 0 );
        }
    }