HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/8.0.30
System: Linux multiplicar 3.10.0-1160.102.1.el7.x86_64 #1 SMP Tue Oct 17 15:42:21 UTC 2023 x86_64
User: root (0)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: /var/www/html/aprender.faexito.org/lib/lti1p3/src/LtiDeepLinkResourceIframe.php
<?php

namespace Packback\Lti1p3;

class LtiDeepLinkResourceIframe
{
    private ?int $width;
    private ?int $height;

    public function __construct(int $width = null, int $height = null)
    {
        $this->width = $width ?? null;
        $this->height = $height ?? null;
    }

    public static function new(): LtiDeepLinkResourceIframe
    {
        return new LtiDeepLinkResourceIframe();
    }

    public function setWidth(?int $width): LtiDeepLinkResourceIframe
    {
        $this->width = $width;

        return $this;
    }

    public function getWidth(): ?int
    {
        return $this->width;
    }

    public function setHeight(?int $height): LtiDeepLinkResourceIframe
    {
        $this->height = $height;

        return $this;
    }

    public function getHeight(): ?int
    {
        return $this->height;
    }

    public function toArray(): array
    {
        $iframe = [];

        if (isset($this->width)) {
            $iframe['width'] = $this->width;
        }
        if (isset($this->height)) {
            $iframe['height'] = $this->height;
        }

        return $iframe;
    }
}