Foros del Web » Programando para Internet » PHP »

[SOLUCIONADO] Tener solamente código php 5

Estas en el tema de Tener solamente código php 5 en el foro de PHP en Foros del Web. En este código que muestro, qué tengo que cambiar para tener solamente PHP5. Por ejemplo leyendo el manual dice que tengo que tener una función ...
  #1 (permalink)  
Antiguo 23/10/2012, 11:25
Avatar de bandolera  
Fecha de Ingreso: abril-2009
Mensajes: 613
Antigüedad: 15 años
Puntos: 7
Tener solamente código php 5

En este código que muestro, qué tengo que cambiar para tener solamente PHP5.
Por ejemplo leyendo el manual dice que tengo que tener una función __construct()
y debe reemplazar a function TemasDAO() ??

Código PHP:
<?php
class TemasDAO {
    function 
TemasDAO() {
    }

    function 
listar(){
       
$query "SELECT codigo, apepat, apemat, nombres, condicion FROM tienda";
       
$BD = new ConexionDB();
       
$recordSet $BD->dbLink->Execute($query);
       if (!
$recordSet){
         
Debug::println("No se pudo ejecutar la consulta listar: " $query);
         return 
false;
       }
       
$productos = array();
       while(
$fila=$recordSet->FetchRow()) {
          
$productos[] = new ProductoVO($fila['id_producto'], $fila['id_categoria'], $fila['nombre'],
                                      
$fila['descripcion'], $fila['precio'], $fila['stock'], $fila['importancia'],
                                      
$fila['imagen']);
       }
      return 
$productos;
    }
}

?>
Gracias.
__________________
Todos somos iguales. NO! a la violencia de género.
  #2 (permalink)  
Antiguo 23/10/2012, 11:54
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: Tener solamente código php 5

La respuesta es: si.

Ahora, ¿cual es el problema?

¿Algo te impide hacer los cambios?
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #3 (permalink)  
Antiguo 23/10/2012, 13:05
Avatar de bandolera  
Fecha de Ingreso: abril-2009
Mensajes: 613
Antigüedad: 15 años
Puntos: 7
Respuesta: Tener solamente código php 5

Cambiar esto:
Código PHP:
function TemasDAO() { 
    } 
por:
Código PHP:
function __construct() { 
    } 
Y eso es todo? No y ya puedo decir que todo está en PHP5 ? Esa es mi inquietud.
__________________
Todos somos iguales. NO! a la violencia de género.
  #4 (permalink)  
Antiguo 23/10/2012, 13:45
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: Tener solamente código php 5

Me queda claro que no entiendes a que se refiere "php 5", en el manual se indica una guía de migración que implica todos los cambios.

Hay muchas cosas que cambiar, si todo tu código es sólo esta clase entonces no veo porque preocuparse, ya esta hecho.

Si es mas que eso entonces de verdad tienes que leer el manual, no hay de otra.
http://docs.php.net/manual/es/migration5.php
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #5 (permalink)  
Antiguo 28/10/2012, 12:31
Avatar de bandolera  
Fecha de Ingreso: abril-2009
Mensajes: 613
Antigüedad: 15 años
Puntos: 7
Pregunta Respuesta: Tener solamente código php 5

Cita:
Iniciado por pateketrueke Ver Mensaje
Me queda claro que no entiendes a que se refiere "php 5", en el manual se indica una guía de migración que implica todos los cambios.

Hay muchas cosas que cambiar, si todo tu código es sólo esta clase entonces no veo porque preocuparse, ya esta hecho.

Si es mas que eso entonces de verdad tienes que leer el manual, no hay de otra.
http://docs.php.net/manual/es/migration5.php
Lo que tengo es una pequeña estructura.
Crees que me puedas ayudar?
hhm.... por pm tal vez?
__________________
Todos somos iguales. NO! a la violencia de género.
  #6 (permalink)  
Antiguo 28/10/2012, 12:34
Avatar de abimaelrc
Colaborador
 
Fecha de Ingreso: mayo-2009
Ubicación: En el planeta de Puerto Rico
Mensajes: 14.734
Antigüedad: 14 años, 11 meses
Puntos: 1517
Respuesta: Tener solamente código php 5

Te recomiendo que sigas con el tema aca.
__________________
Verifica antes de preguntar.
Los verdaderos amigos se hieren con la verdad, para no perderlos con la mentira. - Eugenio Maria de Hostos
  #7 (permalink)  
