This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Proof of concept | |
class Oakland_Application extends Zend_Application | |
{ | |
protected function _loadConfig($file) | |
{ | |
$environment = $this->getEnvironment(); | |
if ($environment == 'development') { | |
return parent::_loadConfig($file); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Prpl_Controller_Action_Helper_Url extends Zend_Controller_Action_Helper_Url | |
{ | |
public function url($urlOptions = array(), $name = null, $reset = false, $encode = true) | |
{ | |
if (!isset($urlOptions['locale'])) { | |
$urlOptions['locale'] = Zend_Registry::get('Zend_Translate')->getLocale(); | |
} | |
return parent::url($urlOptions, $name, $reset, $encode); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This file was used to filter out tons of unwanted crap from WordPressMu's | |
// export XML file. Certainly not glamourous, but it worked flawlessly trimming | |
// out all of our company pages and spam comments, leaving just our blog. | |
// This made our migration from WordPress to Drupal substantially easier. | |
// | |
// http://purplerockscissors.com | |
// | |
$inFile = dirname(__FILE__) . '/main.wordpress.xml'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Prpl_View_Helper_Zebra extends Zend_View_Helper_Abstract | |
{ | |
/** | |
* Internal tracker; static to allow tracking in partial loops, etc | |
* | |
* @var integer | |
*/ | |
private static $_count = 0; | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$partial = array('_navigation.phtml', 'default'); | |
$this->view->navigation()->menu()->setPartial($partial); | |
return $this->view->navigation() | |
->menu() | |
->render($pages); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Bootstrap.php | |
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap | |
{ | |
// ... | |
protected function _initDefaultModuleAutoloader() | |
{ | |
$autoloader = new Zend_Application_Module_Autoloader(array( | |
'namespace' => 'Default', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// application/Bootstrap.php | |
// note: If you want to have the module autoloader running on the default module, you'll need to add this to your application bootstrap. Boo... | |
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap | |
{ | |
protected function _initDefaultModuleAutoloader() | |
{ | |
$autoloader = new Zend_Application_Module_Autoloader(array( | |
'namespace' => 'Default', | |
'basePath' => APPLICATION_PATH . '/modules/default/', | |
)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<injector> | |
<classes> | |
<class> | |
<type>applicationModel</type> | |
<namespace>name.space</namespace> | |
<className>Name_Model_Space</className> | |
</class> | |
</classes> | |
<types> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<container> | |
<class name="user" class="User" /> | |
<class name="user.profile" class="Users_Model_Profile" /> | |
<class name="user.friend" class="\Users\Model\Friend" /> | |
</container> | |
<container> | |
<class id="user" class="User"> | |
<construct> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ZF Multisite Project Tool | |
# | |
# A change up on | |
application/ | |
+ apis/ | |
+ configs/ | |
| ` modules/ | |
+ modules/ # Used for new MVC features | |
| + community/ |
OlderNewer