public function deepClone(&$object) { foreach ($object as &$val) { if (Validator::isObject($val)) { $val = clone $val; } elseif (Validator::isArray($val)) { $this->deepClone($val); } } }
public static function validateDepend($depends) { if (!Validator::isArray($depends) || !Validator::isObject($depends)) { throw new IllegalArgumentException(); } }