toxygene / rend Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/rend
License: Other
Automatically exported from code.google.com/p/rend
License: Other
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_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
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
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
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:
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
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
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
What steps will reproduce the problem?
1. Create an action.
2. Add an isAllowed rule to the action with only a resource.
3. Dispatch to the action.
What is the expected output? What do you see instead?
An error will be thrown displaying only the first letter of the resources name.
Original issue reported on code.google.com by [email protected]
on 5 Feb 2009 at 3:28
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
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
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
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
When the session times out, the Acl (now IsAllowed) helper throws an
exception which is not handled by the ErrorController.
Original issue reported on code.google.com by [email protected]
on 6 May 2008 at 10:16
Make it so you can define
{{{
public $layouts = array(
'*' => array('layout', 'default')
);
}}}
Original issue reported on code.google.com by [email protected]
on 9 Jul 2008 at 3:36
[deleted issue]
/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
The IsAllowed and LayoutSelector action helper need to support both direct
rule setup as well as the property short hand notation. See ContextSwitcher
for example.
Original issue reported on code.google.com by [email protected]
on 29 Oct 2008 at 4:33
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
<?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
The Zend folder is missing from the /libraries folder.
Original issue reported on code.google.com by [email protected]
on 21 Jul 2008 at 4:19
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
/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
<?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
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
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 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
Rend_Controller_Action_Helper_IsAllowed
Lines 113 and 114
_getAcl() and _getRole methods are not defined in class
Suggested replacement:
return $this->_acl->isAllowed($this->_role, $resource, $permission);
Original issue reported on code.google.com by [email protected]
on 1 Dec 2008 at 4:47
The Truncate view helper is not multibyte safe.
See the Zend_Validate_StringLength for recommended implementation.
Original issue reported on code.google.com by [email protected]
on 5 Feb 2009 at 8:48
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.