1 | <?php |
||
20 | class ArticleLoader implements LoaderInterface |
||
21 | { |
||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $rootDir; |
||
26 | |||
27 | /** |
||
28 | * @param string $rootDir path to application root directory |
||
29 | */ |
||
30 | public function __construct($rootDir) |
||
34 | |||
35 | /** |
||
36 | * Load meta object by provided type and parameters |
||
37 | * |
||
38 | * @MetaLoaderDoc( |
||
39 | * description="Article Meta Loader provide simple way to test Loader, it will be removed when real loaders will be merged.", |
||
40 | * parameters={} |
||
41 | * ) |
||
42 | * |
||
43 | * @param string $type object type |
||
44 | * @param array $parameters parameters needed to load required object type |
||
45 | * @param int $responseType response type: single meta (LoaderInterface::SINGLE) or collection of metas (LoaderInterface::COLLECTION) |
||
46 | * |
||
47 | * @return Meta|bool false if meta cannot be loaded, a Meta instance otherwise |
||
48 | */ |
||
49 | public function load($type, $parameters, $responseType) |
||
78 | |||
79 | /** |
||
80 | * Checks if Loader supports provided type |
||
81 | * |
||
82 | * @param string $type |
||
83 | * |
||
84 | * @return boolean |
||
85 | */ |
||
86 | public function isSupported($type) |
||
90 | } |
||
91 |