* @author Gediminas Morkevicius * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ class Annotation extends AbstractAnnotationDriver { /** * Annotation to define that this object is loggable */ const SOFT_DELETEABLE = 'Gedmo\\Mapping\\Annotation\\SoftDeleteable'; /** * {@inheritDoc} */ public function readExtendedMetadata($meta, array &$config) { $class = $this->getMetaReflectionClass($meta); // class annotations if ($class !== null && $annot = $this->reader->getClassAnnotation($class, self::SOFT_DELETEABLE)) { $config['softDeleteable'] = true; Validator::validateField($meta, $annot->fieldName); $config['fieldName'] = $annot->fieldName; $config['timeAware'] = false; if(isset($annot->timeAware)){ if (!is_bool($annot->timeAware)) { throw new InvalidMappingException("timeAware must be boolean. ".gettype($annot->timeAware)." provided."); } $config['timeAware'] = $annot->timeAware; } } $this->validateFullMetadata($meta, $config); } }