function setup()
 {
     $this->mapper = wiFileMapperFactory::selectMapper(null, 'jpg');
 }
Esempio n. 2
0
 /**
  * Returns binary string with image data in format specified by $format
  */
 function asString($format)
 {
     ob_start();
     $args = func_get_args();
     $args[0] = null;
     array_unshift($args, $this->getHandle());
     $mapper = wiFileMapperFactory::selectMapper(null, $format);
     call_user_func_array(array($mapper, 'save'), $args);
     return ob_get_clean();
 }
 function testMapperByURI()
 {
     $mapper = wiFileMapperFactory::selectMapper('uri.png');
     $this->assertTrue($mapper instanceof wiImageFileMapper_PNG);
 }