private function buildFile():int
    {
        $mercure = $this->analysis();
        $mercurefinal = array();
        if ($this->clear() != 1) {
            throw new Server500(new \ArrayObject(array("explain" => "Cannot clear Routing JS File",
                "solution" => "Please check the Routing JS file")));
        }
        while ($mercure->valid()) {
            array_push($mercurefinal, $mercure->current());
            $mercure->next();
        }

        return ($this->write(json_encode((object)$mercurefinal, JSON_PRETTY_PRINT)));
    }
private function buildFile():int
    {
        $mercure = $this->analysis();
        $mercurefinal = array();
        if ($this->clear() != 1) {
            throw new Server500(new \ArrayObject(array("explain" => "Cannot clear Routing JS File",
                "solution" => "Please check the Routing JS file")));
        }
        while ($mercure->valid()) {
            array_push($mercurefinal, $mercure->current());
            $mercure->next();
        }

        return ($this->write(json_encode((object)$mercurefinal, JSON_PRETTY_PRINT)));
    }
private function buildFile ( ) : int { $ mercure = $ this -> analysis ( ) ; $ mercurefinal = array ( ) ; if ( $ this -> clear ( ) != 1 ) { throw new Server500 ( new \ ArrayObject ( array ( "explain" => "Cannot clear Routing JS File" , "solution" => "Please check the Routing JS file" ) ) ) ; } while ( $ mercure -> valid ( ) ) { array_push ( $ mercurefinal , $ mercure -> current ( ) ) ; $ mercure -> next ( ) ; } return ( $ this -> write ( json_encode ( ( object ) $ mercurefinal , JSON_PRETTY_PRINT ) ) ) ; }
Build JS Routing File with multiple stage
@return int Operation is a success
@throws Server500 If Clear was not working
Build JS Routing File with multiple stage