Skip to content

Commit

Permalink
Move model interfaces into SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
Marek Fojtl committed Oct 25, 2021
1 parent 72f36fc commit 89d0756
Show file tree
Hide file tree
Showing 13 changed files with 239 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Model/IAttachment.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php


namespace PolyWeb\Attachment\Sdk\Model;

interface IAttachment
{
public function getName(): string;

public function getData(): array;

public function getColorScheme(): IColorScheme;
}
22 changes: 22 additions & 0 deletions src/Model/IAttachmentData.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php


namespace PolyWeb\Attachment\Sdk\Model;


interface IAttachmentData
{

public function getAttachmentName(): string;

public function getAttachmentData(): \stdClass;

/**
* @return mixed[]
*/
public function getAttachmentExtensionData(): array;

public function getColorSchemeId(): int;

public function getOrder(): int;
}
15 changes: 15 additions & 0 deletions src/Model/IAttachmentFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php


namespace PolyWeb\Attachment\Sdk\Model;


use Poly\Cms\Renderer\Renderer\Model\AttachmentModel;

interface IAttachmentFactory
{
/**
* @return AttachmentModel
*/
public function createAttachment(IAttachmentData $data): AttachmentModel;
}
10 changes: 10 additions & 0 deletions src/Model/IColorScheme.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php


namespace PolyWeb\Attachment\Sdk\Model;


interface IColorScheme
{
public function getId(): int;
}
10 changes: 10 additions & 0 deletions src/Model/IExtension.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php


namespace PolyWeb\Attachment\Sdk\Model;


interface IExtension
{
public function getExtNamespace(): string;
}
24 changes: 24 additions & 0 deletions src/Model/IImage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php


namespace PolyWeb\Attachment\Sdk\Model;


interface IImage
{
public function getId(): int;

public function getTitle(): string;

public function getFilePath(): string;

public function getThumbnail(int $thumb): IImageThumbnail;

public function getDescription(): string;

public function getFilename(): string;

public function getDominantColor(): string;

public function getTags(): array;
}
11 changes: 11 additions & 0 deletions src/Model/IImageThumbnail.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php


namespace PolyWeb\Attachment\Sdk\Model;


interface IImageThumbnail
{
public function getFilePath(): string;

}
10 changes: 10 additions & 0 deletions src/Model/IMenu.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
namespace PolyWeb\Attachment\Sdk\Model;

interface IMenu
{
/**
* @return IMenuItem[]
*/
public function getMenuItems(): array;
}
16 changes: 16 additions & 0 deletions src/Model/IMenuItem.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php
namespace PolyWeb\Attachment\Sdk\Model;

interface IMenuItem
{
/**
* @return IMenuItem[]
*/
public function getChildren(): array;

public function getRoute(): ?IRoute;

public function getRedirect(): ?string;

public function getPage(): ?IPage;
}
33 changes: 33 additions & 0 deletions src/Model/IPage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php
namespace PolyWeb\Attachment\Sdk\Model;

use Poly\Cms\Renderer\Model\Layout;
use Poly\Cms\Renderer\Model\SectionList;

interface IPage
{
public function getId(): int;

public function getName(): string;

public function getDescription(): string;

public function getKeywords(): string;

public function getLanguage(): string;

public function getTitle(): string;

public function getLayout(): Layout;

public function getSections(): SectionList;

public function isBlocked(): bool;

public function isStable(): bool;

/**
* @return IRoute[]
*/
public function getRoutes(): array;
}
34 changes: 34 additions & 0 deletions src/Model/IRoute.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
namespace PolyWeb\Attachment\Sdk\Model;


interface IRoute
{
public function getInputUrl(): string;


public function getRedirectToUrl(): ?string;


public function isReadGetEnabled(): bool;


public function isReadPostEnabled(): bool;


public function isWriteGetEnabled(): bool;


public function isReadingPostEnabled(): bool;


public function getMenuItem(): ?IMenuItem;

public function setMenuItem(IMenuItem $menuItem): IRoute;

public function getPage(): ?IPage;


public function getAnchor(): ?string;

}
24 changes: 24 additions & 0 deletions src/Model/IScriptContainer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace PolyWeb\Attachment\Sdk\Model;

interface IScriptContainer
{
public function getGtm(): ?string;

public function getGads(): ?string;

public function getSklik(): ?string;

public function getSklikRetargeting(): ?string;

public function getFbPixel(): ?string;

public function getNotifikuj(): ?string;

public function getSmartsupp(): ?string;

public function getToplist(): ?int;

public function getGa(): ?string;
}
17 changes: 17 additions & 0 deletions src/Model/ITag.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace PolyWeb\Attachment\Sdk\Model;

interface ITag
{
public function getId(): int;

public function getName(): string;

/**
* @return IImage[]
*/
public function getImages(): array;

public function addImage(IImage $image): self;
}

0 comments on commit 89d0756

Please sign in to comment.