# Call of appendStylesheet() or prependStylesheet()

**URL:** <https://discourse.laminas.dev/t/call-of-appendstylesheet-or-prependstylesheet/3943>\
**Category:** Components & MVC\
**Tags:** laminas-view\
**Created:** [August 1, 2025, 9:16am UTC](https://discourse.laminas.dev/t/call-of-appendstylesheet-or-prependstylesheet/3943 "2025-08-01T09:16:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mimmi20](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/mimmi20/32/1338_2.png) [@mimmi20](https://discourse.laminas.dev/u/mimmi20)\
**Post date:** [August 1, 2025, 9:16am UTC](https://discourse.laminas.dev/t/call-of-appendstylesheet-or-prependstylesheet/3943/1 "2025-08-01T09:16:46Z")

</div>

The appendStylesheet function is defined via a docblock.

```auto
@method HeadLink appendStylesheet($href, $media = 'screen', $conditionalStylesheet = '', $extras = [])

```

I wanted to call the method with named parameters.

```auto
$this->headLink()->appendStylesheet(
    href: $this->getUrl($href, $absolute, $pathPrefix),
    media: $media,
    conditionalStylesheet: $conditionalStylesheet,
    extras: $extras,
);

```

This fails.

Without named parameters this works fine. Is this intended?

---

<div class="post-metadata">

**Author:** ![froschdesign](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/froschdesign/32/38_2.png) [@froschdesign](https://discourse.laminas.dev/u/froschdesign)\
**Post date:** [August 1, 2025, 9:33am UTC](https://discourse.laminas.dev/t/call-of-appendstylesheet-or-prependstylesheet/3943/2 "2025-08-01T09:33:01Z")

</div>

> [@mimmi20](#):
>
> Without named parameters this works fine. Is this intended?

There is no real method with name `appendStylesheet`:

> <https://github.com/laminas/laminas-view/blob/ab63fd76444941e92c5ef1ed0ac59366b4fe9330/src/Helper/HeadLink.php#L153-L166>

(This will be changed in version 3 of laminas-view.)
