Git Product home page Git Product logo

rend's Introduction

Rend serves as a base Zend Framework installation, complete with a
bootstrap, config file, unit testing and the default modular MVC folder
layout.

To begin using it, you'll need to make copies of the -dist files.
 * /application/configs/config.ini
 * /public/.htaccess

Make sure you set the REND_MODE in the .htaccess file to 'development' if
you are doing development. This will enable error output to the screen.

rend's People

Watchers

 avatar

rend's Issues

LayoutSelector postDispatch not working

Rend_Controller_Action_Helper_LayoutSelector

postDispatch() method did not work properly since the $parameter variable
is erroneously being accessed as a character array by PHP.

Currently it is:
$actionController->$parameter[$actionName]

And should be
$layoutSettings = $actionController->$parameter;
$layoutSettings[$actionName]

Full code:
if (isset($actionController->$parameter)) {

    $layoutSettings = $actionController->$parameter;

    if (isset($layoutSettings[$actionName])) {
        $this->_setLayoutScript($layoutSettings[$actionName]);
    } elseif (isset($layoutSettings[self::WILDCARD])) {
        $this->_setLayoutScript($layoutSettings[self::WILDCARD]);
    }
}

Original issue reported on code.google.com by [email protected] on 21 Nov 2008 at 10:08

Online PhpDocument parsed version

Feature request.

Seeing all the trouble you have gone through to document the code inline -
it would be convenient to see a phpdocumentor version ready at some
website. As of now I have made it on my own. Nice asset to have, none the less.

Original issue reported on code.google.com by [email protected] on 9 Jun 2008 at 8:21

DBTable AuthAdapter spelling error

Rend_Factory_AuthAdapter_DbTable

line: 68
public function setCredentialColunn($credentialColumn)

Should be:
public function setCredentialColumn($credentialColumn)

(column spelled wrong)

Original issue reported on code.google.com by [email protected] on 1 Dec 2008 at 8:33

No default support for the FlashMessenger helper

Not 100% sure if this is inside the scope of Rend... but suggested default:

In Rend_Controller_Action's preDispatch method:
$this->view->flashMessenger = $this->_helper->FlashMessenger;

In the initial layout.phtml include:
    <?php
        if ($this->flashMessenger->hasMessages()) {
            print '<div class="flashMessenger-messages"><ul>';
            foreach ($this->flashMessenger->getMessages() as $message) {
                print '<li>'.$this->escape($message).'</li>';
            }   
            print '</ul></div>';
        }   
    ?>

And because the FlashMessenger doesn't currently support the translator, it
will need to be overridden to include this functionality:
Refer to the attached example file
Project_Controller_Action_Helper_FlashMessenger.

Original issue reported on code.google.com by [email protected] on 10 Jun 2008 at 10:15

Attachments:

LayoutSelector and switching modules

If a controller has a file and path for an action, then you forward to a
new controller which only specifies a file, the path from the old action is
used, causing errors.

Original issue reported on code.google.com by [email protected] on 21 Jul 2008 at 3:34

SslSelector and _foward() conflict

1. Create oneAction() and twoAction().
2. Make oneAction() forward to twoAction().
3. Enable SslSelector on twoAction().
4. Call oneAction().

This should cause the forwarded page to be loaded in https, but instead,
the calling action is loaded in https.

The reason is because _getUrl($url) uses $request->getRequestUri(). Since a
_forward() does not change this, the original page is reloaded in https
instead.

Original issue reported on code.google.com by [email protected] on 2 Jun 2008 at 10:34

LayoutSelector missing getLayout() method

What steps will reproduce the problem?
1. add Rend_Controller_Action_Helper_LayoutSelector as a helper
2. when postDispatch of this class is called, it tries calling
$this->getLayout() which doesn't exist

Need to add:
    /**
     * Get the layout object
     *
     * @return Zend_Layout
     */
    public function getLayout()
    {
        if (!$this->_layout) {
            $this->_layout =
$this->_getActionHelper('layout')->getLayoutInstance();
        }
        return $this->_layout;
    }

Was this removed for a reason?

Original issue reported on code.google.com by [email protected] on 21 Nov 2008 at 8:14

Write some documentation

Points:
1) People like things that are easy to use.
2) Rend is suppose to be easy to use.
3) Documentation makes things easier to use.

Conclusion: I should write some documentation so people will enjoy using
Rend more.

