public static function crit($m, $context = []) { self::log($m, "critical", $context); }
/** * @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; }