Permalink
Browse files

Renamed View/Input to View/Widget

  • Loading branch information...
1 parent 296473a commit 902cada1d966ff240b00f6f2745876deaff54a98 @ADmad ADmad committed Feb 2, 2014
@@ -12,9 +12,9 @@
* @since CakePHP(tm) v3.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
-namespace Cake\View\Input;
+namespace Cake\View\Widget;
-use Cake\View\Input\InputInterface;
+use Cake\View\Widget\InputInterface;
/**
* Basic input class.
@@ -12,9 +12,9 @@
* @since CakePHP(tm) v3.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
-namespace Cake\View\Input;
+namespace Cake\View\Widget;
-use Cake\View\Input\InputInterface;
+use Cake\View\Widget\InputInterface;
/**
* Button input class
@@ -12,9 +12,9 @@
* @since CakePHP(tm) v3.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
-namespace Cake\View\Input;
+namespace Cake\View\Widget;
-use Cake\View\Input\InputInterface;
+use Cake\View\Widget\InputInterface;
/**
* Input widget for creating checkbox widgets.
@@ -12,11 +12,11 @@
* @since CakePHP(tm) v3.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
-namespace Cake\View\Input;
+namespace Cake\View\Widget;
use Cake\Utility\Time;
-use Cake\View\Input\InputInterface;
use Cake\View\StringTemplate;
+use Cake\View\Widget\InputInterface;
/**
* Input widget class for generating a date time input widget.
@@ -29,7 +29,7 @@ class DateTime implements InputInterface {
/**
* Select box widget.
*
- * @var Cake\View\Input\Select
+ * @var Cake\View\Widget\Select
*/
protected $_select;
@@ -59,7 +59,7 @@ class DateTime implements InputInterface {
* Constructor
*
* @param Cake\View\StringTemplate $templates
- * @param Cake\View\Input\SelectBox $selectBox
+ * @param Cake\View\Widget\SelectBox $selectBox
*/
public function __construct($templates, $selectBox) {
$this->_select = $selectBox;
@@ -98,7 +98,7 @@ public function __construct($templates, $selectBox) {
*
* The `hour` option allows you to set the following options:
*
- * - `format` option which accepts 12 or 24, allowing
+ * - `format` option which accepts 12 or 24, allowing
* you to indicate which hour format you want.
* - `start` The hour to start the options at.
* - `end` The hour to stop the options at.
@@ -12,9 +12,9 @@
* @since CakePHP(tm) v3.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
-namespace Cake\View\Input;
+namespace Cake\View\Widget;
-use Cake\View\Input\InputInterface;
+use Cake\View\Widget\InputInterface;
/**
* Input widget class for generating a file upload control.
@@ -12,7 +12,7 @@
* @since CakePHP(tm) v3.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
-namespace Cake\View\Input;
+namespace Cake\View\Widget;
/**
* Interface for input widgets.
@@ -12,11 +12,11 @@
* @since CakePHP(tm) v3.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
-namespace Cake\View\Input;
+namespace Cake\View\Widget;
use Cake\Core\App;
-use Cake\View\Input\InputInterface;
use Cake\View\StringTemplate;
+use Cake\View\Widget\InputInterface;
use \ReflectionClass;
/**
@@ -40,16 +40,16 @@ class InputRegistry {
* @var array
*/
protected $_widgets = [
- 'button' => ['Cake\View\Input\Button'],
- 'checkbox' => ['Cake\View\Input\Checkbox'],
- 'file' => ['Cake\View\Input\File'],
- 'label' => ['Cake\View\Input\Label'],
- 'multicheckbox' => ['Cake\View\Input\MultiCheckbox', 'label'],
- 'radio' => ['Cake\View\Input\Radio', 'label'],
- 'select' => ['Cake\View\Input\SelectBox'],
- 'textarea' => ['Cake\View\Input\Textarea'],
- 'datetime' => ['Cake\View\Input\DateTime', 'select'],
- '_default' => ['Cake\View\Input\Basic'],
+ 'button' => ['Cake\View\Widget\Button'],
+ 'checkbox' => ['Cake\View\Widget\Checkbox'],
+ 'file' => ['Cake\View\Widget\File'],
+ 'label' => ['Cake\View\Widget\Label'],
+ 'multicheckbox' => ['Cake\View\Widget\MultiCheckbox', 'label'],
+ 'radio' => ['Cake\View\Widget\Radio', 'label'],
+ 'select' => ['Cake\View\Widget\SelectBox'],
+ 'textarea' => ['Cake\View\Widget\Textarea'],
+ 'datetime' => ['Cake\View\Widget\DateTime', 'select'],
+ '_default' => ['Cake\View\Widget\Basic'],
];
/**
@@ -12,9 +12,9 @@
* @since CakePHP(tm) v3.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
-namespace Cake\View\Input;
+namespace Cake\View\Widget;
-use Cake\View\Input\InputInterface;
+use Cake\View\Widget\InputInterface;
/**
* Form 'widget' for creating labels.
@@ -12,10 +12,10 @@
* @since CakePHP(tm) v3.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
-namespace Cake\View\Input;
+namespace Cake\View\Widget;
use Cake\Utility\Inflector;
-use Cake\View\Input\InputInterface;
+use Cake\View\Widget\InputInterface;
/**
* Input widget class for generating multiple checkboxes.
@@ -33,7 +33,7 @@ class MultiCheckbox implements InputInterface {
/**
* Label widget instance.
*
- * @var Cake\View\Input\Label
+ * @var Cake\View\Widget\Label
*/
protected $_label;
@@ -49,7 +49,7 @@ class MultiCheckbox implements InputInterface {
* variables.
*
* @param Cake\View\StringTemplate $templates
- * @param Cake\View\Input\Label $label
+ * @param Cake\View\Widget\Label $label
*/
public function __construct($templates, $label) {
$this->_templates = $templates;
@@ -12,10 +12,10 @@
* @since CakePHP(tm) v3.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
-namespace Cake\View\Input;
+namespace Cake\View\Widget;
use Cake\Utility\Inflector;
-use Cake\View\Input\InputInterface;
+use Cake\View\Widget\InputInterface;
use Traversable;
/**
@@ -35,8 +35,8 @@ class Radio implements InputInterface {
/**
* Label instance.
- *
- * @var Cake\View\Input\Label
+ *
+ * @var Cake\View\Widget\Label
*/
protected $_label;
@@ -52,7 +52,7 @@ class Radio implements InputInterface {
* variables.
*
* @param Cake\View\StringTemplate $templates
- * @param Cake\View\Input\Label $label
+ * @param Cake\View\Widget\Label $label
*/
public function __construct($templates, $label) {
$this->_templates = $templates;
@@ -12,9 +12,9 @@
* @since CakePHP(tm) v3.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
-namespace Cake\View\Input;
+namespace Cake\View\Widget;
-use Cake\View\Input\InputInterface;
+use Cake\View\Widget\InputInterface;
use Traversable;
/**
@@ -12,9 +12,9 @@
* @since CakePHP(tm) v3.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
-namespace Cake\View\Input;
+namespace Cake\View\Widget;
-use Cake\View\Input\InputInterface;
+use Cake\View\Widget\InputInterface;
/**
* Input widget class for generating a textarea control.
@@ -12,11 +12,11 @@
* @since CakePHP(tm) v3.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
-namespace Cake\Test\TestCase\View\Input;
+namespace Cake\Test\TestCase\View\Widget;
use Cake\TestSuite\TestCase;
-use Cake\View\Input\Basic;
use Cake\View\StringTemplate;
+use Cake\View\Widget\Basic;
/**
* Basic input test.
@@ -12,11 +12,11 @@
* @since CakePHP(tm) v3.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
-namespace Cake\Test\TestCase\View\Input;
+namespace Cake\Test\TestCase\View\Widget;
use Cake\TestSuite\TestCase;
-use Cake\View\Input\Button;
use Cake\View\StringTemplate;
+use Cake\View\Widget\Button;
/**
* Basic input test.
@@ -12,11 +12,11 @@
* @since CakePHP(tm) v3.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
-namespace Cake\Test\TestCase\View\Input;
+namespace Cake\Test\TestCase\View\Widget;
use Cake\TestSuite\TestCase;
-use Cake\View\Input\Checkbox;
use Cake\View\StringTemplate;
+use Cake\View\Widget\Checkbox;
/**
* Checkbox test case
@@ -12,12 +12,12 @@
* @since CakePHP(tm) v3.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
-namespace Cake\Test\TestCase\View\Input;
+namespace Cake\Test\TestCase\View\Widget;
use Cake\TestSuite\TestCase;
-use Cake\View\Input\DateTime;
-use Cake\View\Input\SelectBox;
use Cake\View\StringTemplate;
+use Cake\View\Widget\DateTime;
+use Cake\View\Widget\SelectBox;
/**
* DateTime input test case
@@ -12,11 +12,11 @@
* @since CakePHP(tm) v3.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
-namespace Cake\Test\TestCase\View\Input;
+namespace Cake\Test\TestCase\View\Widget;
use Cake\TestSuite\TestCase;
-use Cake\View\Input\File;
use Cake\View\StringTemplate;
+use Cake\View\Widget\File;
/**
* File input test.
@@ -12,11 +12,11 @@
* @since CakePHP(tm) v3.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
-namespace Cake\Test\TestCase\View\Input;
+namespace Cake\Test\TestCase\View\Widget;
use Cake\TestSuite\TestCase;
-use Cake\View\Input\InputRegistry;
use Cake\View\StringTemplate;
+use Cake\View\Widget\InputRegistry;
/**
* InputRegistry test case
@@ -40,11 +40,11 @@ public function setUp() {
*/
public function testAddInConstructor() {
$widgets = [
- 'text' => ['Cake\View\Input\Basic'],
+ 'text' => ['Cake\View\Widget\Basic'],
];
$inputs = new InputRegistry($this->templates, $widgets);
$result = $inputs->get('text');
- $this->assertInstanceOf('Cake\View\Input\Basic', $result);
+ $this->assertInstanceOf('Cake\View\Widget\Basic', $result);
}
/**
@@ -55,7 +55,7 @@ public function testAddInConstructor() {
public function testAdd() {
$inputs = new InputRegistry($this->templates);
$result = $inputs->add([
- 'text' => ['Cake\View\Input\Basic'],
+ 'text' => ['Cake\View\Widget\Basic'],
]);
$this->assertNull($result);
}
@@ -68,10 +68,10 @@ public function testAdd() {
public function testGet() {
$inputs = new InputRegistry($this->templates);
$inputs->add([
- 'text' => ['Cake\View\Input\Basic'],
+ 'text' => ['Cake\View\Widget\Basic'],
]);
$result = $inputs->get('text');
- $this->assertInstanceOf('Cake\View\Input\Basic', $result);
+ $this->assertInstanceOf('Cake\View\Widget\Basic', $result);
$this->assertSame($result, $inputs->get('text'));
}
@@ -83,10 +83,10 @@ public function testGet() {
public function testGetFallback() {
$inputs = new InputRegistry($this->templates);
$inputs->add([
- '_default' => ['Cake\View\Input\Basic'],
+ '_default' => ['Cake\View\Widget\Basic'],
]);
$result = $inputs->get('text');
- $this->assertInstanceOf('Cake\View\Input\Basic', $result);
+ $this->assertInstanceOf('Cake\View\Widget\Basic', $result);
$result2 = $inputs->get('hidden');
$this->assertSame($result, $result2);
@@ -114,11 +114,11 @@ public function testGetResolveDependency() {
$inputs = new InputRegistry($this->templates);
$inputs->clear();
$inputs->add([
- 'label' => ['Cake\View\Input\Label'],
- 'multicheckbox' => ['Cake\View\Input\MultiCheckbox', 'label']
+ 'label' => ['Cake\View\Widget\Label'],
+ 'multicheckbox' => ['Cake\View\Widget\MultiCheckbox', 'label']
]);
$result = $inputs->get('multicheckbox');
- $this->assertInstanceOf('Cake\View\Input\MultiCheckbox', $result);
+ $this->assertInstanceOf('Cake\View\Widget\MultiCheckbox', $result);
}
/**
@@ -144,7 +144,7 @@ public function testGetResolveDependencyMissingClass() {
public function testGetResolveDependencyMissingDependency() {
$inputs = new InputRegistry($this->templates);
$inputs->clear();
- $inputs->add(['multicheckbox' => ['Cake\View\Input\MultiCheckbox', 'label']]);
+ $inputs->add(['multicheckbox' => ['Cake\View\Widget\MultiCheckbox', 'label']]);
$inputs->get('multicheckbox');
}
Oops, something went wrong.

0 comments on commit 902cada

Please sign in to comment.