Original issue reported on code.google.com by [email protected] on 11 Jun 2008 at 12:53

Improve direct() methods throught helpers

Many of the action helpers in Rend simply return an object through
direct(), despite many better things that could be done.

For example, Rend_Controller_Action_Helper_Translator::direct() simply
returns the Zend_Translate object, but it would make a lot more sense to
call translate() on the object with a supplied key instead.

Based on http://code.google.com/p/rend/issues/detail?id=5

Original issue reported on code.google.com by [email protected] on 12 Jun 2008 at 2:19

Adding Strategy pattern to Log Helper

Don't know if this is the correct place to put such a feature request, but
here goes.

Adding the use of the strategy pattern to Rend_Controller_Action_Helper_Log
could increase productivity. Thereby making calls such as
$this->_helper->Log('Simple log statement'); possible. Where this shorthand
would map to something along the lines of $this->_helper->Log->info('Simple
log statement');

It is an approach inspired by Zend_Controller_Action_Helper_FlashMessenger.

Furthermore the call to the direct method within
Rend_Controller_Action_Helper_Log could be passed a second argument stating
the log priority.

A simple example of such a rewrite to the helper:
    public function direct($msg = null)
    {
        $log = $this->getLog();
        if (null !== $msg) {
            $log->info($msg);
        }
        return $log;
    }

Original issue reported on code.google.com by [email protected] on 9 Jun 2008 at 7:52

Factories, helpers and loaders

There's lots of coupling between the helpers and object loading, which has
caused the Zend_Controller_Action_HelperBroker to become coupled to just
about everything due to it's convenience.

I think it would be a good idea to remove this coupling by moving the
construction of objects into a new, pluggable interface, called
Rend_Factory. Each class would have a subclass, like
Rend_Factory_AuthAdapter, and would be accessed through a
Zend_Loader_PluginLoader.

This would give a number of benefits.
# The Rend action helpers would be more about doing something instead of
building something.
# The coupling would be shifted from Zend_Controller_Action_HelperBroker to
Rend_Factories.
# User-land plugins could be added through the plugin loader.

Original issue reported on code.google.com by [email protected] on 27 Jun 2008 at 4:42

LoadModel not instantiating model properly

/Rend/Controller/Action/Helper/LoadModel.php line 75

Reads:
return $name(array(

Needs to Read:
return new $name(array(

Getting error:
Fatal error: Call to undefined function Users() in
/home/kness/public_html/BravoRend/library/Rend/Controller/Action/Helper/LoadMode
l.php
on line 75

Original issue reported on code.google.com by [email protected] on 22 Nov 2008 at 12:06

Unable to set mail transport host

Rend_Factory_MailTransport_Smtp

The mail transport host value cannot be set by the factoryloader because
this class overrides the setOptions() method of
Rend_FactoryLoader_Factory_Abstract, thus making it impossible for a "host"
option to call setHost in this class.

Recommend changing to setParameters() to match functionality of
Rend_Factory_MailTransport_Sendmail

Original issue reported on code.google.com by [email protected] on 3 Dec 2008 at 4:59

Need Log Action Helper

<?php
/**
 *
 */

/** Rend_Controller_Action_Helper_Abstract */
require_once 'Zend/Controller/Action/Helper/Abstract.php';

/**
 *
 */
class Rend_Controller_Action_Helper_Log extends
Zend_Controller_Action_Helper_Abstract
{

    /**
     * Log object
     * @var     Zend_Log
     */
    private $_log;

    /**
     * Get the log object
     *
     * @return  Zend_Log
     */
    public function direct()
    {
        return $this->getLog();
    }

    /**
     * Get the log object
     *
     * @return  Zend_Log
     */
    public function getLog()
    {
        if (!$this->_log) {
            try{
                $this->_log =
$this->getActionController()->getInvokeArg('rendFactoryLoader')->log();
            }catch(Rend_FactoryLoader_Exception $e){
                // log not setup
                $this->_log = new Zend_Log();
                $this->_log->addWriter(new Zend_Log_Writer_Null());
            }
        }
        return $this->_log;
    }

}

Original issue reported on code.google.com by [email protected] on 1 Dec 2008 at 10:22

Feature Request: Additional options for Mail factory

Rend_Factory_Mail allows for setting charset and headers from factory
config, but Zend_Mail does not allow headers to be set directly for
standard mail headers, such as 'to', 'cc', 'bcc', 'from', 'subject',
'return-path', 'date'.

Would like to be able to set some or all of these from the factory.

Original issue reported on code.google.com by [email protected] on 3 Dec 2008 at 4:14

Error instantiating Factory with no options from FactoryLoader

/Rend/FactoryLoader.php ln:175

Allows instantiating the factory with no parameters if no options exist in
config, although the Rend_FactoryLoader_Factory_Abstract constructor does
not have a default value set.

Need to add default value to Rend_FactoryLoader_Factory_Abstract
constructor's $config parameter.

Original issue reported on code.google.com by [email protected] on 23 Nov 2008 at 4:19

Suggestion for MailTransport Action Helper

<?php
/**
 *
 */

/** Rend_Controller_Action_Helper_Abstract */
require_once 'Zend/Controller/Action/Helper/Abstract.php';

/**
 *
 */
class Rend_Controller_Action_Helper_MailTransport extends
Zend_Controller_Action_Helper_Abstract
{

    /**
     * Mail Transport object
     * @var     Zend_Mail_Transport_Abstract
     */
    private $_mailTransport;

    /**
     * Get the mail transport object
     *
     * @return  Zend_Mail_Transport_Abstract
     */
    public function direct()
    {
        return $this->getMailTransport();
    }

    /**
     * Get the mail transport object
     *
     * @return  Zend_Mail_Transport_Abstract
     */
    public function getMailTransport()
    {
        if (!$this->_mailTransport) {
            $this->_mailTransport =
$this->getActionController()->getInvokeArg('rendFactoryLoader')->mailtransport()
;
        }
        return $this->_mailTransport;
    }

}

Original issue reported on code.google.com by [email protected] on 3 Dec 2008 at 5:12

Dispatcher dependencies in Model and new Form action helpers

The updates to the model action helper and the new form action helper both
have code that tries to figure out directories for other modules.
Currently, this code is not very forgiving if you are not using Rend's
directory structure and the determination of paths is dependent on
Zend_Controller_Dispatcher_Standard. As a result, modifying the directory
structure will probably break these helpers and using a custom dispatcher
will probably do the same.

Rend should probably have an abstract dispatcher that implements the
additional methods and make it the minimum requirement in the front controller.

Original issue reported on code.google.com by [email protected] on 23 Jun 2008 at 3:55

Typos in IsAllowed Action Helper

Rend_Controller_Action_Helper_IsAllowed

lines 190 to 193:
setControllerName(), setModuleName(), and setParams() needs to be changed
to getters

line 194:
$this->getRole() change to $this->_role

line 199:
$this->getRole() change to $this->_role

Original issue reported on code.google.com by [email protected] on 1 Dec 2008 at 9:29

Changing the locale does not affect the translator

Changing the locale in the locale action helper has no affect on the locale
stored in the translation object in the view.

{{{
Zend_Controller_Action_HelperBroker::getStaticHelper('locale')
                                   ->direct()
                                   ->setLanguage('en')
                                   ->setLocale('US');

$view = Zend_Controller_Action_HelperBroker::getStaticHelper('view')
                                           ->direct();

Zend_Controller_Action_HelperBroker::getStaticHelper('locale')
                                   ->direct()
                                   ->setLanguage('fr')
                                   ->setLocale('FR');

echo $view->getHelper('translate')->getLocale(); // en_US
}}}

Original issue reported on code.google.com by [email protected] on 23 May 2008 at 3:59

Improper Class Names for default RowClass and RowsetClasses on Project_Db_Table

What steps will reproduce the problem?
1. Create a model class that extends Project_Db_Table
2. Do not override the $_rowClass and $_rowsetClass properties

Problem:
Receive the exception:
File "Project/Db/Row.php" does not exist or class "Project_Db_Row" was not
found in the file

Solution:
Need to change the Project_Db_Table class to be as below:

abstract class Project_Db_Table extends Zend_Db_Table_Abstract
{

    /**
     * Row class name
     * @var     string
     */
    protected $_rowClass = 'Project_Db_Table_Row';

    /**
     * Rowset class name
     * @var     string
     */
    protected $_rowsetClass = 'Project_Db_Table_Rowset';

}

Original issue reported on code.google.com by [email protected] on 6 Jun 2008 at 2:34

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.