Skip to content

Instantly share code, notes, and snippets.

Avatar

Nigel Lundsten nclundsten

View GitHub Profile
@nclundsten
nclundsten / f14post
Created Feb 18, 2011
f14 post install goodies
View f14post
su -c 'yum install yum-plugin-fastestmirror'
su -c 'echo "$USERNAME ALL=(ALL) ALL" >> /etc/sudoers'
echo rpm fusion
yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
echo ===========================================
echo few goodies
sudo yum install wget mplayer htop nano
View gist:3784933
public function indexAction()
{
$checkoutService = $this->getServiceLocator()->get('SpeckCheckout\Service\Checkout');
$options = $checkoutService->getOptions();
$paymentMethods = $options->getPaymentMethods();
$methodForm = new \Zend\Form\Form;
foreach ($paymentMethods as $i) {
$valueOptions[$i->getPaymentMethod()] = $i->getDisplayName();
}
View gist:5067757
<?php
namespace SpeckAddress\Form;
use Zend\Form\Form;
class Address extends Form
{
public function __construct()
{
View gist:5104477
{
"name": "speckcommerce",
"description": "Open Source E-Commerce Platform. PHP, Zend Framework 2, ZF2 Modules",
"minimum-stability": "dev",
"authors": [
{
"name": "SpeckCommerce Authors",
"email": "author@speckcommerce.org"
}
],
View gist:5104483
(nlundsten@localhost)$ ./composer.phar install
Loading composer repositories with package information
Installing dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: don't install speckcommerce/speck-catalog dev-master
- Conclusion: don't install speckcommerce/speck-address dev-master
- Conclusion: don't install zf-commons/zfc-base 0.1.0
- Conclusion: don't install zf-commons/zfc-base 0.1.0
@nclundsten
nclundsten / gist:5252337
Created Mar 27, 2013
example for: service manager key: 'shared'
View gist:5252337
<?php
return array(
'invokables' => array(
'my_uninitialized_mapper' => 'Module\Mapper\MyMapper',
),
'factories' => array(
'some_table_mapper' => function ($sm) {
$mapper = $sm->get('my_uninitialized_mapper');
$mapper->setTableName('some_table');
View gist:5252459
<?php
namespace Market\Factory;
use Market\Controller\PostController;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
class PostControllerFactory implements FactoryInterface
{
View gist:5358575
array(1) {
'routes' =>
array(19) {
'home' =>
array(2) {
'type' =>
string(28) "Zend\Mvc\Router\Http\Literal"
'options' =>
array(2) {
'route' =>
View gist:5358591
array(1) {
'routes' =>
array(19) {
'home' =>
array(2) {
'type' =>
string(28) "Zend\Mvc\Router\Http\Literal"
'options' =>
array(2) {
'route' =>
View gist:5408030
<?php
/**
* This makes our life easier when dealing with paths. Everything is relative
* to the application root now.
*/
chdir(dirname(__DIR__));
// Setup autoloading
include 'init_autoloader.php';