ApiGen\Templating\Filters\Helpers\ElementUrlFactory::createForProperty PHP Метод

createForProperty() публичный метод

public createForProperty ( ApiGen\Contracts\Parser\Reflection\PropertyReflectionInterface $property, ApiGen\Contracts\Parser\Reflection\ClassReflectionInterface $class = null ) : string
$property ApiGen\Contracts\Parser\Reflection\PropertyReflectionInterface
$class ApiGen\Contracts\Parser\Reflection\ClassReflectionInterface
Результат string
    public function createForProperty(PropertyReflectionInterface $property, ClassReflectionInterface $class = null)
    {
        $className = $class !== null ? $class->getName() : $property->getDeclaringClassName();
        return $this->createForClass($className) . '#' . ($property->isMagic() ? 'm' : '') . '$' . $property->getName();
    }

Usage Example

Пример #1
0
 /**
  * @return string
  */
 private function createForProperty(PropertyReflectionInterface $reflectionProperty, array $classes)
 {
     $text = $reflectionProperty->getDeclaringClassName() . '::' . Html::el('var')->setText('$' . $reflectionProperty->getName());
     return $this->linkBuilder->build($this->elementUrlFactory->createForProperty($reflectionProperty), $text, FALSE, $classes);
 }
All Usage Examples Of ApiGen\Templating\Filters\Helpers\ElementUrlFactory::createForProperty