<commit_before><?php
/**
 * Hello World Index Controller
 * This is an example of how you can use erdiko.  It includes some simple use cases.
 *
 * @category 	app
 * @package   	hello
 * @copyright	Copyright (c) 2012, Arroyo Labs, www.arroyolabs.com
 * @author 		<NAME>, <EMAIL>
 */
namespace app\modules\local\hello\controllers;

use Erdiko;
use erdiko\core\Config;

class Index extends \erdiko\core\Controller
{
	/**
	 * Homepage Action (index)
	 * @params array $arguments
	 */
	public function indexAction($arguments = null)
	{
		// load js resources
		// $this->addJs('/app/contexts/default/js/jquery.orbit.js');
		// $this->addJs('/app/contexts/default/js/orbit.js');

		// Add page title
		$this->setTitle('Home');

		// Add view data
		$this->setTitle('Hello World');
		$this->setBodyContent("Welcome to Erdiko.");

		// Add meta tags
		$this->addMeta('This is Erdiko\'s hello world.', 'description');

		// Add Extra js
		$this->addJs('/app/contexts/default/js/home.js');
	}

	public function aboutAction($arguments = null)
	{
		$this->setTitle('About Us');
		$this->setBodyContent('Erdiko Framework.  <a href="https://github.com/arroyo/Erdiko">https://github.com/arroyo/Erdiko</a>');
	}

	public function onecolumnAction($arguments = null)
	{
		/*
		This is an alternate way to add data
		You can specify title and content in a data array and set the whole array
		instead of using the setBodyTitle() and setPageContent() methods
		*/

		// Set up the view data
		$data = array(
			'content' => '1 column layout example',
			'title' => '1 Column Layout Page'
			);
		$this->setData($data);

		// Add page title
		$this->setPageTitle('1 Column Page');
		// Set layout columns
		$this->setLayoutColumns(1);
	}

	public function markupAction($arguments = null)
	{
		/*
			This is an alternate way to add page content data
			You can load a view directly into the content.
			This is not the preferred way to add content.
			Use the setView() method when possible.
		*/
		$this->setBodyTitle('Example Mark-Up');
		$this->setBodyContent( $this->getView(null, 'hello/markup.php') );

		// Add page title
		$this->setTitle('Example CSS Mark-Up');
	}

	public function twocolumnAction($arguments = null)
	{
		$this->setBodyTitle( '2 Column Layout Page' );
		$this->setBodyContent( '2 column layout example' );
		$this->setLayoutColumns(2);
		$this->setSidebar('left', 'This is the left side content...');

		// Add page title
		$this->setPageTitle('2 Column Page');
	}

	public function threecolumnAction($arguments = null)
	{
		$this->setBodyTitle( '3 Column Layout Page' );
		$this->setBodyContent( '3 column layout example' );
		$this->setLayoutColumns(3);
		$this->setSidebar('left', 'This is the left side content...');
		$this->setSidebar('right', 'This is the right side content...');

		// Add page title
		$this->setPageTitle('3 Column Page');
	}

	public function gridAction()
	{
		// Js Base
		$this->setTitle('Grid');

		// Data
		$data = array(
			'columns' => 4, 
			'count' => 12, 
			'items' => array()
			);

		$this->setLayoutData($data);
		$this->setLayout('/grid/default.php');
	}

	/**
	 * Homepage Action (index)
	 * @params array $arguments
	 */
	public function configAction($arguments = null)
	{
		// load js resources
		// $this->addJs('/app/contexts/default/js/jquery.orbit.js');
		// $this->addJs('/app/contexts/default/js/orbit.js');

		// Add page title
		$this->setTitle('Config');

		// Add view data
		$this->setTitle('Erdiko Config');
		
		// Add meta tags
		$this->addMeta('Erdiko config settings', 'description');

		Config::getConfig();
		Config::getConfig();
		$config = Config::getConfig();

		$this->setBodyContent("Here are your config settings.<br/><pre>".print_r($config, true)."</pre>");
	}
}<commit_msg>some hello world controller clean up<commit_after><?php
/**
 * Hello World Index Controller
 * This is an example of how you can use erdiko.  It includes some simple use cases.
 *
 * @category 	app
 * @package   	hello
 * @copyright	Copyright (c) 2012, Arroyo Labs, www.arroyolabs.com
 * @author 		<NAME>, <EMAIL>
 */
namespace app\modules\local\hello\controllers;

use Erdiko;
use erdiko\core\Config;

class Index extends \erdiko\core\Controller
{
	/**
	 * Homepage Action (index)
	 * @params array $arguments
	 */
	public function indexAction($arguments = null)
	{
		// load js resources
		// $this->addJs('/app/contexts/default/js/jquery.orbit.js');
		// $this->addJs('/app/contexts/default/js/orbit.js');

		// Add page data
		$this->setTitle('Hello World');
		$this->setBodyContent("Welcome to Erdiko.");

		// Add meta tags
		$this->addMeta('This is Erdiko\'s hello world.', 'description');

		// Add Extra js
		$this->addJs('/app/contexts/default/js/home.js');
	}

	public function aboutAction($arguments = null)
	{
		$this->setTitle('About Us');
		$this->setBodyContent('Erdiko Framework.  <a href="https://github.com/arroyo/Erdiko">https://github.com/arroyo/Erdiko</a>');
	}

	public function onecolumnAction($arguments = null)
	{
		/*
		This is an alternate way to add data
		You can specify title and content in a data array and set the whole array
		instead of using the setBodyTitle() and setPageContent() methods
		*/

		// Set up the view data
		$data = array(
			'content' => '1 column layout example',
			'title' => '1 Column Layout Page'
			);
		$this->setData($data);

		// Add page title
		$this->setPageTitle('1 Column Page');
		// Set layout columns
		$this->setLayoutColumns(1);
	}

	public function markupAction($arguments = null)
	{
		/*
			This is an alternate way to add page content data
			You can load a view directly into the content.
			This is not the preferred way to add content.
			Use the setView() method when possible.
		*/
		$this->setBodyTitle('Example Mark-Up');
		$this->setBodyContent( $this->getView(null, 'hello/markup.php') );

		// Add page title
		$this->setTitle('Example CSS Mark-Up');
	}

	public function twocolumnAction($arguments = null)
	{
		$this->setBodyTitle( '2 Column Layout Page' );
		$this->setBodyContent( '2 column layout example' );
		$this->setLayoutColumns(2);
		$this->setSidebar('left', 'This is the left side content...');

		// Add page title
		$this->setPageTitle('2 Column Page');
	}

	public function threecolumnAction($arguments = null)
	{
		$this->setBodyTitle( '3 Column Layout Page' );
		$this->setBodyContent( '3 column layout example' );
		$this->setLayoutColumns(3);
		$this->setSidebar('left', 'This is the left side content...');
		$this->setSidebar('right', 'This is the right side content...');

		// Add page title
		$this->setPageTitle('3 Column Page');
	}

	public function gridAction()
	{
		// Js Base
		$this->setTitle('Grid');

		// Data
		$data = array(
			'columns' => 4, 
			'count' => 12, 
			'items' => array()
			);

		$this->setLayoutData($data);
		$this->setLayout('/grid/default.php');
	}

	/**
	 * Homepage Action (index)
	 * @params array $arguments
	 */
	public function configAction($arguments = null)
	{
		// Add title
		$this->setTitle('Config');
		
		// Add meta tags
		$this->addMeta('Erdiko config settings', 'description');

		Config::getConfig();
		Config::getConfig(); // testing the singleton
		$config = Config::getConfig()->getContext(); // Get the context config settings for display

		$this->setBodyContent("Here are the config settings.<br/><pre>".print_r($config, true)."</pre>");
	}
}
{'fraction_non_alphanumeric': 0.16054921152800436, 'fraction_numerical': 0.005165851005981512, 'mean_word_length': 3.572405220633934, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 96, 'https://': 4, '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': '2884548', 'n_tokens_mistral': 2620, 'n_tokens_neox': 2355, 'n_words': 656}