PageRenderTime 18ms CodeModel.GetById 15ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/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/**
 9 * Represents an admin banner.
10 */
11class WPSEO_Admin_Banner {
12
13	/** @var string */
14	private $url;
15
16	/** @var string */
17	private $image;
18
19	/** @var integer */
20	private $width;
21
22	/** @var integer */
23	private $height;
24
25	/** @var string */
26	private $alt;
27
28	/**
29	 * Sets the attributes for this object.
30	 *
31	 * @param string  $url    The URL where the banner links to.
32	 * @param string  $image  The image filename.
33	 * @param integer $width  The width of the image.
34	 * @param integer $height The height of the image.
35	 * @param string  $alt    The alt text for the image.
36	 */
37	public function __construct( $url, $image, $width, $height, $alt = '' ) {
38		$this->url    = $url;
39		$this->image  = $image;
40		$this->alt    = $alt;
41		$this->width  = $width;
42		$this->height = $height;
43	}
44
45	/**
46	 * Returns the set url.
47	 *
48	 * @return string
49	 */
50	public function get_url() {
51		return $this->url;
52	}
53
54	/**
55	 * Returns the image.
56	 *
57	 * @return string
58	 */
59	public function get_image() {
60		return $this->image;
61	}
62
63	/**
64	 * Returns the alt-text.
65	 *
66	 * @return string
67	 */
68	public function get_alt() {
69		return $this->alt;
70	}
71
72	/**
73	 * Returns the width.
74	 *
75	 * @return string
76	 */
77	public function get_width() {
78		return $this->width;
79	}
80
81	/**
82	 * Returns the height.
83	 *
84	 * @return string
85	 */
86	public function get_height() {
87		return $this->height;
88	}
89}