Using new wrapper

This commit is contained in:
Pablo Ferreiro 2022-02-13 22:21:08 +01:00
parent 19e2c32c77
commit a3ebb08d26
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
22 changed files with 141 additions and 154 deletions

View file

@ -0,0 +1,16 @@
<?php
namespace App\Models;
use TikScraper\Models\Discover;
/**
* Base for templates with a feed
*/
class DiscoverTemplate extends BaseTemplate {
public Discover $feed;
function __construct(Discover $feed) {
parent::__construct('Discover');
$this->feed = $feed;
}
}

View file

@ -1,13 +1,15 @@
<?php
namespace App\Models;
use TikScraper\Models\Feed;
/**
* Base for templates with a feed
*/
class FeedTemplate extends BaseTemplate {
public object $feed;
public Feed $feed;
function __construct(string $title, object $feed) {
function __construct(string $title, Feed $feed) {
parent::__construct($title);
$this->feed = $feed;
}

View file

@ -1,14 +0,0 @@
<?php
namespace App\Models;
/**
* Base for templates with item (only /video at the time)
*/
class ItemTemplate extends BaseTemplate {
public object $item;
function __construct(string $title, object $item) {
parent::__construct($title);
$this->item = $item;
}
}