123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- <?php
-
- namespace Gedmo\Mapping\Driver;
-
- use Gedmo\Mapping\Driver\AnnotationDriverInterface;
- use Doctrine\Common\Persistence\Mapping\ClassMetadata;
-
-
- abstract class AbstractAnnotationDriver implements AnnotationDriverInterface
- {
-
-
- protected $reader;
-
-
-
- protected $_originalDriver = null;
-
-
-
- protected $validTypes = array();
-
-
-
- public function setAnnotationReader($reader)
- {
- $this->reader = $reader;
- }
-
-
-
- public function setOriginalDriver($driver)
- {
- $this->_originalDriver = $driver;
- }
-
-
-
- public function getMetaReflectionClass($meta)
- {
- $class = $meta->getReflectionClass();
- if (!$class) {
-
-
-
- $class = new \ReflectionClass($meta->name);
- }
-
- return $class;
- }
-
-
-
- protected function isValidField($meta, $field)
- {
- $mapping = $meta->getFieldMapping($field);
-
- return $mapping && in_array($mapping['type'], $this->validTypes);
- }
-
-
-
- public function validateFullMetadata(ClassMetadata $meta, array $config)
- {
- }
-
- }
|