/wp-content/plugins/wordpress-seo/admin/banner/class-admin-banner.php

https://bitbucket.org/carloskikea/helpet · PHP · 89 lines · 30 code · 12 blank · 47 comment · 0 complexity · 40173303cd871953e8bdc94406c59d8c MD5 · raw file

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