public function __construct(Map $map, Conf $conf)
 {
     $this->setImageHandler($map->getImageHandler());
     $this->_logoLayout = LogoLayout::factory($conf->get('logo_layout'));
     $this->_logoFiles = $conf->get('logo_files');
     $this->setWorldMap($map->getWorldMap());
     $leftUpCorner = $map->getLeftUpCorner();
     $this->setLeftUpCorner($leftUpCorner['lon'], $leftUpCorner['lat']);
     $rightDownCorner = $map->getRightDownCorner();
     $this->setRightDownCorner($rightDownCorner['lon'], $rightDownCorner['lat']);
     parent::__construct($map->getImage());
 }
Example #2
0
 /**
  * Creates a new NumberMap with the given array as its contents. Omitting the argument creates an empty map.
  * @param array $data
  * @param mixed $default
  * @throws \InvalidArgumentException if $default or one of the array values is not numeric
  */
 public function __construct(array $data = array(), $default = 0)
 {
     parent::__construct();
     foreach ($data as $key => $value) {
         $this->set($key, $value);
     }
     if (is_numeric($default)) {
         $this->default = $default;
     } else {
         throw new \InvalidArgumentException("Expected number, found " . gettype($default));
     }
 }
Example #3
0
 public function __construct($className, $query)
 {
     parent::__construct($className, $this->getArray($query));
 }
 public function __construct($fileName)
 {
     $this->setImageHandler(ImageHandler::createImageHandlerFromFileExtension($fileName));
     parent::__construct($this->_imageHandler->loadImage($fileName));
 }
Example #5
0
 public function __construct($className, array $argv)
 {
     parent::__construct($className, $this->getArray($argv));
 }