Pimcore\Logger::crit PHP Méthode

crit() public static méthode

public static crit ( $m, $context = [] )
    public static function crit($m, $context = [])
    {
        self::log($m, "critical", $context);
    }

Usage Example

Exemple #1
0
 /**
  * @param null $adapter
  * @return null|Adapter\GD|Adapter\Imagick
  * @throws \Exception
  */
 public static function getInstance($adapter = null)
 {
     // use the default adapter if set manually (!= null) and no specify adapter is given
     if (!$adapter && self::$defaultAdapter) {
         $adapter = self::$defaultAdapter;
     }
     try {
         if ($adapter) {
             $adapterClass = "\\Pimcore\\Image\\Adapter\\" . $adapter;
             if (Tool::classExists($adapterClass)) {
                 return new $adapterClass();
             } else {
                 if (Tool::classExists($adapter)) {
                     return new $adapter();
                 } else {
                     throw new \Exception("Image-transform adapter `" . $adapter . "´ does not exist.");
                 }
             }
         } else {
             if (extension_loaded("imagick")) {
                 return new Adapter\Imagick();
             } else {
                 return new Adapter\GD();
             }
         }
     } catch (\Exception $e) {
         \Logger::crit("Unable to load image extensions: " . $e->getMessage());
         throw $e;
     }
     return null;
 }
All Usage Examples Of Pimcore\Logger::crit