This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/PropertyInfo/Tests/Fixtures/DummyExtractor.php
2015-09-26 09:46:20 +02:00

73 lines
1.7 KiB
PHP

<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\PropertyInfo\Tests\Fixtures;
use Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface;
use Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface;
use Symfony\Component\PropertyInfo\PropertyListExtractorInterface;
use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface;
use Symfony\Component\PropertyInfo\Type;
/**
* @author Kévin Dunglas <dunglas@gmail.com>
*/
class DummyExtractor implements PropertyListExtractorInterface, PropertyDescriptionExtractorInterface, PropertyTypeExtractorInterface, PropertyAccessExtractorInterface
{
/**
* {@inheritdoc}
*/
public function getShortDescription($class, $property, array $context = array())
{
return 'short';
}
/**
* {@inheritdoc}
*/
public function getLongDescription($class, $property, array $context = array())
{
return 'long';
}
/**
* {@inheritdoc}
*/
public function getTypes($class, $property, array $context = array())
{
return array(new Type(Type::BUILTIN_TYPE_INT));
}
/**
* {@inheritdoc}
*/
public function isReadable($class, $property, array $context = array())
{
return true;
}
/**
* {@inheritdoc}
*/
public function isWritable($class, $property, array $context = array())
{
return true;
}
/**
* {@inheritdoc}
*/
public function getProperties($class, array $context = array())
{
return array('a', 'b');
}
}