Skip to content

Instantly share code, notes, and snippets.

@nclundsten
nclundsten / f14post
Created February 18, 2011 02:11
f14 post install goodies
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
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();
}
<?php
namespace SpeckAddress\Form;
use Zend\Form\Form;
class Address extends Form
{
public function __construct()
{
{
"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"
}
],
(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 March 27, 2013 07:06
example for: service manager key: 'shared'
<?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');
<?php
namespace Market\Factory;
use Market\Controller\PostController;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
class PostControllerFactory implements FactoryInterface
{
array(1) {
'routes' =>
array(19) {
'home' =>
array(2) {
'type' =>
string(28) "Zend\Mvc\Router\Http\Literal"
'options' =>
array(2) {
'route' =>
array(1) {
'routes' =>
array(19) {
'home' =>
array(2) {
'type' =>
string(28) "Zend\Mvc\Router\Http\Literal"
'options' =>
array(2) {
'route' =>
<?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';