+++ /dev/null
-<?php
-namespace wcf\system\form\builder;
-use wcf\system\form\builder\field\data\IFormFieldDataProcessor;
-
-/**
- * Data processor implementation for form fields that populates or manipulates the
- * parameters array passed to the constructor of a database object action.
- *
- * @author Matthias Schmidt
- * @copyright 2001-2018 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package WoltLabSuite\Core\System\Form\Builder\Field\Data
- * @since 3.2
- */
-class FormDataHandler implements IFormDataHandler {
- /**
- * field data processors
- * @var IFormFieldDataProcessor[]
- */
- protected $processors = [];
-
- /**
- * @inheritDoc
- */
- public function add(IFormFieldDataProcessor $processor) {
- $this->processors[] = $processor;
-
- return $this;
- }
-
- /**
- * @inheritDoc
- */
- public function getData(IFormDocument $document) {
- $parameters = [];
- foreach ($this->processors as $processor) {
- $parameters = $processor($document, $parameters);
- }
-
- return $parameters;
- }
-}
<?php
namespace wcf\system\form\builder;
use wcf\data\IStorableObject;
+use wcf\system\form\builder\data\FormDataHandler;
+use wcf\system\form\builder\data\IFormDataHandler;
use wcf\system\form\builder\field\data\DefaultFormFieldDataProcessor;
use wcf\system\form\builder\field\IFileFormField;
use wcf\system\form\builder\field\IFormField;
+++ /dev/null
-<?php
-namespace wcf\system\form\builder;
-use wcf\system\form\builder\field\data\IFormFieldDataProcessor;
-
-/**
- * Represents a data handler that extracts the data of a form document into an array
- * that can be passed to the constructor of a database object action.
- *
- * @author Matthias Schmidt
- * @copyright 2001-2018 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package WoltLabSuite\Core\System\Form\Builder
- * @since 3.2
- */
-interface IFormDataHandler {
- /**
- * Adds the given field data processor to this data handler and returns
- * this data handler.
- *
- * @param IFormFieldDataProcessor $processor added field data processor
- * @return static this data handler
- */
- public function add(IFormFieldDataProcessor $processor);
-
- /**
- * Returns the data from the given form that is passed as the parameters
- * array to a database object action.
- *
- * @param IFormDocument $document processed form document
- * @return array data passed to database object action
- */
- public function getData(IFormDocument $document);
-}
<?php
namespace wcf\system\form\builder;
use wcf\data\IStorableObject;
+use wcf\system\form\builder\data\IFormDataHandler;
/**
* Represents a "whole" form (document).
--- /dev/null
+<?php
+namespace wcf\system\form\builder\data;
+use wcf\system\form\builder\field\data\IFormFieldDataProcessor;
+use wcf\system\form\builder\IFormDocument;
+
+/**
+ * Data processor implementation for form fields that populates or manipulates the
+ * parameters array passed to the constructor of a database object action.
+ *
+ * @author Matthias Schmidt
+ * @copyright 2001-2018 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core\System\Form\Builder\Data
+ * @since 3.2
+ */
+class FormDataHandler implements IFormDataHandler {
+ /**
+ * field data processors
+ * @var IFormFieldDataProcessor[]
+ */
+ protected $processors = [];
+
+ /**
+ * @inheritDoc
+ */
+ public function add(IFormFieldDataProcessor $processor) {
+ $this->processors[] = $processor;
+
+ return $this;
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function getData(IFormDocument $document) {
+ $parameters = [];
+ foreach ($this->processors as $processor) {
+ $parameters = $processor($document, $parameters);
+ }
+
+ return $parameters;
+ }
+}
--- /dev/null
+<?php
+namespace wcf\system\form\builder\data;
+use wcf\system\form\builder\field\data\IFormFieldDataProcessor;
+use wcf\system\form\builder\IFormDocument;
+
+/**
+ * Represents a data handler that extracts the data of a form document into an array
+ * that can be passed to the constructor of a database object action.
+ *
+ * @author Matthias Schmidt
+ * @copyright 2001-2018 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core\System\Form\Builder\Data
+ * @since 3.2
+ */
+interface IFormDataHandler {
+ /**
+ * Adds the given field data processor to this data handler and returns
+ * this data handler.
+ *
+ * @param IFormFieldDataProcessor $processor added field data processor
+ * @return static this data handler
+ */
+ public function add(IFormFieldDataProcessor $processor);
+
+ /**
+ * Returns the data from the given form that is passed as the parameters
+ * array to a database object action.
+ *
+ * @param IFormDocument $document processed form document
+ * @return array data passed to database object action
+ */
+ public function getData(IFormDocument $document);
+}