Overview

Namespaces

  • Mapbender
    • Component
      • HTTP
    • CoreBundle
      • Command
      • Component
        • Exception
      • Controller
      • DataFixtures
        • ORM
      • DependencyInjection
      • Element
        • Type
      • Entity
      • EventListener
      • Extension
      • Form
        • DataTransformer
        • EventListener
        • Type
      • Security
      • Template
    • DrupalIntegrationBundle
      • DependencyInjection
      • Security
        • Authentication
          • Provider
          • Token
        • Authorization
          • Voter
        • Factory
        • Firewall
        • User
      • Session
    • KmlBundle
      • Element
    • ManagerBundle
      • Controller
      • Form
        • DataTransformer
        • Type
    • MonitoringBundle
      • Command
      • Component
      • Controller
      • DependencyInjection
      • Entity
      • EventListener
      • Form
    • PrintBundle
      • Component
      • Controller
    • WmcBundle
      • Component
        • Exception
      • Element
        • Type
      • Entity
      • Form
        • EventListener
        • Type
    • WmsBundle
      • Component
        • Exception
      • Controller
      • DependencyInjection
      • Element
        • Type
      • Entity
      • Event
      • Form
        • EventListener
        • Type
    • WmtsBundle
      • Component
        • Exception
      • Controller
      • Entity
      • Form
        • Type
  • None
  • PHP

Classes

  • Application
  • ApplicationYAMLMapper
  • BoundingBox
  • Element
  • InstanceConfiguration
  • InstanceConfigurationOptions
  • MapbenderBundle
  • ProxyService
  • Size
  • SQLSearchEngine
  • StateHandler
  • Template
  • Utils

Interfaces

  • InstanceLayerIn
  • SearchEngine
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download
  1: <?php
  2: 
  3: namespace Mapbender\CoreBundle\Component;
  4: 
  5: /*
  6:  * To change this template, choose Tools | Templates
  7:  * and open the template in the editor.
  8:  */
  9: 
 10: /**
 11:  * Description of Size
 12:  *
 13:  * @author Paul Schmidt
 14:  */
 15: class Size
 16: {
 17:     /**
 18:      * ORM\Column(type="integer", nullable=false)
 19:      */
 20:     //@TODO Doctrine bug: "protected" replaced with "public"
 21:     public $width = 0;
 22: 
 23:     /**
 24:      * ORM\Column(type="integer", nullable=false)
 25:      */
 26:     //@TODO Doctrine bug: "protected" replaced with "public"
 27:     public $height = 0;
 28:     
 29:     /**
 30:      * 
 31:      * @param type $width width
 32:      * @param type $height height
 33:      */
 34:     public function __construct($width = null, $height = null)
 35:     {
 36:         $this->width = $width;
 37:         $this->height = $height;
 38:     }
 39:     
 40:     /**
 41:      * Sets a width
 42:      * 
 43:      * @return Size 
 44:      */
 45:     public function setWidth($width){
 46:         $this->width = $width;
 47:         return $this;
 48:     }
 49:     
 50:     /**
 51:      * Returns a width
 52:      * 
 53:      * @return integer width
 54:      */
 55:     public function getWidth(){
 56:         return $this->width;
 57:     }
 58:     
 59:     /**
 60:      * Sets a height
 61:      * 
 62:      * @return Size 
 63:      */
 64:     public function setHeight($height){
 65:         $this->height = $height;
 66:         return $this;
 67:     }
 68:     
 69:     /**
 70:      * Returns a height
 71:      * 
 72:      * @return integer height
 73:      */
 74:     public function getHeight(){
 75:         return $this->height;
 76:     }
 77:     
 78:     /**
 79:      * Creates a Size from parameters (array("width"=>xx,"height"=>yy))
 80:      * 
 81:      * @param array $parameters
 82:      * @return Size
 83:      */
 84:     public static function create($parameters = array()){
 85:         return new Size(
 86:                 isset($parameters["width"]) ? $parameters["width"] : null,
 87:                 isset($parameters["height"]) ? $parameters["height"] : null);
 88:     }
 89:     
 90:     /**
 91:      * Returns a Size as an array
 92:      * 
 93:      * @return array
 94:      */
 95:     public function toArray(){
 96:         return array("width" => $this->width, "height" => $this->height);
 97:     }
 98: }
 99: 
100: ?>
101: 
Mapbender3 API documenation API documentation generated by ApiGen 2.8.0