ApiGen\Templating\Filters\Helpers\ElementUrlFactory::createForElement PHP Method

createForElement() public method

public createForElement ( ApiGen\Contracts\Parser\Reflection\ElementReflectionInterface | string $element ) : string | null
$element ApiGen\Contracts\Parser\Reflection\ElementReflectionInterface | string
return string | null
    public function createForElement($element)
    {
        if ($element instanceof ClassReflectionInterface) {
            return $this->createForClass($element);
        } elseif ($element instanceof MethodReflectionInterface) {
            return $this->createForMethod($element);
        } elseif ($element instanceof PropertyReflectionInterface) {
            return $this->createForProperty($element);
        } elseif ($element instanceof ConstantReflectionInterface) {
            return $this->createForConstant($element);
        } elseif ($element instanceof FunctionReflectionInterface) {
            return $this->createForFunction($element);
        }
        return null;
    }

Usage Example

コード例 #1
0
 /**
  * @return string
  */
 public function elementUrl(ElementReflectionInterface $element)
 {
     return $this->elementUrlFactory->createForElement($element);
 }
All Usage Examples Of ApiGen\Templating\Filters\Helpers\ElementUrlFactory::createForElement