<commit_before><?php

/* vim: set noexpandtab tabstop=4 shiftwidth=4 foldmethod=marker: */

require_once 'Swat/SwatFrame.php';
require_once 'Swat/SwatReplicableContainer.php';

/**
 * A frame that replicates its children
 *
 * The frame can dynamically create widgets based on an array of
 * replicators identifiers.
 *
 * @package    Swat
 * @copyright  2005-2008 silverorange
 * @license    http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
 * @deprecated Use a SwatReplicableContainer with a SwatFrame as the only child
 *             widget. Automatic title-setting functionality need will to be
 *             implemented manually.
 */
class SwatReplicableFrame extends SwatReplicableContainer
{
	// {{{ public function init()

	/**
	 * Initilizes this replicable frame
	 */
	public function init()
	{
		$children = array();
		foreach ($this->children as $child_widget)
			$children[] = $this->remove($child_widget);

		$frame = new SwatFrame();
		$frame->id = $frame->getUniqueId();
		$prototype_id = $frame->id;

		foreach ($children as $child_widget)
			$frame->add($child_widget);

		$this->add($frame);

		parent::init();

		foreach ($this->replicators as $id => $title) {
			$frame = $this->getWidget($prototype_id, $id);
			$frame->title = $title;
		}
	}

	// }}}
}

?><commit_msg>Don't create warnings if not using the deprecated replicators property in the deprecated widget SwatReplicableFrame.<commit_after><?php

/* vim: set noexpandtab tabstop=4 shiftwidth=4 foldmethod=marker: */

require_once 'Swat/SwatFrame.php';
require_once 'Swat/SwatReplicableContainer.php';

/**
 * A frame that replicates its children
 *
 * The frame can dynamically create widgets based on an array of
 * replicators identifiers.
 *
 * @package    Swat
 * @copyright  2005-2008 silverorange
 * @license    http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
 * @deprecated Use a SwatReplicableContainer with a SwatFrame as the only child
 *             widget. Automatic title-setting functionality need will to be
 *             implemented manually.
 */
class SwatReplicableFrame extends SwatReplicableContainer
{
	// {{{ public function init()

	/**
	 * Initilizes this replicable frame
	 */
	public function init()
	{
		$children = array();
		foreach ($this->children as $child_widget)
			$children[] = $this->remove($child_widget);

		$frame = new SwatFrame();
		$frame->id = $frame->getUniqueId();
		$prototype_id = $frame->id;

		foreach ($children as $child_widget)
			$frame->add($child_widget);

		$this->add($frame);

		parent::init();

		if ($this->replication_ids === null && is_array($this->replicators)) {
			foreach ($this->replicators as $id => $title) {
				$frame = $this->getWidget($prototype_id, $id);
				$frame->title = $title;
			}
		}
	}

	// }}}
}

?>
{'fraction_non_alphanumeric': 0.13469827586206898, 'fraction_numerical': 0.008620689655172414, 'mean_word_length': 3.7525597269624575, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4502380', 'n_tokens_mistral': 953, 'n_tokens_neox': 862, 'n_words': 232}