comparison vendor/symfony/event-dispatcher/GenericEvent.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 1fec387a4317
children af1871eacc83
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
27 * Encapsulate an event with $subject and $args. 27 * Encapsulate an event with $subject and $args.
28 * 28 *
29 * @param mixed $subject The subject of the event, usually an object or a callable 29 * @param mixed $subject The subject of the event, usually an object or a callable
30 * @param array $arguments Arguments to store in the event 30 * @param array $arguments Arguments to store in the event
31 */ 31 */
32 public function __construct($subject = null, array $arguments = array()) 32 public function __construct($subject = null, array $arguments = [])
33 { 33 {
34 $this->subject = $subject; 34 $this->subject = $subject;
35 $this->arguments = $arguments; 35 $this->arguments = $arguments;
36 } 36 }
37 37
38 /** 38 /**
39 * Getter for subject property. 39 * Getter for subject property.
40 * 40 *
41 * @return mixed $subject The observer subject 41 * @return mixed The observer subject
42 */ 42 */
43 public function getSubject() 43 public function getSubject()
44 { 44 {
45 return $this->subject; 45 return $this->subject;
46 } 46 }
93 * 93 *
94 * @param array $args Arguments 94 * @param array $args Arguments
95 * 95 *
96 * @return $this 96 * @return $this
97 */ 97 */
98 public function setArguments(array $args = array()) 98 public function setArguments(array $args = [])
99 { 99 {
100 $this->arguments = $args; 100 $this->arguments = $args;
101 101
102 return $this; 102 return $this;
103 } 103 }