vendor/sulu/sulu/src/Sulu/Component/Webspace/CustomUrl.php line 19

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of Sulu.
  4.  *
  5.  * (c) Sulu GmbH
  6.  *
  7.  * This source file is subject to the MIT license that is bundled
  8.  * with this source code in the file LICENSE.
  9.  */
  10. namespace Sulu\Component\Webspace;
  11. use Sulu\Component\Util\ArrayableInterface;
  12. /**
  13.  * Contains information about custom-url.
  14.  */
  15. class CustomUrl implements ArrayableInterface
  16. {
  17.     /**
  18.      * The url itself.
  19.      *
  20.      * @var string
  21.      */
  22.     private $url;
  23.     public function __construct($url null)
  24.     {
  25.         $this->url $url;
  26.     }
  27.     public function getUrl()
  28.     {
  29.         return $this->url;
  30.     }
  31.     /**
  32.      * Sets the url.
  33.      *
  34.      * @param string $url
  35.      */
  36.     public function setUrl($url)
  37.     {
  38.         $this->url $url;
  39.     }
  40.     public function toArray($depth null)
  41.     {
  42.         return ['url' => $this->getUrl()];
  43.     }
  44. }