# optimole-wp/trunk/vendor/enshrined/svg-sanitize/src/ElementReference/Usage.php

Optimole – Optimize Images | Convert WebP &amp; AVIF | CDN &amp; Lazy Load | Image Optimization, version trunk. 49 lines.

- Page: https://pluginprobe.com/plugins/optimole-wp/trunk/code/vendor/enshrined/svg-sanitize/src/ElementReference/Usage.php
- Raw: https://pluginprobe.com/plugins/optimole-wp/trunk/raw/vendor/enshrined/svg-sanitize/src/ElementReference/Usage.php
- Modified: 2024-05-14T07:52:22+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/optimole-wp/trunk/code/vendor/enshrined/svg-sanitize/src/ElementReference/Usage.php#L10-L20`.

```php
<?php
namespace enshrined\svgSanitize\ElementReference;

class Usage
{
    /**
     * @var Subject
     */
    protected $subject;

    /**
     * @var int
     */
    protected $count;

    /**
     * @param Subject $subject
     * @param int $count
     */
    public function __construct(Subject $subject, $count = 1)
    {
        $this->subject = $subject;
        $this->count = (int)$count;
    }

    /**
     * @param int $by
     */
    public function increment($by = 1)
    {
        $this->count += (int)$by;
    }

    /**
     * @return Subject
     */
    public function getSubject()
    {
        return $this->subject;
    }

    /**
     * @return int
     */
    public function getCount()
    {
        return $this->count;
    }
}
```
