Ver Mensaje Individual
  #11 (permalink)  
Antiguo 19/05/2014, 06:01
Avatar de Italico76
Italico76
 
Fecha de Ingreso: abril-2007
Mensajes: 3.303
Antigüedad: 16 años, 11 meses
Puntos: 292
Respuesta: APORTE: Emular polimorfismo y sobrecarga tipada de forma simple.

@NSD : se ve interesante pero genera muchos Warnings y Notices en PHP 5.4.26 :

Cita:

Warning: The magic method __callStatic() must have public visibility and be static in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 101

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 36

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 36

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Hola, no has ingresado nada

Hola, has ingresado: 1

Notice: Undefined variable: this in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 103

Warning: forward_static_call() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 103

Notice: Undefined variable: this in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 103

Warning: forward_static_call() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 103

Hola, has ingresado: 'hola'

Hola, has ingresado un numero: 99 y un string 'hola'

Hola, has ingresado un string: 'hola' y un numero 1

Hola, has ingresado un numero: 1 y un numero 2

Hola, gracias por el auto
run, run, run, run, ...

Hola, gracias por el tren del namespace a
chu-chua, chu-chua, chu-chua, ...

Hola, gracias por el tren del namespace b
chu-chub, chu-chub, chu-chub, ...

Hola, gracias por el vehiculo
rrrrrrrrrrrrrrrrrrrr ...

Hola, me diste un objeto: NS\Foto, muchas gracias.

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 36

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 36

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Notice: Undefined index: default in C:\WWW\apache2\htdocs\pruebas\polimorfismo con ReflectionObject.php on line 45

Hola, has ingresado un string: 'hola' y un numero 1 pero en una subclase.
__________________
Salu2!