Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37858341
en ru br
ALT Linux repositórios
S:1.0.15-alt2
5.0: 1.0.15-alt1
4.1: 1.0.15-alt1

Group :: Desenvolvimento/Outros
RPM: pear-Net_URL

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Net_URL-1.0.15/000075500000000000000000000000001146052232600130455ustar00rootroot00000000000000Net_URL-1.0.15/URL.php000064400000000000000000000357101146052232600142260ustar00rootroot00000000000000<?php
// +-----------------------------------------------------------------------+
// | Copyright (c) 2002-2004, Richard Heyes |
// | All rights reserved. |
// | |
// | Redistribution and use in source and binary forms, with or without |
// | modification, are permitted provided that the following conditions |
// | are met: |
// | |
// | o Redistributions of source code must retain the above copyright |
// | notice, this list of conditions and the following disclaimer. |
// | o Redistributions in binary form must reproduce the above copyright |
// | notice, this list of conditions and the following disclaimer in the |
// | documentation and/or other materials provided with the distribution.|
// | o The names of the authors may not be used to endorse or promote |
// | products derived from this software without specific prior written |
// | permission. |
// | |
// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
// | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
// | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
// | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
// | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
// | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
// | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
// | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
// | |
// +-----------------------------------------------------------------------+
// | Author: Richard Heyes <richard at php net> |
// +-----------------------------------------------------------------------+
//
// $Id: URL.php,v 1.49 2007/06/28 14:43:07 davidc Exp $
//
// Net_URL Class


