Пример #1
0
 public function testCorrectUsage()
 {
     newType(FilePath::class, 'string');
     $path = new FilePath('foobar');
     $this->assertEquals('foobar', $path->unbox());
     newType(Age::class, 'int');
     $age = new Age(16);
     $this->assertEquals(16, $age->unbox());
     newType(Opacity::class, 'float');
     $opacity = new Opacity(0.75);
     $this->assertEquals(0.75, $opacity->unbox());
     newType(UltraBoolean::class, 'bool');
     $ultraBool = new UltraBoolean(EXTREMELY_TRUE);
     $this->assertEquals(EXTREMELY_TRUE, $ultraBool->unbox());
     newType(MegaObject::class, \StdClass::class);
     $inferiorObj = (object) [];
     $megaObj = new MegaObject($inferiorObj);
     $this->assertEquals($inferiorObj, $megaObj->unbox());
     // note explicit leading slash
     newType(SuperMegaObject::class, '\\StdClass');
     $superMegaObj = new SuperMegaObject($inferiorObj);
     $this->assertEquals($inferiorObj, $superMegaObj->unbox());
     newType('\\UltraMegaObject', \StdClass::class);
     $ultraMegaObj = new \UltraMegaObject($inferiorObj);
     $this->assertEquals($inferiorObj, $ultraMegaObj->unbox());
 }
Пример #2
0
		font-size:17px;
		line-height:22px;
		font-weight:800;
		padding-top:10px;
		padding-bottom:20px;
	}
	/*------------------------------------------------------------*/
	#main > #inner {
		width:100%;
		height:100%;
		position:relative;
	}
	/*------------------------------------------------------------*/
	.formInput_v0 {
		<?php 
Opacity::go(0.7);
?>
	}
	/*------------------------------------------------------------*/
	@media (max-height:440px) {
		.form_v14 {
			height:100%;
		}
	}
	@media (max-width:558px) {
		.form_v14 {
			width:250px;
		}
	}
	@media (max-height:280px) {
		#main > #inner {