コード例 #1
0
    /**
     * Looks up a static page from the URL
     *
     * If a page is found it's stored against $app->page for the app to
     * use.
     *
     * @param string $url URL to page
     * @param MMPage $app Reference to the current application
     * @return MMStaticPage if page is found
     **/
    static public function findNodeFromPath( $url, &$app )
    {
        if ( preg_match( '/\([^\)]+\)/', $url ) )
            $url = preg_replace( '#/\([^\)]+\)/.*$#', '', $url );

        $app->page = MMStaticPage::fetchPageByUrl( $url );
        return $app->page;
    }