Skip to content

Commit

Permalink
Tracking: fill interfaces, add info objects
Browse files Browse the repository at this point in the history
  • Loading branch information
chlulei committed Nov 14, 2024
1 parent 79dc672 commit 925ac8e
Show file tree
Hide file tree
Showing 11 changed files with 133 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
* If this is not the case or you just want to try ILIAS, you'll find
* us at:
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
*********************************************************************/

declare(strict_types=0);

namespace ILIAS\Tracking\View\DataRetrieval\Info;

use ILIAS\Tracking\View\DataRetrieval\Info\LPInfoInterface;
use ILIAS\Tracking\View\DataRetrieval\Info\ObjectInfoInterface;

interface CombinedInfoInterface
{
public function getLPInfo(): LPInfoInterface;

public function getObjectInfo(): ObjectInfoInterface;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@

namespace ILIAS\Tracking\View\DataRetrieval\Info\Iterator;

use ILIAS\Tracking\View\DataRetrieval\Info\Iterator\IteratorInterface as InfoIteratorInterface;
use Iterator;
use ILIAS\Tracking\View\DataRetrieval\Info\CombinedInfoInterface;

interface CombinedInfoIteratorInterface extends InfoIteratorInterface
interface CombinedInfoIteratorInterface extends Iterator
{
public function current(): CombinedInfoInterface;
public function key(): int;
public function valid(): bool;
public function rewind(): void;
public function next(): void;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@

namespace ILIAS\Tracking\View\DataRetrieval\Info\Iterator;

use ILIAS\Tracking\View\DataRetrieval\Info\Iterator\IteratorInterface as InfoIteratorInterface;
use Iterator;
use ILIAS\Tracking\View\DataRetrieval\Info\LPInfoInterface;

interface LPInfoIteratorInterface extends InfoIteratorInterface
interface LPInfoIteratorInterface extends Iterator
{
public function current(): LPInfoInterface;
public function key(): int;
public function valid(): bool;
public function rewind(): void;
public function next(): void;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@

namespace ILIAS\Tracking\View\DataRetrieval\Info\Iterator;

use ILIAS\Tracking\View\DataRetrieval\Info\Iterator\IteratorInterface as InfoIteratorInterface;
use ILIAS\Tracking\View\DataRetrieval\Info\ObjectInfoInterface;
use Iterator;

interface ObjectInfoIteratorInterface extends InfoIteratorInterface
interface ObjectInfoIteratorInterface extends Iterator
{
public function current(): ObjectInfoInterface;
public function key(): int;
public function valid(): bool;
public function rewind(): void;
public function next(): void;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@

declare(strict_types=0);

namespace ILIAS\Tracking\View\DataRetrieval\Info\Iterator;
namespace ILIAS\Tracking\View\DataRetrieval\Info;

use Iterator;

interface IteratorInterface extends Iterator
interface LPInfoInterface
{
public function getUserId(): int;

public function getObjectId(): int;

public function getLPStatus(): int;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
* If this is not the case or you just want to try ILIAS, you'll find
* us at:
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
*********************************************************************/

declare(strict_types=0);

namespace ILIAS\Tracking\View\DataRetrieval\Info;

interface ObjectInfoInterface
{
public function getObjectId(): int;

public function getTitle(): string;

public function getDescription(): string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@

namespace ILIAS\Tracking\View\DataRetrieval\Info;

use ILIAS\Tracking\View\DataRetrieval\Info\Iterator\ObjectInfoIteratorInterface;
use ILIAS\Tracking\View\DataRetrieval\Info\Iterator\LPInfoIteratorInterface;
use ILIAS\Tracking\View\DataRetrieval\Info\Iterator\CombinedInfoIteratorInterface;

interface ViewInfoInterface
{
public function objectIterator(): ObjectInfoIteratorInterface;

public function lpInfoIterator(): LPInfoIteratorInterface;

public function combinedInfoIterator(): CombinedInfoIteratorInterface;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@

namespace ILIAS\Tracking\View\PropertyList;

use ILIAS\Tracking\View\PropertyList\PropertyListInterface;

interface PropertyListBuilderInterface
{
public function withProperty(string $key, string $value): self;

public function getList(): PropertyListInterface;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

namespace ILIAS\Tracking\View\PropertyList;

use ILIAS\Tracking\View\PropertyList\PropertyListBuilderInterface;

interface PropertyListFactoryInterface
{
public function builder(): PropertyListBuilderInterface;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@

namespace ILIAS\Tracking\View\PropertyList;

interface PropertyListInterface
use Countable;
use Iterator;

interface PropertyListInterface extends Countable, Iterator
{
public function next(): void;

public function rewind(): void;

public function valid(): bool;

public function key(): string;

public function current(): string;

public function count(): int;
}
9 changes: 9 additions & 0 deletions components/ILIAS/Tracking/classes/View/ViewInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@

namespace ILIAS\Tracking\View;

use ILIAS\Tracking\View\PropertyList\PropertyListFactoryInterface;
use ILIAS\Tracking\View\DataRetrieval\DataRetrievalInterface;
use ILIAS\Tracking\View\Renderer\RendererInterface;

interface ViewInterface
{
public function dataRetrieval(): DataRetrievalInterface;

public function propertyList(): PropertyListFactoryInterface;

public function renderer(): RendererInterface;
}

0 comments on commit 925ac8e

Please sign in to comment.