Antiguo 29/10/2012, 08:00
Avatar de bandolera  
Fecha de Ingreso: abril-2009
Mensajes: 613
Antigüedad: 15 años
Puntos: 7
Pregunta Respuesta: Tener solamente código php 5

Tengo este código que muestra un listado. Es simple pero es un modelo.
https://skydrive.live.com/redir?resi...B3YlQn51xQ2exA

Usando Smarty 2.6 funciona correctamente.
Pero cuando intento usa Smarty 3 no funciona. Acabo de leer que para usar Smarty mi código debe estar totalmente en PHP 5. Pero he hecho los cambios y no funciona.
Espero que me puedan ayudar con este problema.
Gracias.
__________________
Todos somos iguales. NO! a la violencia de género.
  #8 (permalink)  
Antiguo 29/10/2012, 10:57
Avatar de cuasatar  
Fecha de Ingreso: junio-2011
Ubicación: Bogotá Rock City
Mensajes: 1.230
Antigüedad: 12 años, 10 meses
Puntos: 181
Respuesta: Tener solamente código php 5

¿Nos toca ir a descargar un archivo en Sky Drive para poder mirarlo y colaborar? creo que es mas facil que nos muestres directamente lo que has hecho para verificarlo.

Igual me parece que no tienes muy claro que significa un constructor. Pegale una ojeada al manual y si tienes alguna duda concreta con codigo ya nos comentas.

http://php.net/manual/es/language.oop5.decon.php
__________________
Blog de humor http://elcuasatar.net63.net/

Última edición por cuasatar; 29/10/2012 a las 11:21
  #9 (permalink)  
Antiguo 30/10/2012, 08:52
Avatar de bandolera  
Fecha de Ingreso: abril-2009
Mensajes: 613
Antigüedad: 15 años
Puntos: 7
De acuerdo Respuesta: Tener solamente código php 5

Cita:
Iniciado por cuasatar Ver Mensaje
¿Nos toca ir a descargar un archivo en Sky Drive para poder mirarlo y colaborar? creo que es mas facil que nos muestres directamente lo que has hecho para verificarlo.

Igual me parece que no tienes muy claro que significa un constructor. Pegale una ojeada al manual y si tienes alguna duda concreta con codigo ya nos comentas.

http://php.net/manual/es/language.oop5.decon.php
Creo que leeré lo que me han indicado. Cierro el tema y abriré otro para depurar mi pequeño código.
Regresaré.
__________________
Todos somos iguales. NO! a la violencia de género.
  #10 (permalink)  
Antiguo 03/11/2012, 09:53
Avatar de bandolera  
Fecha de Ingreso: abril-2009
Mensajes: 613
Antigüedad: 15 años
Puntos: 7
Respuesta: Tener solamente código php 5

Cita:
Iniciado por cuasatar Ver Mensaje
¿Nos toca ir a descargar un archivo en Sky Drive para poder mirarlo y colaborar? creo que es mas facil que nos muestres directamente lo que has hecho para verificarlo.

Igual me parece que no tienes muy claro que significa un constructor. Pegale una ojeada al manual y si tienes alguna duda concreta con codigo ya nos comentas.

http://php.net/manual/es/language.oop5.decon.php
Una consulta rapidita: Se supone que cuando se programa en PHP 5.x (yo aprendí con php 4.x) no se debe utilizar mayusculas en ningún sitio? Ni en las variables...?
Pues me dicen que tal vez mi problema con el Smarty sea por eso... pero no encuentro nada parecido en la documentación.
__________________
Todos somos iguales. NO! a la violencia de género.
  #11 (permalink)  
Antiguo 03/11/2012, 10:09
Avatar de portalmana  
Fecha de Ingreso: septiembre-2007
Ubicación: Montevideo-Uruguay
Mensajes: 633
Antigüedad: 16 años, 6 meses
Puntos: 80
Respuesta: Tener solamente código php 5

