Ver Mensaje Individual
  #9 (permalink)  
Antiguo 06/09/2012, 09:53
Avatar de masterpuppet
masterpuppet
Software Craftsman
 
Fecha de Ingreso: enero-2008
Ubicación: Montevideo, Uruguay
Mensajes: 3.550
Antigüedad: 16 años, 4 meses
Puntos: 845
Respuesta: Duda variable acceso de una clase a otra

Un apunte, lo que suele hacer para ver si algo es iterable es comprobar si es array tambien, algo asi:

Código PHP:
Ver original
  1. if(!is_array($array) || !$array instanceof \Traversable ){
  2.     throw new \RuntimeException(/***/);
  3. }

Saludos.
__________________
http://es.phptherightway.com/
thats us riders :)