PHP Method Yii::container Code Examples

This page contains top rated real world PHP examples of method Yii::container extracted from open source projects. You can rate examples to help us improve the quality of examples
Example #1
Show file File: TestCase.php Project: shinzero999/Eveda-yii
0
 /**
  * Destroy Yii app singleton, DI container, session and cookies
  */
 protected function tearDown()
 {
     $_COOKIE = [];
     \Yii::$app->session->destroy();
     \Yii::$app = null;
     \Yii::$container = new Container();
     $this->urlManager = [];
     parent::tearDown();
 }
Example #2
Show file File: Yii.php Project: miptliot/vps-tools
0
        }
        echo '</pre>';
    }
    /**
     * Prints given object within pre tag and exit code execution.
     * @param mixed $object
     * @see p
     */
    public static function pie($object)
    {
        self::p($object);
        exit;
    }
    /**
     * Wrapper for standard [[BaseYii::t()]] translation function.
     * @param  string $message  Message to be translated.
     * @param  array  $params   The parameters that will be used to replace the corresponding placeholders in the
     *                          message.
     * @param  string $category The message category.
     * @return string The translated message.
     * @see t
     */
    public static function tr($message, $params = [], $category = 'app')
    {
        return self::t($category, $message, $params);
    }
}
spl_autoload_register(['Yii', 'autoload'], true, true);
//	Yii::$classMap = require( __DIR__ . '/classes.php' );
Yii::$container = new yii\di\Container();
Example #3
Show file File: TestCase.php Project: chrmorandi/yii2-adldap2
0
 /**
  * Destroys application in Yii::$app by setting it to null.
  */
 protected function destroyApplication()
 {
     Yii::$app = null;
     Yii::$container = new Container();
 }