Skip to content

Commit

Permalink
TASK: Change all the namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
skurfuerst committed Nov 24, 2016
1 parent 6dd54e1 commit dfa23c6
Show file tree
Hide file tree
Showing 117 changed files with 893 additions and 889 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
namespace TYPO3\Form\Core\Model;
namespace Neos\Form\Core\Model;

/*
* This file is part of the TYPO3.Form package.
* This file is part of the Neos.Form package.
*
* (c) Contributors of the Neos Project - www.neos.io
*
Expand All @@ -11,14 +11,14 @@
* source code.
*/

use TYPO3\Form\Core\Model\FinisherContext;
use Neos\Form\Core\Model\FinisherContext;

/**
* Finisher base class.
*
* **This class is meant to be subclassed by developers**
*/
abstract class AbstractFinisher implements \TYPO3\Form\Core\Model\FinisherInterface
abstract class AbstractFinisher implements \Neos\Form\Core\Model\FinisherInterface
{
/**
* The options which have been set from the outside. Instead of directly
Expand All @@ -40,7 +40,7 @@ abstract class AbstractFinisher implements \TYPO3\Form\Core\Model\FinisherInterf
protected $defaultOptions = array();

/**
* @var \TYPO3\Form\Core\Model\FinisherContext
* @var \Neos\Form\Core\Model\FinisherContext
* @api
*/
protected $finisherContext;
Expand Down Expand Up @@ -71,7 +71,7 @@ public function setOption($optionName, $optionValue)
/**
* Executes the finisher
*
* @param \TYPO3\Form\Core\Model\FinisherContext $finisherContext The Finisher context that contains the current Form Runtime and Response
* @param \Neos\Form\Core\Model\FinisherContext $finisherContext The Finisher context that contains the current Form Runtime and Response
* @return void
* @api
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
namespace TYPO3\Form\Core\Model;
namespace Neos\Form\Core\Model;

/*
* This file is part of the TYPO3.Form package.
* This file is part of the Neos.Form package.
*
* (c) Contributors of the Neos Project - www.neos.io
*
Expand All @@ -25,11 +25,11 @@
* Subclassing this class is a good starting-point for implementing custom PHP-based
* Form Elements.
*
* Most of the functionality and API is implemented in {@link \TYPO3\Form\Core\Model\Renderable\AbstractRenderable}, so
* Most of the functionality and API is implemented in {@link \Neos\Form\Core\Model\Renderable\AbstractRenderable}, so
* make sure to check out this class as well.
*
* Still, it is quite rare that you need to subclass this class; often
* you can just use the {@link \TYPO3\Form\FormElements\GenericFormElement} and replace some templates.
* you can just use the {@link \Neos\Form\FormElements\GenericFormElement} and replace some templates.
*/
abstract class AbstractFormElement extends Renderable\AbstractRenderable implements FormElementInterface
{
Expand All @@ -44,12 +44,12 @@ abstract class AbstractFormElement extends Renderable\AbstractRenderable impleme
* @param string $identifier The FormElement's identifier
* @param string $type The Form Element Type
* @api
* @throws \TYPO3\Form\Exception\IdentifierNotValidException
* @throws \Neos\Form\Exception\IdentifierNotValidException
*/
public function __construct($identifier, $type)
{
if (!is_string($identifier) || strlen($identifier) === 0) {
throw new \TYPO3\Form\Exception\IdentifierNotValidException('The given identifier was not a string or the string was empty.', 1325574803);
throw new \Neos\Form\Exception\IdentifierNotValidException('The given identifier was not a string or the string was empty.', 1325574803);
}
$this->identifier = $identifier;
$this->type = $type;
Expand Down Expand Up @@ -139,11 +139,11 @@ public function getProperties()
/**
* Override this method in your custom FormElements if needed
*
* @param \TYPO3\Form\Core\Runtime\FormRuntime $formRuntime
* @param \Neos\Form\Core\Runtime\FormRuntime $formRuntime
* @param mixed $elementValue
* @return void
*/
public function onSubmit(\TYPO3\Form\Core\Runtime\FormRuntime $formRuntime, &$elementValue)
public function onSubmit(\Neos\Form\Core\Runtime\FormRuntime $formRuntime, &$elementValue)
{
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
namespace TYPO3\Form\Core\Model;
namespace Neos\Form\Core\Model;

/*
* This file is part of the TYPO3.Form package.
* This file is part of the Neos.Form package.
*
* (c) Contributors of the Neos Project - www.neos.io
*
Expand Down Expand Up @@ -31,13 +31,13 @@ abstract class AbstractSection extends Renderable\AbstractCompositeRenderable
*
* @param string $identifier The Section identifier
* @param string $type The Section type
* @throws \TYPO3\Form\Exception\IdentifierNotValidException if the identifier was no non-empty string
* @throws \Neos\Form\Exception\IdentifierNotValidException if the identifier was no non-empty string
* @api
*/
public function __construct($identifier, $type)
{
if (!is_string($identifier) || strlen($identifier) === 0) {
throw new \TYPO3\Form\Exception\IdentifierNotValidException('The given identifier was not a string or the string was empty.', 1325574803);
throw new \Neos\Form\Exception\IdentifierNotValidException('The given identifier was not a string or the string was empty.', 1325574803);
}

$this->identifier = $identifier;
Expand All @@ -47,7 +47,7 @@ public function __construct($identifier, $type)
/**
* Get the child Form Elements
*
* @return array<\TYPO3\Form\Core\Model\FormElementInterface> The Page's elements
* @return array<\Neos\Form\Core\Model\FormElementInterface> The Page's elements
* @api
*/
public function getElements()
Expand All @@ -58,7 +58,7 @@ public function getElements()
/**
* Get the child Form Elements
*
* @return array<\TYPO3\Form\Core\Model\FormElementInterface> The Page's elements
* @return array<\Neos\Form\Core\Model\FormElementInterface> The Page's elements
* @api
*/
public function getElementsRecursively()
Expand All @@ -71,7 +71,7 @@ public function getElementsRecursively()
*
* @param FormElementInterface $formElement The form element to add
* @return void
* @throws \TYPO3\Form\Exception\FormDefinitionConsistencyException if FormElement is already added to a section
* @throws \Neos\Form\Exception\FormDefinitionConsistencyException if FormElement is already added to a section
* @api
*/
public function addElement(FormElementInterface $formElement)
Expand All @@ -90,9 +90,9 @@ public function addElement(FormElementInterface $formElement)
*
* @param string $identifier Identifier of the new form element
* @param string $typeName type of the new form element
* @return \TYPO3\Form\Core\Model\FormElementInterface the newly created form element
* @throws \TYPO3\Form\Exception\TypeDefinitionNotFoundException
* @throws \TYPO3\Form\Exception\TypeDefinitionNotValidException
* @return \Neos\Form\Core\Model\FormElementInterface the newly created form element
* @throws \Neos\Form\Exception\TypeDefinitionNotFoundException
* @throws \Neos\Form\Exception\TypeDefinitionNotValidException
* @api
*/
public function createElement($identifier, $typeName)
Expand All @@ -101,18 +101,18 @@ public function createElement($identifier, $typeName)

try {
$typeDefinition = $formDefinition->getFormFieldTypeManager()->getMergedTypeDefinition($typeName);
} catch (\TYPO3\Form\Exception\TypeDefinitionNotFoundException $exception) {
} catch (\Neos\Form\Exception\TypeDefinitionNotFoundException $exception) {
$element = new UnknownFormElement($identifier, $typeName);
$this->addElement($element);
return $element;
}
if (!isset($typeDefinition['implementationClassName'])) {
throw new \TYPO3\Form\Exception\TypeDefinitionNotFoundException(sprintf('The "implementationClassName" was not set in type definition "%s".', $typeName), 1325689855);
throw new \Neos\Form\Exception\TypeDefinitionNotFoundException(sprintf('The "implementationClassName" was not set in type definition "%s".', $typeName), 1325689855);
}
$implementationClassName = $typeDefinition['implementationClassName'];
$element = new $implementationClassName($identifier, $typeName);
if (!$element instanceof \TYPO3\Form\Core\Model\FormElementInterface) {
throw new \TYPO3\Form\Exception\TypeDefinitionNotValidException(sprintf('The "implementationClassName" for element "%s" ("%s") does not implement the FormElementInterface.', $identifier, $implementationClassName), 1327318156);
if (!$element instanceof \Neos\Form\Core\Model\FormElementInterface) {
throw new \Neos\Form\Exception\TypeDefinitionNotValidException(sprintf('The "implementationClassName" for element "%s" ("%s") does not implement the FormElementInterface.', $identifier, $implementationClassName), 1327318156);
}
unset($typeDefinition['implementationClassName']);

Expand Down Expand Up @@ -168,14 +168,14 @@ public function removeElement(FormElementInterface $elementToRemove)
/**
* This callback is invoked by the FormRuntime whenever values are mapped and validated
* (after a form page was submitted)
* @see \TYPO3\Form\Core\Runtime\FormRuntime::mapAndValidate()
* @see \Neos\Form\Core\Runtime\FormRuntime::mapAndValidate()
*
* @param \TYPO3\Form\Core\Runtime\FormRuntime $formRuntime
* @param \Neos\Form\Core\Runtime\FormRuntime $formRuntime
* @param mixed $elementValue submitted value of the element *before post processing*
* @return void
* @api
*/
public function onSubmit(\TYPO3\Form\Core\Runtime\FormRuntime $formRuntime, &$elementValue)
public function onSubmit(\Neos\Form\Core\Runtime\FormRuntime $formRuntime, &$elementValue)
{
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
namespace TYPO3\Form\Core\Model;
namespace Neos\Form\Core\Model;

/*
* This file is part of the TYPO3.Form package.
* This file is part of the Neos.Form package.
*
* (c) Contributors of the Neos Project - www.neos.io
*
Expand All @@ -11,7 +11,7 @@
* source code.
*/

use TYPO3\Form\Core\Runtime\FormRuntime;
use Neos\Form\Core\Runtime\FormRuntime;

/**
* The context that is passed to each finisher when executed.
Expand All @@ -32,13 +32,13 @@ class FinisherContext
/**
* A reference to the Form Runtime that the finisher belongs to
*
* @var \TYPO3\Form\Core\Runtime\FormRuntime
* @var \Neos\Form\Core\Runtime\FormRuntime
* @internal
*/
protected $formRuntime;

/**
* @param \TYPO3\Form\Core\Runtime\FormRuntime $formRuntime
* @param \Neos\Form\Core\Runtime\FormRuntime $formRuntime
* @internal
*/
public function __construct(FormRuntime $formRuntime)
Expand Down Expand Up @@ -71,7 +71,7 @@ public function isCancelled()
/**
* The Form Runtime that is associated with the current finisher
*
* @return \TYPO3\Form\Core\Runtime\FormRuntime
* @return \Neos\Form\Core\Runtime\FormRuntime
* @api
*/
public function getFormRuntime()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
namespace TYPO3\Form\Core\Model;
namespace Neos\Form\Core\Model;

/*
* This file is part of the TYPO3.Form package.
* This file is part of the Neos.Form package.
*
* (c) Contributors of the Neos Project - www.neos.io
*
Expand All @@ -11,7 +11,7 @@
* source code.
*/

use TYPO3\Form\Core\Model\FinisherContext;
use Neos\Form\Core\Model\FinisherContext;

/**
* Finisher that can be attached to a form in order to be invoked
Expand All @@ -22,7 +22,7 @@ interface FinisherInterface
/**
* Executes the finisher
*
* @param \TYPO3\Form\Core\Model\FinisherContext $finisherContext The Finisher context that contains the current Form Runtime and Response
* @param \Neos\Form\Core\Model\FinisherContext $finisherContext The Finisher context that contains the current Form Runtime and Response
* @return void
* @api
*/
Expand Down

0 comments on commit dfa23c6

Please sign in to comment.