class Net_URL
{
var $options = array('encode_query_keys' => false);
/**
* Full url
* @var string
*/
var $url;

/**
* Protocol
* @var string
*/
var $protocol;

/**
* Username
* @var string
*/
var $username;

/**
* Password
* @var string
*/
var $password;

/**
* Host
* @var string
*/
var $host;

/**
* Port
* @var integer
*/
var $port;

/**
* Path
* @var string
*/
var $path;

/**
* Query string
* @var array
*/
var $querystring;

/**
* Anchor
* @var string
*/
var $anchor;

/**
* Whether to use []
* @var bool
*/
var $useBrackets;

/**
* PHP4 Constructor
*
* @see __construct()
*/
function Net_URL($url = null, $useBrackets = true)
{
$this->__construct($url, $useBrackets);
}

/**
* PHP5 Constructor
*
* Parses the given url and stores the various parts
* Defaults are used in certain cases
*
* @param string $url Optional URL
* @param bool $useBrackets Whether to use square brackets when
* multiple querystrings with the same name
* exist
*/
function __construct($url = null, $useBrackets = true)
{
$this->url = $url;
$this->useBrackets = $useBrackets;

$this->initialize();
}

function initialize()
{
$HTTP_SERVER_VARS = !empty($_SERVER) ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS'];

$this->user = '';
$this->pass = '';
$this->host = '';
$this->port = 80;
$this->path = '';
$this->querystring = array();
$this->anchor = '';

// Only use defaults if not an absolute URL given
if (!preg_match('/^[a-z0-9]+:\/\//i', $this->url)) {
$this->protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 'https' : 'http');

/**
* Figure out host/port
*/
if (!empty($HTTP_SERVER_VARS['HTTP_HOST']) &&
preg_match('/^(.*)(:([0-9]+))?$/U', $HTTP_SERVER_VARS['HTTP_HOST'], $matches))
{
$host = $matches[1];
if (!empty($matches[3])) {
$port = $matches[3];
} else {
$port = $this->getStandardPort($this->protocol);
}
}

$this->user = '';
$this->pass = '';
$this->host = !empty($host) ? $host : (isset($HTTP_SERVER_VARS['SERVER_NAME']) ? $HTTP_SERVER_VARS['SERVER_NAME'] : 'localhost');
$this->port = !empty($port) ? $port : (isset($HTTP_SERVER_VARS['SERVER_PORT']) ? $HTTP_SERVER_VARS['SERVER_PORT'] : $this->getStandardPort($this->protocol));
$this->path = !empty($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : '/';
$this->querystring = isset($HTTP_SERVER_VARS['QUERY_STRING']) ? $this->_parseRawQuerystring($HTTP_SERVER_VARS['QUERY_STRING']) : null;
$this->anchor = '';
}

// Parse the url and store the various parts
if (!empty($this->url)) {
$urlinfo = parse_url($this->url);

// Default querystring
$this->querystring = array();

foreach ($urlinfo as $key => $value) {
switch ($key) {
case 'scheme':
$this->protocol = $value;
$this->port = $this->getStandardPort($value);
break;

case 'user':
case 'pass':
case 'host':
case 'port':
$this->$key = $value;
break;

case 'path':
if ($value{0} == '/') {
$this->path = $value;
} else {
$path = dirname($this->path) == DIRECTORY_SEPARATOR ? '' : dirname($this->path);
$this->path = sprintf('%s/%s', $path, $value);
}
break;

case 'query':
$this->querystring = $this->_parseRawQueryString($value);
break;

case 'fragment':
$this->anchor = $value;
break;
}
}
}
}
/**
* Returns full url
*
* @return string Full url
* @access public
*/
function getURL()
{
$querystring = $this->getQueryString();

$this->url = $this->protocol . '://'
. $this->user . (!empty($this->pass) ? ':' : '')
. $this->pass . (!empty($this->user) ? '@' : '')
. $this->host . ($this->port == $this->getStandardPort($this->protocol) ? '' : ':' . $this->port)
. $this->path
. (!empty($querystring) ? '?' . $querystring : '')
. (!empty($this->anchor) ? '#' . $this->anchor : '');

return $this->url;
}

/**
* Adds or updates a querystring item (URL parameter).
* Automatically encodes parameters with rawurlencode() if $preencoded
* is false.
* You can pass an array to $value, it gets mapped via [] in the URL if
* $this->useBrackets is activated.
*
* @param string $name Name of item
* @param string $value Value of item
* @param bool $preencoded Whether value is urlencoded or not, default = not
* @access public
*/
function addQueryString($name, $value, $preencoded = false)
{
if ($this->getOption('encode_query_keys')) {
$name = rawurlencode($name);
}

if ($preencoded) {
$this->querystring[$name] = $value;
} else {
$this->querystring[$name] = is_array($value) ? array_map('rawurlencode', $value): rawurlencode($value);
}
}

/**
* Removes a querystring item
*
* @param string $name Name of item
* @access public
*/
function removeQueryString($name)
{
if ($this->getOption('encode_query_keys')) {
$name = rawurlencode($name);
}

if (isset($this->querystring[$name])) {
unset($this->querystring[$name]);
}
}

/**
* Sets the querystring to literally what you supply
*
* @param string $querystring The querystring data. Should be of the format foo=bar&x=y etc
* @access public
*/
function addRawQueryString($querystring)
{
$this->querystring = $this->_parseRawQueryString($querystring);
}

/**
* Returns flat querystring
*
* @return string Querystring
* @access public
*/
function getQueryString()
{
if (!empty($this->querystring)) {
foreach ($this->querystring as $name => $value) {
// Encode var name
$name = rawurlencode($name);

if (is_array($value)) {
foreach ($value as $k => $v) {
$querystring[] = $this->useBrackets ? sprintf('%s[%s]=%s', $name, $k, $v) : ($name . '=' . $v);
}
} elseif (!is_null($value)) {
$querystring[] = $name . '=' . $value;
} else {
$querystring[] = $name;
}
}
$querystring = implode(ini_get('arg_separator.output'), $querystring);
} else {
$querystring = '';
}

return $querystring;
}

/**
* Parses raw querystring and returns an array of it
*
* @param string $querystring The querystring to parse
* @return array An array of the querystring data
* @access private
*/
function _parseRawQuerystring($querystring)
{
$parts = preg_split('/[' . preg_quote(ini_get('arg_separator.input'), '/') . ']/', $querystring, -1, PREG_SPLIT_NO_EMPTY);
$return = array();

foreach ($parts as $part) {
if (strpos($part, '=') !== false) {
$value = substr($part, strpos($part, '=') + 1);
$key = substr($part, 0, strpos($part, '='));
} else {
$value = null;
$key = $part;
}

if (!$this->getOption('encode_query_keys')) {
$key = rawurldecode($key);
}

if (preg_match('#^(.*)\[([0-9a-z_-]*)\]#i', $key, $matches)) {
$key = $matches[1];
$idx = $matches[2];

// Ensure is an array
if (empty($return[$key]) || !is_array($return[$key])) {
$return[$key] = array();
}

// Add data
if ($idx === '') {
$return[$key][] = $value;
} else {
$return[$key][$idx] = $value;
}
} elseif (!$this->useBrackets AND !empty($return[$key])) {
$return[$key] = (array)$return[$key];
$return[$key][] = $value;
} else {
$return[$key] = $value;
}
}

return $return;
}

/**
* Resolves //, ../ and ./ from a path and returns
* the result. Eg:
*
* /foo/bar/../boo.php => /foo/boo.php
* /foo/bar/../../boo.php => /boo.php
* /foo/bar/.././/boo.php => /foo/boo.php
*
* This method can also be called statically.
*
* @param string $path URL path to resolve
* @return string The result
*/
function resolvePath($path)
{
$path = explode('/', str_replace('//', '/', $path));

for ($i=0; $i<count($path); $i++) {
if ($path[$i] == '.') {
unset($path[$i]);
$path = array_values($path);
$i--;

} elseif ($path[$i] == '..' AND ($i > 1 OR ($i == 1 AND $path[0] != '') ) ) {
unset($path[$i]);
unset($path[$i-1]);
$path = array_values($path);
$i -= 2;

} elseif ($path[$i] == '..' AND $i == 1 AND $path[0] == '') {
unset($path[$i]);
$path = array_values($path);
$i--;

} else {
continue;
}
}

return implode('/', $path);
}

/**
* Returns the standard port number for a protocol
*
* @param string $scheme The protocol to lookup
* @return integer Port number or NULL if no scheme matches
*
* @author Philippe Jausions <Philippe.Jausions@11abacus.com>
*/
function getStandardPort($scheme)
{
switch (strtolower($scheme)) {
case 'http': return 80;
case 'https': return 443;
case 'ftp': return 21;
case 'imap': return 143;
case 'imaps': return 993;
case 'pop3': return 110;
case 'pop3s': return 995;
default: return null;
}
}

/**
* Forces the URL to a particular protocol
*
* @param string $protocol Protocol to force the URL to
* @param integer $port Optional port (standard port is used by default)
*/
function setProtocol($protocol, $port = null)
{
$this->protocol = $protocol;
$this->port = is_null($port) ? $this->getStandardPort($protocol) : $port;
}

/**
* Set an option
*
* This function set an option
* to be used thorough the script.
*
* @access public
* @param string $optionName The optionname to set
* @param string $value The value of this option.
*/
function setOption($optionName, $value)
{
if (!array_key_exists($optionName, $this->options)) {
return false;
}

$this->options[$optionName] = $value;
$this->initialize();
}

/**
* Get an option
*
* This function gets an option
* from the $this->options array
* and return it's value.
*
* @access public
* @param string $opionName The name of the option to retrieve
* @see $this->options
*/
function getOption($optionName)
{
if (!isset($this->options[$optionName])) {
return false;
}

return $this->options[$optionName];
}

}
?>
Net_URL-1.0.15/docs/000075500000000000000000000000001146052232600137755ustar00rootroot00000000000000Net_URL-1.0.15/docs/6470.php000064400000000000000000000002721146052232600151070ustar00rootroot00000000000000<?php
error_reporting(E_ALL);
ini_set('display_errors', 'on');
require_once '../URL.php';

