Beispiel #1
0
/**
 * @param $imageFunction
 * @param \Auryn\Injector $injector
 * @return \ImagickDemo\Response\ImageResponse
 * @throws \Exception
 */
function directImageFunction($filename, $imageFunction, \Auryn\Injector $injector)
{
    var_dump("asdsd");
    exit(0);
    $imageCallable = function () use($imageFunction, $injector) {
        return $injector->execute($imageFunction);
    };
    return createImageResponse($filename, $imageCallable);
}
Beispiel #2
0
 /**
  * @param $imageFunction
  * @param \Auryn\Injector $injector
  * @return \ImagickDemo\Response\ImageResponse
  * @throws \Exception
  */
 function directImageFunction($filename, $imageFunction, \Auryn\Injector $injector)
 {
     $imageCallable = function () use($imageFunction, $injector) {
         try {
             return $injector->execute($imageFunction);
         } catch (\Exception $e) {
             echo "Exception: " . $e->getMessage();
             exit(0);
         }
     };
     return createImageResponse($filename, $imageCallable);
 }