<?php
App::uses('HtmlHelper', 'View/Helper');

class IqioHelper extends Helper
{

	/**
	 ** Copies the validationErrors variable from the View object into this instance
	 **
	 ** @param View $View The View this helper is being attached to.
	 ** @param array $settings Configuration settings for the helper.
	 **/

	public function __construct(View $View, $settings = array())
	{
		parent::__construct($View, $settings);

	}

        /*
        (array_shift((explode(".",$_SERVER['HTTP_HOST']))) == 'jenrulon') ? 'jenrulon' : 'markallen';
        $parsedUrl = parse_url($url);
        $subdomain = $host[0];
        */
    public function subdomain()
    {
        $path = parse_url($_SERVER['HTTP_HOST'])['path'];
        $host = explode('.', $path);

        if (isset($host[0])) {
            return $host[0];
        }

        return false;
    }

}
?>