$url = new Net_URL;
$url->setOption('encode_query_keys', true);
print_r($url->querystring);
?>
Net_URL-1.0.15/docs/example.php000064400000000000000000000064661146052232600161550ustar00rootroot00000000000000<?php
// +-----------------------------------------------------------------------+
// | Copyright (c) 2002-2003, Richard Heyes |
// | All rights reserved. |
// | |
// | Redistribution and use in source and binary forms, with or without |
// | modification, are permitted provided that the following conditions |
// | are met: |
// | |
// | o Redistributions of source code must retain the above copyright |
// | notice, this list of conditions and the following disclaimer. |
// | o Redistributions in binary form must reproduce the above copyright |
// | notice, this list of conditions and the following disclaimer in the |
// | documentation and/or other materials provided with the distribution.|
// | o The names of the authors may not be used to endorse or promote |
// | products derived from this software without specific prior written |
// | permission. |
// | |
// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
// | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
// | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
// | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
// | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
// | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
// | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
// | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
// | |
// +-----------------------------------------------------------------------+
// | Author: Richard Heyes <richard at php net> |
// +-----------------------------------------------------------------------+
// $Id: example.php,v 1.12 2007/06/28 14:42:42 davidc Exp $
/**
* This example will decode the url given and display its
* constituent parts.
*/

//include('../URL.php');
include('Net/URL.php');

//$url = &new Net_URL('https://www.example.com/foo/bar/index.php?foo=bar');
$url = new Net_URL('https://example.com/pls/portal30/PORTAL30.wwpob_page.changetabs?p_back_url=http%3A%2F%2Fexample.com%2Fservlet%2Fpage%3F_pageid%3D360%2C366%2C368%2C382%26_dad%3Dportal30%26_schema%3DPORTAL30&foo=bar');
?>
<html>
<body>

<pre>
Protocol...: <?php echo $url->protocol?>

Username...: <?php echo $url->user?>

Password...: <?php echo $url->pass?>

Server.....: <?php echo $url->host?>

Port.......: <?php echo $url->port?>

File/path..: <?php echo $url->path?>

Querystring: <?php print_r($url->querystring)?>

Anchor.....: <?php echo $url->anchor?>


Full URL...: <?php echo $url->getUrl()?>
</pre>

