Skip to content
Snippets Groups Projects
Commit 95cfc5ba authored by alvaro's avatar alvaro
Browse files

Adding new modules to solve #98

* Explode - returns array of exploded strings using delimiter
* Path - takes the path of a URL (not including hostname nor fragment
* Pop - returns last value in an array
parent 53c9e965
No related branches found
No related tags found
No related merge requests found
lodspeakr - Linked Open Data Simple Publishing Kit
author: Alvaro Graves (alvaro@graves.cl)
version: 20120316
version: 20120318
Simplest Installation
---------------------
......
<?php
class Haanga_Extension_Filter_Explode
{
static function generator($compiler, $args)
{
if (count($args) != 2) {
$compiler->Error("Explode only needs two parameter");
}
return hexec('explode', $args[1], $args[0]);
}
}
<?php
class Haanga_Extension_Filter_Path
{
static function generator($cmp, $args)
{
return hexec('parse_url', $args[0], hconst('PHP_URL_PATH'));
}
}
<?php
class Haanga_Extension_Filter_Pop
{
static function generator($compiler, $args)
{
if (count($args) != 1) {
$compiler->Error("Pop only needs two parameter");
}
return hexec('array_pop', $args[0]);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment