<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://es.wikieducator.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="es">
		<id>https://es.wikieducator.org/index.php?action=history&amp;feed=atom&amp;title=Usuario%3ALmorillas%2Fdesarrollo_web_servidor%2Fphp%2Fclases</id>
		<title>Usuario:Lmorillas/desarrollo web servidor/php/clases - Historial de revisiones</title>
		<link rel="self" type="application/atom+xml" href="https://es.wikieducator.org/index.php?action=history&amp;feed=atom&amp;title=Usuario%3ALmorillas%2Fdesarrollo_web_servidor%2Fphp%2Fclases"/>
		<link rel="alternate" type="text/html" href="https://es.wikieducator.org/index.php?title=Usuario:Lmorillas/desarrollo_web_servidor/php/clases&amp;action=history"/>
		<updated>2026-06-19T13:03:33Z</updated>
		<subtitle>Historial de revisiones para esta página en el wiki</subtitle>
		<generator>MediaWiki 1.23.14</generator>

	<entry>
		<id>https://es.wikieducator.org/index.php?title=Usuario:Lmorillas/desarrollo_web_servidor/php/clases&amp;diff=14314&amp;oldid=prev</id>
		<title>Lmorillas en 08:00 3 feb 2014</title>
		<link rel="alternate" type="text/html" href="https://es.wikieducator.org/index.php?title=Usuario:Lmorillas/desarrollo_web_servidor/php/clases&amp;diff=14314&amp;oldid=prev"/>
				<updated>2014-02-03T08:00:54Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Revisión anterior&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revisión de 08:00 3 feb 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línea 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línea 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{MiTitulo|Clases y Objetos}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{MiTitulo|Clases y Objetos}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{TEP}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Objetivo|&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Objetivo|&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* http://php.net/manual/es/language.oop5.php&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* http://php.net/manual/es/language.oop5.php&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lmorillas</name></author>	</entry>

	<entry>
		<id>https://es.wikieducator.org/index.php?title=Usuario:Lmorillas/desarrollo_web_servidor/php/clases&amp;diff=14313&amp;oldid=prev</id>
		<title>Lmorillas en 08:00 3 feb 2014</title>
		<link rel="alternate" type="text/html" href="https://es.wikieducator.org/index.php?title=Usuario:Lmorillas/desarrollo_web_servidor/php/clases&amp;diff=14313&amp;oldid=prev"/>
				<updated>2014-02-03T08:00:24Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Revisión anterior&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revisión de 08:00 3 feb 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línea 4:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línea 4:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Objetivo|&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Objetivo|&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* http://php.net/manual/es/language.oop5.php&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* http://php.net/manual/es/language.oop5.php&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* http://www.phpya.com.ar/poo/&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|Title=Documentación&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|Title=Documentación&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|TOCdepth=2}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|TOCdepth=2}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lmorillas</name></author>	</entry>

	<entry>
		<id>https://es.wikieducator.org/index.php?title=Usuario:Lmorillas/desarrollo_web_servidor/php/clases&amp;diff=14312&amp;oldid=prev</id>
		<title>Lmorillas: Página creada con '{{MiTitulo|Clases y Objetos}}  {{TEP}} {{Objetivo| * http://php.net/manual/es/language.oop5.php  |Title=Documentación |TOCdepth=2}}  {{Objetivo| * http://www.php.net/manual/es/…'</title>
		<link rel="alternate" type="text/html" href="https://es.wikieducator.org/index.php?title=Usuario:Lmorillas/desarrollo_web_servidor/php/clases&amp;diff=14312&amp;oldid=prev"/>
				<updated>2014-02-03T07:49:16Z</updated>
		
		<summary type="html">&lt;p&gt;Página creada con &amp;#039;{{MiTitulo|Clases y Objetos}}  {{TEP}} {{Objetivo| * http://php.net/manual/es/language.oop5.php  |Title=Documentación |TOCdepth=2}}  {{Objetivo| * http://www.php.net/manual/es/…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Página nueva&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{MiTitulo|Clases y Objetos}}&lt;br /&gt;
&lt;br /&gt;
{{TEP}}&lt;br /&gt;
{{Objetivo|&lt;br /&gt;
* http://php.net/manual/es/language.oop5.php&lt;br /&gt;
&lt;br /&gt;
|Title=Documentación&lt;br /&gt;
|TOCdepth=2}}&lt;br /&gt;
&lt;br /&gt;
{{Objetivo|&lt;br /&gt;
* http://www.php.net/manual/es/classobj.examples.php&lt;br /&gt;
&lt;br /&gt;
|Title=Ejemplos&lt;br /&gt;
|TOCdepth=2}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Ejemplo con closures ==&lt;br /&gt;
&lt;br /&gt;
http://es1.php.net/manual/es/functions.anonymous.php#example-168&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// Un carro de compras básico que contiene una lista de productos añadidos&lt;br /&gt;
// y la cantidad de cada producto. Incluye un método que&lt;br /&gt;
// calcula el precio total de los artículos del carro usando una&lt;br /&gt;
// clausura como llamada de retorno.&lt;br /&gt;
class Carro&lt;br /&gt;
{&lt;br /&gt;
    const PRECIO_MANTEQUILLA = 1.00;&lt;br /&gt;
    const PRECIO_LECHE       = 3.00;&lt;br /&gt;
    const PRECIO_HUEVOS      = 6.95;&lt;br /&gt;
&lt;br /&gt;
    protected $productos = array();&lt;br /&gt;
&lt;br /&gt;
    public function añadir($producto, $cantidad)&lt;br /&gt;
    {&lt;br /&gt;
        $this-&amp;gt;productos[$producto] = $cantidad;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public function obtenerCantidad($producto)&lt;br /&gt;
    {&lt;br /&gt;
        return isset($this-&amp;gt;productos[$producto]) ? $this-&amp;gt;productos[$producto] :&lt;br /&gt;
               FALSE;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public function obtenerTotal($impuesto)&lt;br /&gt;
    {&lt;br /&gt;
        $total = 0.00;&lt;br /&gt;
&lt;br /&gt;
        $llamadaDeRetorno =&lt;br /&gt;
            function ($cantidad, $producto) use ($impuesto, &amp;amp;$total)&lt;br /&gt;
            {&lt;br /&gt;
                $precioUnidad = constant(__CLASS__ . &amp;quot;::PRECIO_&amp;quot; .&lt;br /&gt;
                    strtoupper($producto));&lt;br /&gt;
                $total += ($precioUnidad * $cantidad) * ($impuesto + 1.0);&lt;br /&gt;
            };&lt;br /&gt;
&lt;br /&gt;
        array_walk($this-&amp;gt;productos, $llamadaDeRetorno);&lt;br /&gt;
        return round($total, 2);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$mi_carro = new Carro;&lt;br /&gt;
&lt;br /&gt;
// Añadir algunos artículos al carro&lt;br /&gt;
$mi_carro-&amp;gt;añadir('mantequilla', 1);&lt;br /&gt;
$mi_carro-&amp;gt;añadir('leche', 3);&lt;br /&gt;
$mi_carro-&amp;gt;añadir('huevos', 6);&lt;br /&gt;
&lt;br /&gt;
// Imprimir el total con un impuesto de venta del 5%.&lt;br /&gt;
print $mi_carro-&amp;gt;obtenerTotal(0.05) . &amp;quot;\n&amp;quot;;&lt;br /&gt;
// El resultado es 54.29&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lmorillas</name></author>	</entry>

	</feed>