abt / common
ZF2 Common elements
Installs: 89
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 9
Forks: 5
pkg:composer/abt/common
Requires
- php: >=5.4
- aws/aws-sdk-php: 2.7.2
- doctrine/common: >=2.4
- doctrine/orm: >=2.4
- zendframework/zend-servicemanager: >=2.2.7
Requires (Dev)
- phpunit/phpunit: ~3.7
- squizlabs/php_codesniffer: 1.5.*
- zendframework/zendframework: >=2.2.7
This package is not auto-updated.
Last update: 2025-10-25 21:53:57 UTC
README
Services
- FzyCommon\Service\EntityToForm: accepts doctrine entity and returns a ZF2 form class (\Zend\Form\Form) bound to the entity and hydrated with its information.
- FzyCommon\EntityToForm: alias for- FzyCommon\Service\EntityToForm
- FzyCommon\Service\Search\Result: accepts a result provider interface and formats the search result in a standard way
- FzyCommon\Search\Result: alias for- FzyCommon\Service\Search\Result
- FzyCommon\Service\Url: service to create URLs from ZF2 route names or from an AWS S3 key
- FzyCommon\Url: alias for- FzyCommon\Service\Url
- FzyCommon\Service\Render: service to render a View Model or string path to a view file into HTML
- FzyCommon\Render: alias for- FzyCommon\Service\Render
- FzyCommon\Config: returns the ZF2 application's configuration wrapped in a- \FzyCommon\Util\Paramscontainer.
- FzyCommon\ModuleConfig: returns config data specific to this module (- \FzyCommon\Service\Base::MODULE_CONFIG_KEY) wrapped in a- \FzyCommon\Util\Paramscontainer.
- FzyCommon\Service\Aws\Config: returns the- awskey from- FzyCommon\ModuleConfigwrapped in a- \FzyCommon\Util\Paramscontainer.
- FzyCommon\Service\Aws\S3\Config: returns the- s3key from- FzyCommon\Service\Aws\Configwrapped in a- \FzyCommon\Util\Paramscontainer.
- FzyCommon\Service\Aws\S3: returns configured- \Aws\S3\S3Clientobject (using- FzyCommon\Service\Aws\S3\Config)
- FzyCommon\Factory\DoctrineCache: returns configured- Doctrine\Common\Cacheclass based on environment.
View Helpers
- fzyFlashMessages: returns an array of arrays of messages in the flash messenger, indexed by their type. e.g.- [ "success": [ "Your settings have been saved" ], "warning": [], "danger": [], "info": [] ]
- fzyEntityToForm: provides shortcut to the- FzyCommon\Service\EntityToFormservice
- fzyNgInit: handles json encoding and escaping literals, objects and doctrine entities for injection into an angular scope.
- fzyRequest: accessor for the view to query the current request
Controller Plugins
- fzySearchResult: plugin to standardize the response format for a search.
- fzyUpdateResult: plugin to standardize the response format for an update.
- fzyEntityToForm: provides shortcut to the- FzyCommon\Service\EntityToFormservice
Controllers
Options
- debug: used as a flag to indicate this code should expose errors and exceptions for debugging.
- production: used as a flag to indicate this code is running in a production environment.
- doctrine_cache: the service key to be used for generating the doctrine cache object. (default:- FzyCommon\Factory\DoctrineCachewhich is a Redis service)
- doctrine_cache_config: configuration for setting up the doctrine_cache service. (default: the Redis connection credentials)
- aws: configuration for connecting to AWS services (should contain credentials indexed by service like:
"aws": [
  "s3": [
    "key": "your-aws-key",
    "secret": "your-aws-secret"
  ]
]