ProviderInterface.php 2.85 KB
Newer Older
1
<?php
2 3
namespace T3o\TerFe2\Provider;

4 5
/*
 * This file is part of the TYPO3 CMS project.
flyguide's avatar
flyguide committed
6
 *
7 8 9
 * It is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License, either version 2
 * of the License, or any later version.
flyguide's avatar
flyguide committed
10
 *
11 12
 * For the full copyright and license information, please read the
 * LICENSE.txt file that was distributed with this source code.
flyguide's avatar
flyguide committed
13
 *
14 15
 * The TYPO3 project - inspiring people to share!
 */
flyguide's avatar
flyguide committed
16 17 18 19

/**
 * Interface for extension providers
 */
20
interface ProviderInterface extends \TYPO3\CMS\Core\SingletonInterface
21 22
{

23 24
    /**
     * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
25
     */
26
    public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager);
27 28

    /**
29
     * @param \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory $dataMapFactory
30
     */
31
    public function injectDataMapFactory(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory $dataMapFactory);
32 33

    /**
34
     * @param \TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService
35
     */
36
    public function injectReflectionService(\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService);
37 38 39 40 41 42 43 44 45 46 47

    /**
     * Set configuration for the DataProvider
     *
     * @param array $configuration TypoScript configuration
     */
    public function setConfiguration(array $configuration);

    /**
     * Returns all extensions since last run
     *
48 49 50
     * @param int $lastRun Timestamp of last update
     * @param int $offset Offset to start with
     * @param int $count Extension count to load
51 52 53 54 55 56 57
     * @return array Extension rows
     */
    public function getExtensions($lastRun, $offset, $count);

    /**
     * Returns the url to an extension related icon
     *
58
     * @param \T3o\TerFe2\Domain\Model\Version $version Version object
59 60 61
     * @param string $fileType File type
     * @return string Url to icon file
     */
62
    public function getIconUrl(\T3o\TerFe2\Domain\Model\Version $version, $fileType);
63 64 65 66

    /**
     * Returns the url to an extension related file
     *
67
     * @param \T3o\TerFe2\Domain\Model\Version $version Version object
68 69 70
     * @param string $fileType File type
     * @return string Url to file
     */
71
    public function getFileUrl(\T3o\TerFe2\Domain\Model\Version $version, $fileType);
72 73 74 75

    /**
     * Returns name of an extension related file
     *
76
     * @param \T3o\TerFe2\Domain\Model\Version $version Version object
77 78 79
     * @param string $fileType File type
     * @return string File name
     */
80
    public function getFileName(\T3o\TerFe2\Domain\Model\Version $version, $fileType);
81 82 83 84

    /**
     * Returns all information about an extension version
     *
85
     * @param \T3o\TerFe2\Domain\Model\Version $version Version object
86 87
     * @return array Version details
     */
88
    public function getVersionDetails(\T3o\TerFe2\Domain\Model\Version $version);
flyguide's avatar
flyguide committed
89
}