Esta es una clase de Zend FramwWork
Código PHP:
Ver original
  1. <?php
  2. /**
  3.  * Zend Framework (http://framework.zend.com/)
  4.  *
  5.  * @link      http://github.com/zendframework/zf2 for the canonical source repository
  6.  * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  7.  * @license   http://framework.zend.com/license/new-bsd New BSD License
  8.  * @package   Zend_View
  9.  */
  10.  
  11. namespace Zend\View;
  12.  
  13. use Zend\EventManager\EventManager;
  14. use Zend\EventManager\EventManagerAwareInterface;
  15. use Zend\EventManager\EventManagerInterface;
  16. use Zend\Stdlib\RequestInterface as Request;
  17. use Zend\Stdlib\ResponseInterface as Response;
  18. use Zend\View\Model\ModelInterface as Model;
  19. use Zend\View\Renderer\RendererInterface as Renderer;
  20. use Zend\View\Renderer\TreeRendererInterface;
  21.  
  22. /**
  23.  * @category   Zend
  24.  * @package    Zend_View
  25.  */
  26. class View implements EventManagerAwareInterface
  27. {
  28.     /**
  29.      * @var EventManagerInterface
  30.      */
  31.     protected $events;
  32.  
  33.     /**
  34.      * @var Request
  35.      */
  36.     protected $request;
  37.  
  38.     /**
  39.      * @var Response
  40.      */
  41.     protected $response;
  42.  
  43.     /**
  44.      * Set MVC request object
  45.      *
  46.      * @param  Request $request
  47.      * @return View
  48.      */
  49.     public function setRequest(Request $request)
  50.     {
  51.         $this->request = $request;
  52.         return $this;
  53.     }
  54.  
  55.     /**
  56.      * Set MVC response object
  57.      *
  58.      * @param  Response $response
  59.      * @return View
  60.      */
  61.     public function setResponse(Response $response)
  62.     {
  63.         $this->response = $response;
  64.         return $this;
  65.     }
  66.  
  67.     /**
  68.      * Get MVC request object
  69.      *
  70.      * @return null|Request
  71.      */
  72.     public function getRequest()
  73.     {
  74.         return $this->request;
  75.     }
  76.  
  77.     /**
  78.      * Get MVC response object
  79.      *
  80.      * @return null|Response
  81.      */
  82.     public function getResponse()
  83.     {
  84.         return $this->response;
  85.     }
  86.  
  87.     /**
  88.      * Set the event manager instance
  89.      *
  90.      * @param  EventManagerInterface $events
  91.      * @return View
  92.      */
  93.     public function setEventManager(EventManagerInterface $events)
  94.     {
  95.         $events->setIdentifiers(array(
  96.             __CLASS__,
  97.             get_called_class(),
  98.         ));
  99.         $this->events = $events;
  100.         return $this;
  101.     }
  102.  
  103.     /**
  104.      * Retrieve the event manager instance
  105.      *
  106.      * Lazy-loads a default instance if none available
  107.      *
  108.      * @return EventManagerInterface
  109.      */
  110.     public function getEventManager()
  111.     {
  112.         if (!$this->events instanceof EventManagerInterface) {
  113.             $this->setEventManager(new EventManager());
  114.         }
  115.         return $this->events;
  116.     }
  117.  
  118.     /**
  119.      * Add a rendering strategy
  120.      *
  121.      * Expects a callable. Strategies should accept a ViewEvent object, and should
  122.      * return a Renderer instance if the strategy is selected.
  123.      *
  124.      * Internally, the callable provided will be subscribed to the "renderer"
  125.      * event, at the priority specified.
  126.      *
  127.      * @param  callable $callable
  128.      * @param  int $priority
  129.      * @return View
  130.      */
  131.     public function addRenderingStrategy($callable, $priority = 1)
  132.     {
  133.         $this->getEventManager()->attach(ViewEvent::EVENT_RENDERER, $callable, $priority);
  134.         return $this;
  135.     }
  136.  
  137.     /**
  138.      * Add a response strategy
  139.      *
  140.      * Expects a callable. Strategies should accept a ViewEvent object. The return
  141.      * value will be ignored.
  142.      *
  143.      * Typical usages for a response strategy are to populate the Response object.
  144.      *
  145.      * Internally, the callable provided will be subscribed to the "response"
  146.      * event, at the priority specified.
  147.      *
  148.      * @param  callable $callable
  149.      * @param  int $priority
  150.      * @return View
  151.      */
  152.     public function addResponseStrategy($callable, $priority = 1)
  153.     {
  154.         $this->getEventManager()->attach(ViewEvent::EVENT_RESPONSE, $callable, $priority);
  155.         return $this;
  156.     }
  157.  
  158.     /**
  159.      * Render the provided model.
  160.      *
  161.      * Internally, the following workflow is used:
  162.      *
  163.      * - Trigger the "renderer" event to select a renderer.
  164.      * - Call the selected renderer with the provided Model
  165.      * - Trigger the "response" event
  166.      *
  167.      * @triggers renderer(ViewEvent)
  168.      * @triggers response(ViewEvent)
  169.      * @param  Model $model
  170.      * @throws Exception\RuntimeException
  171.      * @return void
  172.      */
  173.     public function render(Model $model)
  174.     {
  175.         $event   = $this->getEvent();
  176.         $event->setModel($model);
  177.         $events  = $this->getEventManager();
  178.         $results = $events->trigger(ViewEvent::EVENT_RENDERER, $event, function($result) {
  179.             return ($result instanceof Renderer);
  180.         });
  181.         $renderer = $results->last();
  182.         if (!$renderer instanceof Renderer) {
  183.             throw new Exception\RuntimeException(sprintf(
  184.                 '%s: no renderer selected!',
  185.                 __METHOD__
  186.             ));
  187.         }
  188.  
  189.         // If we have children, render them first, but only if:
  190.         // a) the renderer does not implement TreeRendererInterface, or
  191.         // b) it does, but canRenderTrees() returns false
  192.         if ($model->hasChildren()
  193.             && (!$renderer instanceof TreeRendererInterface
  194.                 || !$renderer->canRenderTrees())
  195.         ) {
  196.             $this->renderChildren($model);
  197.         }
  198.  
  199.         // Reset the model, in case it has changed, and set the renderer
  200.         $event->setModel($model);
  201.         $event->setRenderer($renderer);
  202.  
  203.         $rendered = $renderer->render($model);
  204.  
  205.         // If this is a child model, return the rendered content; do not
  206.         // invoke the response strategy.
  207.         $options = $model->getOptions();
  208.         if (array_key_exists('has_parent', $options) && $options['has_parent']) {
  209.             return $rendered;
  210.         }
  211.  
  212.         $event->setResult($rendered);
  213.  
  214.         $events->trigger(ViewEvent::EVENT_RESPONSE, $event);
  215.     }
  216.  
  217.     /**
  218.      * Loop through children, rendering each
  219.      *
  220.      * @param  Model $model
  221.      * @throws Exception\DomainException
  222.      * @return void
  223.      */
  224.     protected function renderChildren(Model $model)
  225.     {
  226.         foreach ($model as $child) {
  227.             if ($child->terminate()) {
  228.                 throw new Exception\DomainException('Inconsistent state; child view model is marked as terminal');
  229.             }
  230.             $child->setOption('has_parent', true);
  231.             $result  = $this->render($child);
  232.             $child->setOption('has_parent', null);
  233.             $capture = $child->captureTo();
  234.             if (!empty($capture)) {
  235.                 if ($child->isAppend()) {
  236.                     $oldResult=$model->{$capture};
  237.                     $model->setVariable($capture, $oldResult . $result);
  238.                 } else {
  239.                     $model->setVariable($capture, $result);
  240.                 }
  241.             }
  242.         }
  243.     }
  244.  
  245.     /**
  246.      * Create and return ViewEvent used by render()
  247.      *
  248.      * @return ViewEvent
  249.      */
  250.     protected function getEvent()
  251.     {
  252.         $event = new ViewEvent();
  253.         $event->setTarget($this);
  254.         if (null !== ($request = $this->getRequest())) {
  255.             $event->setRequest($request);
  256.         }
  257.         if (null !== ($response = $this->getResponse())) {
  258.             $event->setResponse($response);
  259.         }
  260.         return $event;
  261.     }
  262. }

