WPSEO_Admin_Banner

Represents an admin banner.

Defined (1)

The class is defined in the following location(s).

/admin/banner/class-admin-banner.php  
  1. class WPSEO_Admin_Banner { 
  2.  
  3. /** @var string */ 
  4. private $url; 
  5.  
  6. /** @var string */ 
  7. private $image; 
  8.  
  9. /** @var integer */ 
  10. private $width; 
  11.  
  12. /** @var integer */ 
  13. private $height; 
  14.  
  15. /** @var string */ 
  16. private $alt; 
  17.  
  18. /** 
  19. * Sets the attributes for this object. 
  20. * @param string $url The URL where the banner links to. 
  21. * @param string $image The image filename. 
  22. * @param integer $width The width of the image. 
  23. * @param integer $height The height of the image. 
  24. * @param string $alt The alt text for the image. 
  25. */ 
  26. public function __construct( $url, $image, $width, $height, $alt = '' ) { 
  27. $this->url = $url; 
  28. $this->image = $image; 
  29. $this->alt = $alt; 
  30. $this->width = $width; 
  31. $this->height = $height; 
  32.  
  33. /** 
  34. * Returns the set url. 
  35. * @return string 
  36. */ 
  37. public function get_url() { 
  38. return $this->url; 
  39.  
  40. /** 
  41. * Returns the image. 
  42. * @return string 
  43. */ 
  44. public function get_image() { 
  45. return $this->image; 
  46.  
  47. /** 
  48. * Returns the alt-text. 
  49. * @return string 
  50. */ 
  51. public function get_alt() { 
  52. return $this->alt; 
  53.  
  54. /** 
  55. * Returns the width. 
  56. * @return string 
  57. */ 
  58. public function get_width() { 
  59. return $this->width; 
  60.  
  61. /** 
  62. * Returns the height. 
  63. * @return string 
  64. */ 
  65. public function get_height() { 
  66. return $this->height;