cool - i've been looking through the prepend file you (class includes)
and googling them.
why twig and smartypants? just curious.
i'm kinda tired - brain has slowed down a lot, but i did get this far:
i am treating this as a whole string @the url now. so i'm making
progress.
it's feeling like python (now) - after a str_ireplace to put spaces
where the slashes were, and an explode to an array - i have some
workable variables now.
$urls = '/(L|R|P)+(\d+)' => 'reports', <--- i need the first char to
be a capitol L,R, or P and the rest digits... i have an app on my
screen called RegexBuilder - i'm not sure it's luckily i escaped
learning regex this long haha - i'm hoping i can figure it out after
some sleep.
the code to break the url string apart is:
$url_setup = str_ireplace('/',' ',$reports);
$url_explode = explode(" ", (string)$url_setup);
atm, the explode is useless, but the output isn't bad - just strips at
the letter "L" o.0
str_ireplace => Array
(
[0] => L33334 343234 234234
[1] => L
[2] => 343234
[3] => 234234
i'm going to be using a PDO pattern for db (in PHP), any chance you
have an example for implementing a db class? if not, i'll just toss
it in there and instantiate it and 'wing it' :-D
Thanks Joe,
Greg
On Oct 6, 2:08 pm, Joe <
joetopj...@gmail.com> wrote:
> Hi Greg,
>
> On Oct 6, 11:59 am, webpied <
gmi...@gmail.com> wrote:
>
> > hi Joe, thanks for answering, so it basically handles each appending
> > argument as an extension (case/switch or conditional)?
> > url: /about-us/history/
> > class: explode($url... *ka-boom*
> > $url[1] == 'about-us'
> > $url[2] == 'history' (but as a variable)?
>
> The entire URL regex is scanned -- it does not get split up at all.
> Unfortunately this can lead to a potentially long string of URLs if
> you want to map each one to different classes:
>
> /about-us/history => history
> /about-us/contact => contact
>
> etc
>
> You could do:
>
> /about-us/(.*).html => about_us
>
> and add the logic to your about_us class.
>
> > does glue have a sample app somewhere - like a todo app or something -
> > anything with some guides for setting up classes??
>
> > thanks for the clues.
>
> Unfortunately documentation is sparse. Besides the mini-tutorial on
> the
gluephp.com webpage, there are two undocumented docs:
>
>
http://gluephp.com/glueandsmarty.html -- needs rewritten to use the
> more modern Twig template system.
http://gluephp.com/index.txt-- GluePHP's index.php source code that I
> posted for a past discussion on Reddit.
http://gluephp.com/set_env.txt-- required file for the above.
>
> Thanks,
> Joe