Skip to content

Commit

Permalink
Reverted Config with old deprecated Interface for now
Browse files Browse the repository at this point in the history
  • Loading branch information
overclokk committed Sep 3, 2020
1 parent 298f1e8 commit 57c53bf
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 40 deletions.
14 changes: 0 additions & 14 deletions classname-bc-aliases.php

This file was deleted.

5 changes: 1 addition & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@
"autoload": {
"psr-4": {
"ItalyStrap\\": "src/"
},
"files": [
"classname-bc-aliases.php"
]
}
},
"suggest": {
"italystrap/event": "EventDispatcher for WordPress"
Expand Down
14 changes: 0 additions & 14 deletions legacy/ConfigInterfaceLegacy.php

This file was deleted.

2 changes: 1 addition & 1 deletion src/Config/ConfigFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ConfigFactory {
*
* @return Config Returns the Config object
*/
public static function make( $config = [], $defaults = [] ): Config {
public static function make( $config = [], $defaults = [] ): ConfigInterface {
return new Config( $config, $defaults );
}
}
5 changes: 1 addition & 4 deletions src/Config/ConfigInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@
/**
* Config Class that handle the classes configuration
*
* @version 3.0
*
* @package ItalyStrap\Config
*/
declare(strict_types=1);

namespace ItalyStrap\Config;

interface ConfigInterface extends \ArrayAccess, \IteratorAggregate, \Countable, ConfigInterfaceLegacy {

interface ConfigInterface extends Config_Interface, \ArrayAccess, \IteratorAggregate, \Countable {

/**
* Retrieves all of the runtime configuration parameters
Expand Down
32 changes: 32 additions & 0 deletions src/Config/Config_Factory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php
/**
* Config Class that handle the classes configuration
*
* @deprecated
* @package ItalyStrap\Config
*/

declare(strict_types=1);

namespace ItalyStrap\Config;

/**
* ConfigFactory Class
* @deprecated
*/
class Config_Factory {

/**
* Load and return the Config object.
*
* @param string|array $config File path and filename to the config array; or it is the
* configuration array.
* @param string|array $defaults Specify a defaults array, which is then merged together
* with the initial config array before creating the object.
*
* @return Config Returns the Config object
*/
public static function make( $config = [], $defaults = [] ) : ConfigInterface {
return ConfigFactory::make( $config, $defaults );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

namespace ItalyStrap\Config;

if ( \interface_exists( '\ItalyStrap\Config\Config_Interface' ) )
return;

/**
* Interface Config_Interface
* @package ItalyStrap\Config
Expand Down

0 comments on commit 57c53bf

Please sign in to comment.