8000 Add convenient interface for read and write accessors · symfony/symfony@8a6690b · GitHub
[go: up one dir, main page]

Skip to content

Commit 8a6690b

Browse files
committed
Add convenient interface for read and write accessors
1 parent 849250a commit 8a6690b

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\PropertyInfo;
13+
14+
/**
15+
* Extracts read accessor and write mutator for property of a class.
16+
*
17+
* @author Joel Wurtz <jwurtz@jolicode.com>
18+
*/
19+
interface AccessorExtractorInterface extends ReadAccessorExtractorInterface, WriteMutatorExtractorInterface
20+
{
21+
}

src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,14 @@
1212
namespace Symfony\Component\PropertyInfo\Extractor;
1313

1414
use Symfony\Component\Inflector\Inflector;
15+
use Symfony\Component\PropertyInfo\AccessorExtractorInterface;
1516
use Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface;
1617
use Symfony\Component\PropertyInfo\PropertyInitializableExtractorInterface;
1718
use Symfony\Component\PropertyInfo\PropertyListExtractorInterface;
1819
use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface;
1920
use Symfony\Component\PropertyInfo\ReadAccessor;
20-
use Symfony\Component\PropertyInfo\ReadAccessorExtractorInterface;
2121
use Symfony\Component\PropertyInfo\Type;
2222
use Symfony\Component\PropertyInfo\WriteMutator;
23-
use Symfony\Component\PropertyInfo\WriteMutatorExtractorInterface;
2423

2524
/**
2625
* Extracts data using the reflection API.
@@ -29,7 +28,7 @@
2928
*
3029
* @final
3130
*/
32-
class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTypeExtractorInterface, PropertyAccessExtractorInterface, PropertyInitializableExtractorInterface, ReadAccessorExtractorInterface, WriteMutatorExtractorInterface
31+
class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTypeExtractorInterface, PropertyAccessExtractorInterface, PropertyInitializableExtractorInterface, AccessorExtractorInterface
3332
{
3433
/**
3534
* @internal

0 commit comments

Comments
 (0)
0