Pwirth has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406018 )
Change subject: BSFoundation: Added has method to EntityConfig to match the config interface ...................................................................... BSFoundation: Added has method to EntityConfig to match the config interface Change-Id: If7ac81f607402eac094db85b400de80e8d9cca08 --- M src/EntityConfig.php 1 file changed, 17 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation refs/changes/18/406018/2 diff --git a/src/EntityConfig.php b/src/EntityConfig.php index f7ecc0b..f9875ae 100644 --- a/src/EntityConfig.php +++ b/src/EntityConfig.php @@ -34,7 +34,7 @@ * EntityConfig class for BlueSpice * @package BlueSpiceFoundation */ -abstract class EntityConfig implements \JsonSerializable { +abstract class EntityConfig implements \JsonSerializable, \Config { protected $type = ''; @@ -112,6 +112,22 @@ } /** + * check for config methods + * @param string $method + * @return bool + */ + public function has( $method ) { + $method = "get_$method"; + if( is_callable( array($this, $method) ) ) { + return true; + } + if( isset( $this->defaults[$method] ) ) { + return true; + } + return $this->getConfig()->has( $method ); + } + + /** * Returns a json serializable object * @return stdClass */ -- To view, visit https://gerrit.wikimedia.org/r/406018 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If7ac81f607402eac094db85b400de80e8d9cca08 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation Gerrit-Branch: master Gerrit-Owner: Pwirth <wi...@hallowelt.biz> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits