Mercurial > hg > isophonics-drupal-site
view core/modules/migrate/src/Plugin/Discovery/StaticReflectionParser.php @ 13:5fb285c0d0e3
Update Drupal core to 8.4.7 via Composer. Security update; I *think* we've
been lucky to get away with this so far, as we don't support self-registration
which seems to be used by the so-called "drupalgeddon 2" attack that 8.4.5
was vulnerable to.
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:33:26 +0100 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line source
<?php namespace Drupal\migrate\Plugin\Discovery; use Doctrine\Common\Reflection\StaticReflectionParser as BaseStaticReflectionParser; /** * Allows getting the reflection parser for the parent class. * * @internal * This is a temporary solution to the fact that migration source plugins have * more than one provider. This functionality will be moved to core in * https://www.drupal.org/node/2786355. */ class StaticReflectionParser extends BaseStaticReflectionParser { /** * If the current class extends another, get the parser for the latter. * * @param \Doctrine\Common\Reflection\StaticReflectionParser $parser * The current static parser. * @param $finder * The class finder. Must implement * \Doctrine\Common\Reflection\ClassFinderInterface, but can do so * implicitly (i.e., implements the interface's methods but not the actual * interface). * * @return static|null * The static parser for the parent if there's a parent class or NULL. */ public static function getParentParser(BaseStaticReflectionParser $parser, $finder) { // Ensure the class has been parsed before accessing the parentClassName // property. $parser->parse(); if ($parser->parentClassName) { return new static($parser->parentClassName, $finder, $parser->classAnnotationOptimize); } } }