예제 #1
0
 /**
  * Get a Reflector and documentation for a function, class or instance, constant, method or property.
  *
  * @param string $valueName Function, class, variable, constant, method or property name.
  * @param bool $classOnly True if the name should only refer to a class, function or instance
  *
  * @return array (value, Reflector)
  */
 protected function getTargetAndReflector($valueName, $classOnly = false)
 {
     list($value, $member, $kind) = $this->getTarget($valueName, $classOnly);
     return array($value, Mirror::get($value, $member, $kind));
 }
예제 #2
0
 /**
  * @expectedException \InvalidArgumentException
  * @dataProvider invalidArguments
  */
 public function testMirrorThrowsInvalidArgumentExceptions($value)
 {
     Mirror::get($value);
 }
예제 #3
0
 protected function presentSignature($target)
 {
     // This might get weird if the signature is actually for a reflector. Hrm.
     if (!$target instanceof \Reflector) {
         $target = Mirror::get($target);
     }
     return SignatureFormatter::format($target);
 }