<commit_before><?php

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

require_once 'Swat/SwatNoteBookChild.php';
require_once 'Swat/SwatContainer.php';
require_once 'Swat/SwatHtmlTag.php';

/**
 * A page in a {@link SwatNoteBook}
 *
 * @package   Swat
 * @copyright 2007-2008 silverorange
 * @license   http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
 * @see       SwatNoteBook
 */
class SwatNoteBookPage extends SwatContainer implements SwatNoteBookChild
{
	// {{{ public properties

	/**
	 * The title of this page
	 *
	 * @var string
	 */
	public $title;

	// }}}
	// {{{ public function __construct()

	/**
	 * Creates a new notebook page
	 *
	 * @param string $id a non-visable id for this page.
	 */
	public function __construct($id = null)
	{
		parent::__construct($id);

		$this->requires_id = true;
	}

	// }}}
	// {{{ public function display()

	/**
	 * Displays this notebook page
	 *
	 * Displays this notebook page as well as recursively displaying all child-
	 * widgets of this page.
	 */
	public function display()
	{
		if (!$this->visible)
			return;

		$div_tag = new SwatHtmlTag('div');
		$div_tag->id = $this->id;
		$div_tag->open();
		parent::display();
		$div_tag->close();
	}

	// }}}
	// {{{ public function getPages()

	/**
	 * Gets the notebook pages of this notebook page
	 *
	 * Implements the {@link SwatNoteBookChild::getPages()} interface.
	 *
	 * @return array an array containing this page.
	 */
	public function getPages()
	{
		return array($this);
	}

	// }}}
}

?>
<commit_msg>Output CSS classes on SwatNoteBookPage.<commit_after><?php

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

require_once 'Swat/SwatNoteBookChild.php';
require_once 'Swat/SwatContainer.php';
require_once 'Swat/SwatHtmlTag.php';

/**
 * A page in a {@link SwatNoteBook}
 *
 * @package   Swat
 * @copyright 2007-2008 silverorange
 * @license   http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
 * @see       SwatNoteBook
 */
class SwatNoteBookPage extends SwatContainer implements SwatNoteBookChild
{
	// {{{ public properties

	/**
	 * The title of this page
	 *
	 * @var string
	 */
	public $title;

	// }}}
	// {{{ public function __construct()

	/**
	 * Creates a new notebook page
	 *
	 * @param string $id a non-visable id for this page.
	 */
	public function __construct($id = null)
	{
		parent::__construct($id);

		$this->requires_id = true;
	}

	// }}}
	// {{{ public function display()

	/**
	 * Displays this notebook page
	 *
	 * Displays this notebook page as well as recursively displaying all child-
	 * widgets of this page.
	 */
	public function display()
	{
		if (!$this->visible)
			return;

		$div_tag = new SwatHtmlTag('div');
		$div_tag->id = $this->id;
		$div_tag->class = $this->getCSSClassString();
		$div_tag->open();
		parent::display();
		$div_tag->close();
	}

	// }}}
	// {{{ public function getPages()

	/**
	 * Gets the notebook pages of this notebook page
	 *
	 * Implements the {@link SwatNoteBookChild::getPages()} interface.
	 *
	 * @return array an array containing this page.
	 */
	public function getPages()
	{
		return array($this);
	}

	// }}}
	// {{{ protected function getCSSClassNames()

	/**
	 * Gets the array of CSS classes that are applied to this page
	 *
	 * @return array the array of CSS classes that are applied to this
	 *                page.
	 */
	protected function getCSSClassNames()
	{
		$classes = array('swat-note-book-page');
		$classes = array_merge($classes, parent::getCSSClassNames());
		return $classes;
	}

	// }}}
}

?>

{'fraction_non_alphanumeric': 0.1457865168539326, 'fraction_numerical': 0.006741573033707865, 'mean_word_length': 3.2191943127962084, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '4407220', 'n_tokens_mistral': 1273, 'n_tokens_neox': 1158, 'n_words': 316}