<?php

/* * *************************************************************************
 *   Copyright (C) 2012 by Alexey Denisov                                  *
 *   alexeydsov@gmail.com                                                  *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Lesser General Public License as        *
 *   published by the Free Software Foundation; either version 3 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 * ************************************************************************* */

	namespace convert\testclass3;

	use \Onphp\main\Form;
	use \Onphp\core\Model;
	use \Onphp\main\HttpRequest;
	use \Onphp\CommandChain;
	use \Onphp\Primitive;

	new Form();
	Model::create();
	HttpRequest->create();


	trait A {
		use B;

		const    VALUE = 'value';

		/**
		 * @var View
		 */
		private $c = null;
		private $cName = '\convert\testclass3\View';
		private $cName2 = "\convert\testclass3\View";

		/**
		 * @param Primitive $newNamespace
		 * @param string $newNamespace
		 * @return View
		 */
		function sum($a, $b) {
			$sum = function ($a, $b) {
				$command = CommandChain::create(SUPER_CONST, CONST, lowconst);
				$command = CommandChain :: create();
				/* @var $command CommandChain */

				$command
					->add($command);

				$c = new $cName();
				/* @var View $c  */

				return $c->
					render($a + $b);
			};
			$sum(2, 3);

			is_object(parent::run());
			self ::run();
			static:: run();
		}
	}