Ejemplo n.º 1
0
	/**
	 * Constructor.
	 *
	 * @param array mixed $parameters			- User requested parameters.
	 * @param string $action					- Optional action for the controller's getResponse()
	 */
	public function __construct($parameters, $action = false)
	{
		parent::__construct($parameters, $action);

		global $bootstrap;

		$this->bootstrap = $bootstrap;

		// Register the templater to be used for XHTML
		vB_View::registerTemplater(vB_View::OT_XHTML, new vB_Templater_vB());
	}
Ejemplo n.º 2
0
	/**
	 * Constructor.
	 * The constructor grabs the requested node segment and parameters.
	 *
	 * @param array mixed $parameters			- User requested parameters.
	 * @param string $action					- User requested action
	 */
	public function __construct($parameters, $action = false)
	{
		parent::__construct($parameters, $action);

		// Evaluate the node that we're working with
		$this->node_segment = vB_Router::getSegment('node');

		if (!$this->node_segment)
		{
			throw (new vB_Exception_404());
		}

		if ($this->auto_initialize)
		{
			$this->initialize();
		}
	}
Ejemplo n.º 3
0
	/**
	 * Constructor.
	 * The constructor grabs the requested node segment and parameters.
	 *
	 * @param array mixed $parameters			- User requested parameters.
	 */
	public function __construct($parameters, $action = false)
	{
		parent::__construct($parameters, $action);

		// Evaluate the node that we're working with
		if (!($this->action = vB_Router::getSegment('action')))
		{
			// TODO: shouldn't throw 404's on construction, only in getResponse()
			throw (new vB_Exception_404());
		}

		if (!($this->widget = vB_Router::getSegment('widget'))
			OR !intval($this->widget))
		{
			throw (new vB_Exception_404());
		}

		$this->node = intval(vB_Router::getSegment('node'));

		$this->initialize();
	}
Ejemplo n.º 4
0
	/**
	 * Constructor.
	 *
	 * @param array mixed $parameters			- User requested parameters.
	 * @param string $action					- Optional action for the controller's getResponse()
	 */
	public function __construct(array $parameters = null, $action = false)
	{
		parent::__construct($parameters, $action);

		vBCms_NavBar::prepareNavBar();
	}