/** * Returns this pointer bound to closure. * * @return null */ public function getClosureThis() { return PHP_VERSION >= 50400 ? parent::getClosureThis() : null; }
/** * Returns class methods. * * @param integer $filter Methods filter * @return array */ public function getMethods($filter = null) { if (null === $this->methods) { $broker = $this->broker; $this->methods = array_map(function (InternalReflectionMethod $method) use($broker) { return ReflectionMethod::create($method, $broker); }, parent::getMethods()); } if (null === $filter) { return $this->methods; } return array_filter($this->methods, function (ReflectionMethod $method) use($filter) { return (bool) ($method->getModifiers() & $filter); }); }
/** * Returns if the method is variadic. * * @return boolean */ public function isVariadic() { return PHP_VERSION_ID >= 50600 ? parent::isVariadic() : null; }
/** * Returns class constructor reflection. * * @return \TokenReflection\Php\ReflectionClass|null */ public function getConstructor() { return ReflectionMethod::create(parent::getConstructor(), $this->broker); }