src/Units/ServiceProvider.php
protected function unitPath($append = null)
    {
        $reflection = new \ReflectionClass($this);
        $realPath = realpath(dirname($reflection->getFileName()) . '/../');

        if (!$append) {
            return $realPath;
        }

        return $realPath . '/' . $append;
    }
protected function unitPath($append = null)
    {
        $reflection = new \ReflectionClass($this);
        $realPath = realpath(dirname($reflection->getFileName()) . '/../');

        if (!$append) {
            return $realPath;
        }

        return $realPath . '/' . $append;
    }
protected function unitPath ( $ append = null ) { $ reflection = new \ ReflectionClass ( $ this ) ; $ realPath = realpath ( dirname ( $ reflection -> getFileName ( ) ) . '/../' ) ; if ( ! $ append ) { return $ realPath ; } return $ realPath . '/' . $ append ; }
Detects the unit base path so resources can be proper loaded
on child classes.

@param string $append

@return string
Detects the unit base path so resources can be proper loaded on child classes .