<?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\testclass2;

use \Onphp\Form;
use \Onphp\Model;
use \converter\B;
use \Onphp\CommandChain;
use \Onphp\View;
use \Onphp\Primitive;

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


trait A {
	use B;

	const    VALUE = 'value';

	/**
	 * @var View
	 */
	private $c = null;
	private $cName = '\Onphp\View';
	private $cName2 = "\Onphp\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();
	}
}