public static function getCurrentDir($object)
    {
        if (empty($object)) {
            return '';
        }

        $child = new \ReflectionClass($object);
        return dirname($child->getFileName());
    }