2016-12-13 12:33:54 +01:00
|
|
|
<?php
|
2017-07-06 23:48:47 +02:00
|
|
|
namespace Codappix\SearchCore\Configuration;
|
2016-12-13 12:33:54 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2016 Daniel Siepmann <coding@daniel-siepmann.de>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
|
|
* 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Container of all configurations for extension.
|
2018-03-20 10:19:45 +01:00
|
|
|
* Always inject this to have a single place for configuration.
|
2016-12-13 12:33:54 +01:00
|
|
|
*/
|
2018-03-20 10:19:45 +01:00
|
|
|
interface ConfigurationContainerInterface
|
2016-12-13 12:33:54 +01:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Returns the option defined by section and key.
|
2016-12-20 10:04:44 +01:00
|
|
|
* May throw an exception if it's not set or is null.
|
2016-12-13 12:33:54 +01:00
|
|
|
*
|
2016-12-20 10:04:44 +01:00
|
|
|
* @param string $path In dot notation. E.g. indexer.tca.allowedTables
|
2016-12-13 12:33:54 +01:00
|
|
|
* @return mixed
|
2017-07-06 12:03:52 +02:00
|
|
|
*
|
|
|
|
* @throws InvalidArgumentException
|
2016-12-13 12:33:54 +01:00
|
|
|
*/
|
2018-03-06 17:40:49 +01:00
|
|
|
public function get(string $path);
|
2016-12-13 12:33:54 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Same as get but will not throw an exception but return null.
|
|
|
|
*
|
2016-12-20 10:04:44 +01:00
|
|
|
* @param string $path In dot notation.
|
2016-12-13 12:33:54 +01:00
|
|
|
* @return mixed|null
|
|
|
|
*/
|
2018-03-06 17:40:49 +01:00
|
|
|
public function getIfExists(string $path);
|
2016-12-13 12:33:54 +01:00
|
|
|
}
|