summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2015-03-24 11:20:03 +0000
committerAlex Pott2015-03-24 11:20:03 +0000
commit58481b72f52526627c8b083066203c3d2f847bb6 (patch)
treef725a2bf62d9b947e5ab5c6ca56732e927033788
parent11f554993702b64202a2682af92f1a1b52113e97 (diff)
Issue #2454441 by rteijeiro, hussainweb, 17thColossus, nullkernel: Rename Typed Data classes to support PHP 7
-rw-r--r--core/config/schema/core.data_types.schema.yml8
-rw-r--r--core/lib/Drupal/Core/TypedData/Plugin/DataType/BinaryData.php (renamed from core/lib/Drupal/Core/TypedData/Plugin/DataType/Binary.php)6
-rw-r--r--core/lib/Drupal/Core/TypedData/Plugin/DataType/BooleanData.php (renamed from core/lib/Drupal/Core/TypedData/Plugin/DataType/Boolean.php)4
-rw-r--r--core/lib/Drupal/Core/TypedData/Plugin/DataType/DateTimeIso8601.php2
-rw-r--r--core/lib/Drupal/Core/TypedData/Plugin/DataType/DurationIso8601.php2
-rw-r--r--core/lib/Drupal/Core/TypedData/Plugin/DataType/Email.php2
-rw-r--r--core/lib/Drupal/Core/TypedData/Plugin/DataType/FloatData.php (renamed from core/lib/Drupal/Core/TypedData/Plugin/DataType/Float.php)4
-rw-r--r--core/lib/Drupal/Core/TypedData/Plugin/DataType/IntegerData.php (renamed from core/lib/Drupal/Core/TypedData/Plugin/DataType/Integer.php)4
-rw-r--r--core/lib/Drupal/Core/TypedData/Plugin/DataType/StringData.php (renamed from core/lib/Drupal/Core/TypedData/Plugin/DataType/String.php)4
-rw-r--r--core/lib/Drupal/Core/TypedData/Plugin/DataType/TimeSpan.php2
-rw-r--r--core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php2
-rw-r--r--core/lib/Drupal/Core/TypedData/Plugin/DataType/Uri.php2
-rw-r--r--core/lib/Drupal/Core/TypedData/TypedDataManager.php12
-rw-r--r--core/modules/config/src/Tests/ConfigSchemaTest.php6
-rw-r--r--core/modules/filter/src/Plugin/DataType/FilterFormat.php4
15 files changed, 32 insertions, 32 deletions
diff --git a/core/config/schema/core.data_types.schema.yml b/core/config/schema/core.data_types.schema.yml
index edd97ac..a06e3ad 100644
--- a/core/config/schema/core.data_types.schema.yml
+++ b/core/config/schema/core.data_types.schema.yml
@@ -21,19 +21,19 @@ ignore:
# Basic scalar data types from typed data.
boolean:
label: 'Boolean'
- class: '\Drupal\Core\TypedData\Plugin\DataType\Boolean'
+ class: '\Drupal\Core\TypedData\Plugin\DataType\BooleanData'
email:
label: 'Email'
class: '\Drupal\Core\TypedData\Plugin\DataType\Email'
integer:
label: 'Integer'
- class: '\Drupal\Core\TypedData\Plugin\DataType\Integer'
+ class: '\Drupal\Core\TypedData\Plugin\DataType\IntegerData'
float:
label: 'Float'
- class: '\Drupal\Core\TypedData\Plugin\DataType\Float'
+ class: '\Drupal\Core\TypedData\Plugin\DataType\FloatData'
string:
label: 'String'
- class: '\Drupal\Core\TypedData\Plugin\DataType\String'
+ class: '\Drupal\Core\TypedData\Plugin\DataType\StringData'
uri:
label: 'Uri'
class: '\Drupal\Core\TypedData\Plugin\DataType\Uri'
diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Binary.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/BinaryData.php
index f18a6af..a18c7d5 100644
--- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Binary.php
+++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/BinaryData.php
@@ -2,7 +2,7 @@
/**
* @file
- * Contains \Drupal\Core\TypedData\Plugin\DataType\Binary.
+ * Contains \Drupal\Core\TypedData\Plugin\DataType\BinaryData.
*/
namespace Drupal\Core\TypedData\Plugin\DataType;
@@ -23,7 +23,7 @@ use Drupal\Core\TypedData\TypedData;
* label = @Translation("Binary")
* )
*/
-class Binary extends PrimitiveBase implements BinaryInterface {
+class BinaryData extends PrimitiveBase implements BinaryInterface {
/**
* The file resource URI.
@@ -63,7 +63,7 @@ class Binary extends PrimitiveBase implements BinaryInterface {
}
elseif (is_string($value)) {
// Note: For performance reasons we store the given URI and access the
- // resource upon request. See Binary::getValue()
+ // resource upon request. See BinaryData::getValue()
$this->uri = $value;
$this->handle = NULL;
}
diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Boolean.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/BooleanData.php
index 874fcbb..adcef37 100644
--- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Boolean.php
+++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/BooleanData.php
@@ -2,7 +2,7 @@
/**
* @file
- * Contains \Drupal\Core\TypedData\Plugin\DataType\Boolean.
+ * Contains \Drupal\Core\TypedData\Plugin\DataType\BooleanData.
*/
namespace Drupal\Core\TypedData\Plugin\DataType;
@@ -21,7 +21,7 @@ use Drupal\Core\TypedData\Type\BooleanInterface;
* label = @Translation("Boolean")
* )
*/
-class Boolean extends PrimitiveBase implements BooleanInterface {
+class BooleanData extends PrimitiveBase implements BooleanInterface {
/**
* {@inheritdoc}
diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/DateTimeIso8601.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/DateTimeIso8601.php
index 8c35457..f01c230 100644
--- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/DateTimeIso8601.php
+++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/DateTimeIso8601.php
@@ -20,7 +20,7 @@ use Drupal\Core\TypedData\Type\DateTimeInterface;
* label = @Translation("Date")
* )
*/
-class DateTimeIso8601 extends String implements DateTimeInterface {
+class DateTimeIso8601 extends StringData implements DateTimeInterface {
/**
* {@inheritdoc}
diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/DurationIso8601.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/DurationIso8601.php
index eeedad4..0f26418 100644
--- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/DurationIso8601.php
+++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/DurationIso8601.php
@@ -19,7 +19,7 @@ use Drupal\Core\TypedData\Type\DurationInterface;
* label = @Translation("Duration")
* )
*/
-class DurationIso8601 extends String implements DurationInterface {
+class DurationIso8601 extends StringData implements DurationInterface {
/**
* {@inheritdoc}
diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Email.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Email.php
index 91740e5..b4c5682 100644
--- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Email.php
+++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Email.php
@@ -20,6 +20,6 @@ use Drupal\Core\TypedData\Type\StringInterface;
* constraints = {"Email" = {}}
* )
*/
-class Email extends String implements StringInterface {
+class Email extends StringData implements StringInterface {
}
diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Float.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/FloatData.php
index 3980f0a..e350a59 100644
--- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Float.php
+++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/FloatData.php
@@ -2,7 +2,7 @@
/**
* @file
- * Contains \Drupal\Core\TypedData\Plugin\DataType\Float.
+ * Contains \Drupal\Core\TypedData\Plugin\DataType\FloatData.
*/
namespace Drupal\Core\TypedData\Plugin\DataType;
@@ -21,7 +21,7 @@ use Drupal\Core\TypedData\Type\FloatInterface;
* label = @Translation("Float")
* )
*/
-class Float extends PrimitiveBase implements FloatInterface {
+class FloatData extends PrimitiveBase implements FloatInterface {
/**
* {@inheritdoc}
diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Integer.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/IntegerData.php
index b5fe36a..2244e96 100644
--- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Integer.php
+++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/IntegerData.php
@@ -2,7 +2,7 @@
/**
* @file
- * Contains \Drupal\Core\TypedData\Plugin\DataType\Integer.
+ * Contains \Drupal\Core\TypedData\Plugin\DataType\IntegerData.
*/
namespace Drupal\Core\TypedData\Plugin\DataType;
@@ -21,7 +21,7 @@ use Drupal\Core\TypedData\Type\IntegerInterface;
* label = @Translation("Integer")
* )
*/
-class Integer extends PrimitiveBase implements IntegerInterface {
+class IntegerData extends PrimitiveBase implements IntegerInterface {
/**
* {@inheritdoc}
diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/String.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/StringData.php
index dd0060f..134b3f2 100644
--- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/String.php
+++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/StringData.php
@@ -2,7 +2,7 @@
/**
* @file
- * Contains \Drupal\Core\TypedData\Plugin\DataType\String.
+ * Contains \Drupal\Core\TypedData\Plugin\DataType\StringData.
*/
namespace Drupal\Core\TypedData\Plugin\DataType;
@@ -21,7 +21,7 @@ use Drupal\Core\TypedData\Type\StringInterface;
* label = @Translation("String")
* )
*/
-class String extends PrimitiveBase implements StringInterface {
+class StringData extends PrimitiveBase implements StringInterface {
/**
* {@inheritdoc}
diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/TimeSpan.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/TimeSpan.php
index 94362dd..66a8d27 100644
--- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/TimeSpan.php
+++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/TimeSpan.php
@@ -25,7 +25,7 @@ use Drupal\Core\TypedData\Type\DurationInterface;
*
* @see \Drupal\Core\TypedData\Type\DurationIso8601
*/
-class TimeSpan extends Integer implements DurationInterface {
+class TimeSpan extends IntegerData implements DurationInterface {
/**
* {@inheritdoc}
diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php
index 800344b..512c90d 100644
--- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php
+++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php
@@ -18,7 +18,7 @@ use Drupal\Core\TypedData\Type\DateTimeInterface;
* label = @Translation("String")
* )
*/
-class Timestamp extends Integer implements DateTimeInterface {
+class Timestamp extends IntegerData implements DateTimeInterface {
/**
* The data value as a UNIX timestamp.
diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Uri.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Uri.php
index e9a0891..ac3d48d 100644
--- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Uri.php
+++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Uri.php
@@ -21,6 +21,6 @@ use Drupal\Core\TypedData\TypedData;
* label = @Translation("URI")
* )
*/
-class Uri extends String implements UriInterface {
+class Uri extends StringData implements UriInterface {
}
diff --git a/core/lib/Drupal/Core/TypedData/TypedDataManager.php b/core/lib/Drupal/Core/TypedData/TypedDataManager.php
index 7fe362e..18310bd 100644
--- a/core/lib/Drupal/Core/TypedData/TypedDataManager.php
+++ b/core/lib/Drupal/Core/TypedData/TypedDataManager.php
@@ -132,14 +132,14 @@ class TypedDataManager extends DefaultPluginManager {
*
* @see \Drupal::typedDataManager()
* @see \Drupal\Core\TypedData\TypedDataManager::getPropertyInstance()
- * @see \Drupal\Core\TypedData\Plugin\DataType\Integer
- * @see \Drupal\Core\TypedData\Plugin\DataType\Float
- * @see \Drupal\Core\TypedData\Plugin\DataType\String
- * @see \Drupal\Core\TypedData\Plugin\DataType\Boolean
- * @see \Drupal\Core\TypedData\Plugin\DataType\Duration
+ * @see \Drupal\Core\TypedData\Plugin\DataType\BinaryData
+ * @see \Drupal\Core\TypedData\Plugin\DataType\BooleanData
* @see \Drupal\Core\TypedData\Plugin\DataType\Date
+ * @see \Drupal\Core\TypedData\Plugin\DataType\Duration
+ * @see \Drupal\Core\TypedData\Plugin\DataType\FloatData
+ * @see \Drupal\Core\TypedData\Plugin\DataType\IntegerData
+ * @see \Drupal\Core\TypedData\Plugin\DataType\StringData
* @see \Drupal\Core\TypedData\Plugin\DataType\Uri
- * @see \Drupal\Core\TypedData\Plugin\DataType\Binary
*/
public function create(DataDefinitionInterface $definition, $value = NULL, $name = NULL, $parent = NULL) {
$typed_data = $this->createInstance($definition->getDataType(), array(
diff --git a/core/modules/config/src/Tests/ConfigSchemaTest.php b/core/modules/config/src/Tests/ConfigSchemaTest.php
index ca53a53..676401e 100644
--- a/core/modules/config/src/Tests/ConfigSchemaTest.php
+++ b/core/modules/config/src/Tests/ConfigSchemaTest.php
@@ -248,7 +248,7 @@ class ConfigSchemaTest extends KernelTestBase {
$expected = array(
'type' => 'config_schema_test.someschema.with_parents.key_1',
'label' => 'Test item nested one level',
- 'class' => '\Drupal\Core\TypedData\Plugin\DataType\String',
+ 'class' => '\Drupal\Core\TypedData\Plugin\DataType\StringData',
'definition_class' => '\Drupal\Core\TypedData\DataDefinition',
);
$this->assertEqual($definition, $expected);
@@ -259,7 +259,7 @@ class ConfigSchemaTest extends KernelTestBase {
$expected = array(
'type' => 'config_schema_test.someschema.with_parents.key_2',
'label' => 'Test item nested two levels',
- 'class' => '\Drupal\Core\TypedData\Plugin\DataType\String',
+ 'class' => '\Drupal\Core\TypedData\Plugin\DataType\StringData',
'definition_class' => '\Drupal\Core\TypedData\DataDefinition',
);
$this->assertEqual($definition, $expected);
@@ -270,7 +270,7 @@ class ConfigSchemaTest extends KernelTestBase {
$expected = array(
'type' => 'config_schema_test.someschema.with_parents.key_3',
'label' => 'Test item nested three levels',
- 'class' => '\Drupal\Core\TypedData\Plugin\DataType\String',
+ 'class' => '\Drupal\Core\TypedData\Plugin\DataType\StringData',
'definition_class' => '\Drupal\Core\TypedData\DataDefinition',
);
$this->assertEqual($definition, $expected);
diff --git a/core/modules/filter/src/Plugin/DataType/FilterFormat.php b/core/modules/filter/src/Plugin/DataType/FilterFormat.php
index 31ab7f7..74279f0 100644
--- a/core/modules/filter/src/Plugin/DataType/FilterFormat.php
+++ b/core/modules/filter/src/Plugin/DataType/FilterFormat.php
@@ -9,7 +9,7 @@ namespace Drupal\filter\Plugin\DataType;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\TypedData\OptionsProviderInterface;
-use Drupal\Core\TypedData\Plugin\DataType\String;
+use Drupal\Core\TypedData\Plugin\DataType\StringData;
/**
* The filter format data type.
@@ -19,7 +19,7 @@ use Drupal\Core\TypedData\Plugin\DataType\String;
* label = @Translation("Filter format")
* )
*/
-class FilterFormat extends String implements OptionsProviderInterface {
+class FilterFormat extends StringData implements OptionsProviderInterface {
/**
* {@inheritdoc}