
Originally Posted by
XtrEM3
zend studio for eclipse? that program is AMAZING. it's packed full of features and blazing fast, at least from my experience.
.
no im stuck with old one for while

Originally Posted by
XtrEM3
again...i have never had a single problem with zend studio not autocompleting my registry's.
not trying to turn this into an IDE war, but i find it strange that you're complaining about a lack of features that i'm pretty sure zend has. are you using an older version? i know the version pre-eclipse wasn't near as good...
I havent tested a php IDE that does a good job at autocomplete anything 2-3 levels deep (something like visual studio intellisense would be perfecte)
such as $this->Registry->bLAH->bLEH
and yes i tried early versions of zend studio 6 eclipse (but its sooooo slow on large projects), unless they added it since
php developer comes close but it just puts every combination into the autocomplete which is annoying, but anyways thats going off on a tangent
back to this thread
I didn't think so because the Session was dependent on the Database, not the other way around.
yes its same here, to scale across few servers the session are stored in memory table in DB, i use several filters (defined in each action as action properties and executed by the main controller before the action itself is run) so a database connection filter runs first before session filter
i should have pasted more of the action controller code earlier, would have been clearer (i have to be careful due to non disclosure agreement)
PHP Code:
<?php
class _default extends Blocks_Action {
private $Registry; public function __construct( Blocks_Registry $Registry ){ $this->Registry = $Registry; }
//action filters, executed in this order, otherwise you might endup with exeption, Session dependant on DB, ACL dependant on Session and so on
public $filters = array(
'HttpResponse' => array(),
'Locale' => array(),
'Theme' => array(),
'DB' => array(),
'Session' => array(),
'CommonView' => array(),
'Acl' => array('admin'),
);
/**
* action execution starts here
* @throws Exception
*/
public function main(){
//create item object
$Item = new Item(
new ItemDatabase( $this->Registry->DB ),
$this->Registry->Settings->items
);
//fetch the hotlist
try {
$hotlist = $Item->fetchHotlist( $this->Registry->Session->getUserId() );
}
catch ( ItemException $e){
throw new Exception( $e->getMessage(), 500 );
}
//fetch the asset summary
try {
$register_summary = $Item->fetchSummary( );
}
catch ( ItemException $e){
throw new Exception( $e->getMessage(), 500 );
}
//create a view
try{
$View = new View(
$this->Registry,
'normal',
'default__admin',
array(
'default',
'item'
)
);
$View->setParams( $this->Registry->CommonView );
$output = $View->render(array(
'hotlist' => $hotlist,
'register_summary' => $register_summary,
));
}
catch( Exception $e ){
throw new Exception( $e->getMessage() );
}
//output
$this->Registry->HttpResponse->appendNoCacheHeaders();
$this->Registry->HttpResponse->appendHeader('Content-Type: text/html; charset=utf-8');
$this->Registry->HttpResponse->setMessage( $output );
$this->Registry->HttpResponse->output();
}
}
?>
Bookmarks