private function getPartsFromSegment(string $segment): array
    {
        $parts = explode(DIRECTORY_SEPARATOR, $segment);

        return array_filter($parts, function ($part) {
            return $this->isNotEmpty($part);
        });
    }
private function getPartsFromSegment(string $segment): array
    {
        $parts = explode(DIRECTORY_SEPARATOR, $segment);

        return array_filter($parts, function ($part) {
            return $this->isNotEmpty($part);
        });
    }
private function getPartsFromSegment ( string $ segment ) : array { $ parts = explode ( DIRECTORY_SEPARATOR , $ segment ) ; return array_filter ( $ parts , function ( $ part ) { return $ this -> isNotEmpty ( $ part ) ; } ) ; }
Separa un segmento en varias partes, cortando por DIRECTORY_SEPARATOR

@param string $segment

@return string[]
Separa un segmento en varias partes cortando por DIRECTORY_SEPARATOR