Estandard de Codificacion

Como puedes ver se usan mayusculas. Tanto en nombre de archivos, clases y variables.

Saludos
__________________
"La imaginación es más importante que el conocimiento. El conocimiento es limitado, mientras que la imaginación no" -- A.Einstein
objetivophp.com,twitter.com/objetivophp
  #12 (permalink)  
Antiguo 14/11/2012, 08:15
Avatar de bandolera  
Fecha de Ingreso: abril-2009
Mensajes: 613
Antigüedad: 15 años
Puntos: 7
Respuesta: Tener solamente código php 5

Cita:
Iniciado por portalmana Ver Mensaje
Esta es una clase de Zend FramwWork
Código PHP:
Ver original
  1. <?php
  2. /**
  3.  * Zend Framework (http://framework.zend.com/)
  4.  *
  5.  * @link      http://github.com/zendframework/zf2 for the canonical source repository
  6.  * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  7.  * @license   http://framework.zend.com/license/new-bsd New BSD License
  8.  * @package   Zend_View
  9.  */
  10.  
  11. namespace Zend\View;
  12.  
  13. use Zend\EventManager\EventManager;
  14. use Zend\EventManager\EventManagerAwareInterface;
  15. use Zend\EventManager\EventManagerInterface;
  16. use Zend\Stdlib\RequestInterface as Request;
  17. use Zend\Stdlib\ResponseInterface as Response;
  18. use Zend\View\Model\ModelInterface as Model;
  19. use Zend\View\Renderer\RendererInterface as Renderer;
  20. use Zend\View\Renderer\TreeRendererInterface;
  21.  
  22. /**
  23.  * @category   Zend
  24.  * @package    Zend_View
  25.  */
  26. class View implements EventManagerAwareInterface
  27. {
  28.     /**
  29.      * @var EventManagerInterface
  30.      */
  31.     protected $events;
  32.  
  33.     /**
  34.      * @var Request
  35.      */
  36.     protected $request;
  37.  
  38.     /**
  39.      * @var Response
  40.      */
  41.     protected $response;
  42.  
  43.     /**
  44.      * Set MVC request object
  45.      *
  46.      * @param  Request $request
  47.      * @return View
  48.      */
  49.     public function setRequest(Request $request)
  50.     {
  51.         $this->request = $request;
  52.         return $this;
  53.     }
  54.  
  55.     /**
  56.      * Set MVC response object
  57.      *
  58.      * @param  Response $response
  59.      * @return View
  60.      */
  61.     public function setResponse(Response $response)
  62.     {
  63.         $this->response = $response;
  64.         return $this;
  65.     }
  66.  
  67.     /**
  68.      * Get MVC request object
  69.      *
  70.      * @return null|Request
  71.      */
  72.     public function getRequest()
  73.     {
  74.         return $this->request;
  75.     }
  76.  
  77.     /**
  78.      * Get MVC response object
  79.      *
  80.      * @return null|Response
  81.      */
  82.     public function getResponse()
  83.     {
  84.         return $this->response;
  85.     }
  86.  
  87.     /**
  88.      * Set the event manager instance
  89.      *
  90.      * @param  EventManagerInterface $events
  91.      * @return View
  92.      */
  93.     public function setEventManager(EventManagerInterface $events)
  94.     {
  95.         $events->setIdentifiers(array(
  96.             __CLASS__,
  97.             get_called_class(),
  98.         ));
  99.         $this->events = $events;
  100.         return $this;
  101.     }
  102.  
  103.     /**
  104.      * Retrieve the event manager instance
  105.      *
  106.      * Lazy-loads a default instance if none available
  107.      *
  108.      * @return EventManagerInterface
  109.      */
  110.     public function getEventManager()
  111.     {
  112.         if (!$this->events instanceof EventManagerInterface) {
  113.             $this->setEventManager(new EventManager());
  114.         }
  115.         return $this->events;
  116.     }
  117.  
  118.     /**
  119.      * Add a rendering strategy
  120.      *
  121.      * Expects a callable. Strategies should accept a ViewEvent object, and should
  122.      * return a Renderer instance if the strategy is selected.
  123.      *
  124.      * Internally, the callable provided will be subscribed to the "renderer"
  125.      * event, at the priority specified.
  126.      *
  127.      * @param  callable $callable
  128.      * @param  int $priority
  129.      * @return View
  130.      */
  131.     public function addRenderingStrategy($callable, $priority = 1)
  132.     {
  133.         $this->getEventManager()->attach(ViewEvent::EVENT_RENDERER, $callable, $priority);
  134.         return $this;
  135.     }
  136.  
  137.     /**
  138.      * Add a response strategy
  139.      *
  140.      * Expects a callable. Strategies should accept a ViewEvent object. The return
  141.      * value will be ignored.
  142.      *
  143.      * Typical usages for a response strategy are to populate the Response object.
  144.      *
  145.      * Internally, the callable provided will be subscribed to the "response"
  146.      * event, at the priority specified.
  147.      *
  148.      * @param  callable $callable
  149.      * @param  int $priority
  150.      * @return View
  151.      */
  152.     public function addResponseStrategy($callable, $priority = 1)
  153.     {
  154.         $this->getEventManager()->attach(ViewEvent::EVENT_RESPONSE, $callable, $priority);
  155.         return $this;
  156.     }
  157.  
  158.     /**
  159.      * Render the provided model.
  160.      *
  161.      * Internally, the following workflow is used:
  162.      *
  163.      * - Trigger the "renderer" event to select a renderer.
  164.      * - Call the selected renderer with the provided Model
  165.      * - Trigger the "response" event
  166.      *
  167.      * @triggers renderer(ViewEvent)
  168.      * @triggers response(ViewEvent)
  169.      * @param  Model $model
  170.      * @throws Exception\RuntimeException
  171.      * @return void
  172.      */
  173.     public function render(Model $model)
  174.     {
  175.         $event   = $this->getEvent();
  176.         $event->setModel($model);
  177.         $events  = $this->getEventManager();
  178.         $results = $events->trigger(ViewEvent::EVENT_RENDERER, $event, function($result) {
  179.             return ($result instanceof Renderer);
  180.         });
  181.         $renderer = $results->last();
  182.         if (!$renderer instanceof Renderer) {
  183.             throw new Exception\RuntimeException(sprintf(
  184.                 '%s: no renderer selected!',
  185.                 __METHOD__
  186.             ));
  187.         }
  188.  
  189.         // If we have children, render them first, but only if:
  190.         // a) the renderer does not implement TreeRendererInterface, or
  191.         // b) it does, but canRenderTrees() returns false
  192.         if ($model->hasChildren()
  193.             && (!$renderer instanceof TreeRendererInterface
  194.                 || !$renderer->canRenderTrees())
  195.         ) {
  196.             $this->renderChildren($model);
  197.         }
  198.  
  199.         // Reset the model, in case it has changed, and set the renderer
  200.         $event->setModel($model);
  201.         $event->setRenderer($renderer);
  202.  
  203.         $rendered = $renderer->render($model);
  204.  
  205.         // If this is a child model, return the rendered content; do not
  206.         // invoke the response strategy.
  207.         $options = $model->getOptions();
  208.         if (array_key_exists('has_parent', $options) && $options['has_parent']) {
  209.             return $rendered;
  210.         }
  211.  
  212.         $event->setResult($rendered);
  213.  
  214.         $events->trigger(ViewEvent::EVENT_RESPONSE, $event);
  215.     }
  216.  
  217.     /**
  218.      * Loop through children, rendering each
  219.      *
  220.      * @param  Model $model
  221.      * @throws Exception\DomainException
  222.      * @return void
  223.      */
  224.     protected function renderChildren(Model $model)
  225.     {
  226.         foreach ($model as $child) {
  227.             if ($child->terminate()) {
  228.                 throw new Exception\DomainException('Inconsistent state; child view model is marked as terminal');
  229.             }
  230.             $child->setOption('has_parent', true);
  231.             $result  = $this->render($child);
  232.             $child->setOption('has_parent', null);
  233.             $capture = $child->captureTo();
  234.             if (!empty($capture)) {
  235.                 if ($child->isAppend()) {
  236.                     $oldResult=$model->{$capture};
  237.                     $model->setVariable($capture, $oldResult . $result);
  238.                 } else {
  239.                     $model->setVariable($capture, $result);
  240.                 }
  241.             }
  242.         }
  243.     }
  244.  
  245.     /**
  246.      * Create and return ViewEvent used by render()
  247.      *
  248.      * @return ViewEvent
  249.      */
  250.     protected function getEvent()
  251.     {
  252.         $event = new ViewEvent();
  253.         $event->setTarget($this);
  254.         if (null !== ($request = $this->getRequest())) {
  255.             $event->setRequest($request);
  256.         }
  257.         if (null !== ($response = $this->getResponse())) {
  258.             $event->setResponse($response);
  259.         }
  260.         return $event;
  261.     }
  262. }

Estandard de Codificacion

Como puedes ver se usan mayusculas. Tanto en nombre de archivos, clases y variables.

Saludos
Tengo un sistema que trabaja con MVC utilizando clases DAO y VO. Eso me tiene algo confundida.
Seguiré buscando y leyendo para exponer mejor mi problema.
__________________
Todos somos iguales. NO! a la violencia de género.

Etiquetas: solamente, tener
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 01:56.