本文整理汇总了PHP中Map::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Map::__construct方法的具体用法?PHP Map::__construct怎么用?PHP Map::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Map
的用法示例。
在下文中一共展示了Map::__construct方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
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());
}
示例2: __construct
/**
* 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));
}
}
示例3: __construct
public function __construct($className, $query)
{
parent::__construct($className, $this->getArray($query));
}
示例4: __construct
public function __construct($fileName)
{
$this->setImageHandler(ImageHandler::createImageHandlerFromFileExtension($fileName));
parent::__construct($this->_imageHandler->loadImage($fileName));
}
示例5: __construct
public function __construct($className, array $argv)
{
parent::__construct($className, $this->getArray($argv));
}