public function expose($other, $prefix = '')
    {
        if (!is_string($other) && !is_object($other)) {
            throw new \InvalidArgumentException('Invalid adoption');
        }

        if (!is_string($prefix)) {
            throw new \InvalidArgumentException('Invalid prefix');
        }

        $prefix = rtrim($prefix, '.');
        if ($prefix !== '') {
            $prefix .= '.';
        }

        if (is_object($other)) {
            // An object was passed.
            $class = get_class($other);
            foreach (get_class_methods($class) as $method) {
                // Only adopt public methods of the object,
                // excluding the constructor and static methods.
                // To also register static methods, call this method
                // a second time with get_class($other).
                $reflector = new \ReflectionMethod($class, $method);
                if ($reflector->isPublic() && !$reflector->isConstructor() &&
                    !$reflector->isStatic()) {
                    $this[$prefix . $method] = array($other, $method);
                }
            }
        } else {
            // A class was passed.
            foreach (get_class_methods($other) as $method) {
                // Only adopt methods which are both public and static.
                $reflector = new \ReflectionMethod($other, $method);
                if ($reflector->isPublic() && $reflector->isStatic()) {
                    $this[$prefix . $method] = array($other, $method);
                }
            }
        }
    }