95 lines
		
	
	
		
			4.5 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			95 lines
		
	
	
		
			4.5 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
namespace nur\v;
 | 
						|
 | 
						|
use nur\c;
 | 
						|
use nur\co;
 | 
						|
 | 
						|
/**
 | 
						|
 * Class vo: affichage pour le web, le contenu est généralement produit par
 | 
						|
 * {@link c} et/ou {@link v}
 | 
						|
 */
 | 
						|
class vo {
 | 
						|
  static final function write($vs): void { co::_write(q($vs)); }
 | 
						|
  static final function print($vs): void { co::_print(q($vs)); }
 | 
						|
 | 
						|
  static final function t($vs): void { co::_write(q($vs)); }
 | 
						|
 | 
						|
  static final function start(string $tag, $vs=null): void { co::_write(v::start($tag, $vs)); }
 | 
						|
  static final function end(string $tag): void { co::_write(v::end($tag)); }
 | 
						|
  static final function tag(string $tag, $vs=null, bool $require_content=false): void { co::_write(v::tag($tag, $vs, $require_content)); }
 | 
						|
  static final function tag1(string $tag, $vs=null, bool $require_content=false): void { co::_write(v::tag1($tag, $vs, $require_content)); }
 | 
						|
 | 
						|
  static final function h1($vs): void { co::_print(v::h1($vs)); }
 | 
						|
  static final function h2($vs): void { co::_print(v::h2($vs)); }
 | 
						|
  static final function h3($vs): void { co::_print(v::h3($vs)); }
 | 
						|
  static final function h4($vs): void { co::_print(v::h4($vs)); }
 | 
						|
  static final function h5($vs): void { co::_print(v::h5($vs)); }
 | 
						|
  static final function h6($vs): void { co::_print(v::h6($vs)); }
 | 
						|
 | 
						|
  static final function hr($vs=null): void { co::_print(v::hr($vs)); }
 | 
						|
 | 
						|
  static final function div($vs): void { co::_print(v::div($vs)); }
 | 
						|
  static final function sdiv($vs=null): void { co::_write(v::sdiv($vs)); }
 | 
						|
  static final function ediv(): void { co::_write(v::ediv()); }
 | 
						|
  static final function mdiv(string $key, ?array $data=null, $vs=null): void { co::_print(v::mdiv($key, $data, $vs)); }
 | 
						|
 | 
						|
  static final function pre($vs): void { co::_print(v::pre($vs)); }
 | 
						|
  static final function spre($vs=null): void { co::_print(v::spre($vs)); }
 | 
						|
  static final function epre(): void { co::_print(v::epre()); }
 | 
						|
 | 
						|
  static final function p($vs): void { co::_print(v::p($vs)); }
 | 
						|
  static final function sp($vs=null): void { co::_print(v::sp($vs)); }
 | 
						|
  static final function ep(): void { co::_print(v::ep()); }
 | 
						|
 | 
						|
  static final function br($vs=null): void { co::_print(v::br($vs)); }
 | 
						|
 | 
						|
  static final function span($vs): void { co::_write(v::span($vs)); }
 | 
						|
  static final function mspan(string $key, ?array $data=null, $vs=null): void { co::_print(v::mspan($key, $data, $vs)); }
 | 
						|
  static final function a($vs, ?string $url=null): void { co::_write(v::a($vs, $url)); }
 | 
						|
  static final function b($vs): void { co::_write(v::b($vs)); }
 | 
						|
  static final function i($vs): void { co::_write(v::i($vs)); }
 | 
						|
  static final function em($vs): void { co::_write(v::em($vs)); }
 | 
						|
  static final function strong($vs): void { co::_write(v::strong($vs)); }
 | 
						|
 | 
						|
  static final function ul($vs): void { co::_print(v::ul($vs)); }
 | 
						|
  static final function sul($vs=null): void { co::_print(v::sul($vs)); }
 | 
						|
  static final function eul(): void { co::_print(v::eul()); }
 | 
						|
  static final function ol($vs): void { co::_print(v::ol($vs)); }
 | 
						|
  static final function sol($vs=null): void { co::_print(v::sol($vs)); }
 | 
						|
  static final function eol(): void { co::_print(v::eol()); }
 | 
						|
  static final function li($vs): void { co::_print(v::li($vs)); }
 | 
						|
  static final function sli($vs=null): void { co::_write(v::sli($vs)); }
 | 
						|
  static final function eli(): void { co::_print(v::eli()); }
 | 
						|
 | 
						|
  static final function stable($vs=null): void { co::_print(v::stable($vs)); }
 | 
						|
  static final function etable(): void { co::_print(v::etable()); }
 | 
						|
 | 
						|
  static final function thead($vs=null): void { co::_print(v::thead($vs)); }
 | 
						|
  static final function sthead($vs=null): void { co::_print(v::sthead($vs)); }
 | 
						|
  static final function ethead(): void { co::_print(v::ethead()); }
 | 
						|
 | 
						|
  static final function stbody($vs=null): void { co::_print(v::stbody($vs)); }
 | 
						|
  static final function etbody(): void { co::_print(v::etbody()); }
 | 
						|
 | 
						|
  static final function tr($vs): void { co::_print(v::tr($vs)); }
 | 
						|
  static final function str($vs=null): void { co::_print(v::str($vs)); }
 | 
						|
  static final function etr(): void { co::_print(v::etr()); }
 | 
						|
  static final function th($vs): void { co::_write(v::th($vs)); }
 | 
						|
  static final function td($vs): void { co::_write(v::td($vs)); }
 | 
						|
 | 
						|
  static final function if($cond, $vs): bool {
 | 
						|
    co::_write(v::if($cond, $vs));
 | 
						|
    return boolval($cond);
 | 
						|
  }
 | 
						|
  static final function unless($cond, $vs): bool {
 | 
						|
    co::_write(v::unless($cond, $vs));
 | 
						|
    return !boolval($cond);
 | 
						|
  }
 | 
						|
  static final function callif($cond, ?callable $function, ...$args): bool {
 | 
						|
    co::_write(v::callif($cond, $function, ...$args));
 | 
						|
    return boolval($cond);
 | 
						|
  }
 | 
						|
 | 
						|
  static final function foreach(?iterable $values, ?callable $function): void { co::_write(v::foreach($values, $function)); }
 | 
						|
}
 |