</body>
</html>
package.xml000064400000000000000000000171061146052232600131770ustar00rootroot00000000000000<?xml version="1.0" encoding="UTF-8"?>
<package packagerversion="1.6.0" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>Net_URL</name>
<channel>pear.php.net</channel>
<summary>Easy parsing of Urls</summary>
<description>Provides easy parsing of URLs and their constituent parts.</description>
<lead>
<name>Richard heyes</name>
<user>richard</user>
<email>richard@php.net</email>
<active>no</active>
</lead>
<lead>
<name>David Coallier</name>
<user>davidc</user>
<email>davidc@php.net</email>
<active>yes</active>
</lead>
<date>2007-06-28</date>
<time>10:57:03</time>
<version>
<release>1.0.15</release>
<api>1.0.15</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>- Fixed Bug #11385 $url was defined.
- Fixed Doc #11017 Fixed docblock problem (cweiske)
- Fixed Bug #11008 (Override object properties in initialize())
- Fixed Bug #6338 Wrong query string handling
- Fixed Bug #704 Fixed hardcoded value and use ini_get(arg_separator)
- Fixed Bug #1036 Improper default port number detection
- Fixed Bug #1447 use $_SERVER instead of HTTP_SERVER_VARS
- Fixed Bug #1558 _parseRawQueryString failed if arg_sep.input was more than 1 char.
- Fixed Bug #1682 File was in DOC format rather than Unix
- Fixed Bug #2334 Sqare brackets in var names were encoded
- Fixed Bug #2824 Better error handling support.
- Fixed bug #3159 setProtocol was calling getStandardPort incorrectly</notes>
<contents>
<dir name="/">
<file baseinstalldir="Net" md5sum="af793351a5f00e31a2df697b54cfbc02" name="docs/example.php" role="doc" />
<file baseinstalldir="Net" md5sum="0488b5531c31332113100971be7ba2d9" name="docs/6470.php" role="doc" />
<file baseinstalldir="Net" md5sum="c7e690d656b56cc48a12399331a35b27" name="URL.php" role="php" />
</dir>
</contents>
<dependencies>
<required>
<php>
<min>4.0.0</min>
</php>
<pearinstaller>
<min>1.4.0b1</min>
</pearinstaller>
</required>
</dependencies>
<phprelease />
<changelog>
<release>
<version>
<release>1.0.14</release>
<api>1.0.14</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2004-06-19</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>Whitespace</notes>
</release>
<release>
<version>
<release>1.0.13</release>
<api>1.0.13</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2004-06-05</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>Fix bug 1558</notes>
</release>
<release>
<version>
<release>1.0.12</release>
<api>1.0.12</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2004-05-08</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>Bug fixes release (#704 and #1036)</notes>
</release>
<release>
<version>
<release>1.0.11</release>
<api>1.0.11</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2004-01-17</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>Bug fixes release (#83 and #471)</notes>
</release>
<release>
<version>
<release>1.0.10</release>
<api>1.0.10</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2002-04-06</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>Be more flexible in what constitutes a scheme</notes>
</release>
<release>
<version>
<release>1.0.9</release>
<api>1.0.9</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2002-04-05</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>Fix couple of absolute URL bugs.</notes>
</release>
<release>
<version>
<release>1.0.8</release>
<api>1.0.8</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2002-03-06</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>Various bugs. Remove auto setting of default url to &apos;/&apos; if a url is supplied
to the constructor. May cause BC issues.</notes>
</release>
<release>
<version>
<release>1.0.7</release>
<api>1.0.7</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2002-12-07</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>Added method to resolve URL paths of //, ../ and ./</notes>
</release>
<release>
<version>
<release>1.0.6</release>
<api>1.0.6</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2002-12-07</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>Make usage of [] optional</notes>
</release>
<release>
<version>
<release>1.0.5</release>
<api>1.0.5</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2002-11-14</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>Allow for URLS such as ...?foo</notes>
</release>
<release>
<version>
<release>1.0.4</release>
<api>1.0.4</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2002-07-27</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>License change</notes>
</release>
<release>
<version>
<release>1.0.3</release>
<api>1.0.3</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2002-06-20</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>Now uses HTTP_HOST if available.</notes>
</release>
<release>
<version>
<release>1.0.2</release>
<api>1.0.2</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2002-04-28</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>updated to fix a minor irritation when running on windows</notes>
</release>
<release>
<version>
<release>1.0.1</release>
<api>1.0.1</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2002-04-28</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>Maintenance release. Bugs fixed with path detection and defaults.</notes>
</release>
<release>
<version>
<release>1.0</release>
<api>1.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2002-02-17</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>This is the initial release of the Net_URL package.</notes>
</release>
</changelog>
</package>
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009