PATH:
home
/
letacommog
/
laindinois
/
OLD
/
wp-content
/
plugins
/
wordpress-seo-premium
/
vendor
/
yoast
/
whip
/
src
<?php /** * Class Whip_Configuration */ class Whip_Configuration { /** * @var array */ private $configuration; /** * Whip_Configuration constructor. * * @param array $configuration The configuration to use. * * @throws Whip_InvalidType */ public function __construct( $configuration = array() ) { if ( ! is_array( $configuration ) ) { throw new Whip_InvalidType( 'Configuration', gettype( $configuration), "array" ); } $this->configuration = $configuration; } /** * Retrieves the configured version of a particular requirement. * If the requirement does not exist, this returns -1. * * @param Whip_Requirement $requirement The requirement to check. * * @return int The version of the passed requirement that was detected. */ public function configuredVersion( Whip_Requirement $requirement ) { if ( ! $this->hasRequirementConfigured( $requirement ) ) { return -1; } return $this->configuration[ $requirement->component() ]; } /** * Determines whether the passed requirement is present in the configuration. * * @param Whip_Requirement $requirement The requirement to check. * * @return bool Whether or not the requirement is present in the configuration. */ public function hasRequirementConfigured( Whip_Requirement $requirement ) { return array_key_exists( $requirement->component(), $this->configuration ); } }
[+]
..
[+]
exceptions
[+]
messages
[-] Whip_RequirementsChecker.php
[edit]
[-] Whip_MessagesManager.php
[edit]
[+]
configs
[-] Whip_MessageDismisser.php
[edit]
[-] Whip_Host.php
[edit]
[-] Whip_VersionRequirement.php
[edit]
[+]
interfaces
[+]
presenters
[-] Whip_Configuration.php
[edit]
[-] Whip_MessageFormatter.php
[edit]
[-] Whip_WPDismissOption.php
[edit]
[-] Whip_WPMessageDismissListener.php
[edit]
[+]
facades