[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/vendor/ocramius/proxy-manager/src/ProxyManager/ProxyGenerator/Util/ -> GetMethodIfExists.php (source)

   1  <?php
   2  
   3  declare(strict_types=1);
   4  
   5  namespace ProxyManager\ProxyGenerator\Util;
   6  
   7  use ReflectionClass;
   8  use ReflectionMethod;
   9  
  10  /**
  11   * Internal utility class - allows fetching a method from a given class, if it exists
  12   *
  13   * @author Marco Pivetta <ocramius@gmail.com>
  14   * @license MIT
  15   */
  16  final class GetMethodIfExists
  17  {
  18      private function __construct()
  19      {
  20      }
  21  
  22      public static function get(ReflectionClass $class, string $method) : ?ReflectionMethod
  23      {
  24          return $class->hasMethod($method) ? $class->getMethod($method) : null;
  25      }
  26  }


Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1