Browse Source

Add docblocks.

ADmad 7 years ago
parent
commit
97c9ba188c
1 changed files with 16 additions and 0 deletions
  1. 16 0
      src/Form/Form.php

+ 16 - 0
src/Form/Form.php

@@ -94,6 +94,7 @@ class Form implements EventListenerInterface, EventDispatcherInterface, Validato
      * Form's data.
      *
      * @var array
+     * @since 3.7.0
      */
     protected $_data = [];
 
@@ -312,6 +313,14 @@ class Form implements EventListenerInterface, EventDispatcherInterface, Validato
         return true;
     }
 
+    /**
+     * Get field data.
+     *
+     * @param string|null $field The field name or null to get data array with
+     *   all fields.
+     * @return mixed
+     * @since 3.7.0
+     */
     public function getData($field = null)
     {
         if ($field === null) {
@@ -321,6 +330,13 @@ class Form implements EventListenerInterface, EventDispatcherInterface, Validato
         return Hash::get($this->_data, $field);
     }
 
+    /**
+     * Set form data.
+     *
+     * @param array $data Data array.
+     * @return $this
+     * @since 3.7.0
+     */
     public function setData(array $data)
     {
         $this->_data = $data;