For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
// This list of common devices was put together from various online sources by me, Jan Keromnes. | |
// | |
// The device features are: | |
// - name: The device brand and model(s). | |
// - width: The viewport width. | |
// - height: The viewport height. | |
// - pixelRatio: The screen's pixel ratio (e.g. HiDPI > 1). | |
// - userAgent: The device's UserAgent string on the web. | |
// - touch: Whether the device's screen is touch-enabled. | |
// |
When working with Git, there are two prevailing workflows are Git workflow and feature branches. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited, and the focus of this article.
If you are new to Git and Git-workflows, I suggest reading the atlassian.com Git Workflow article in addition to this as there is more detail there than presented here.
I admit, using Bash in the command line with the standard configuration leaves a bit to be desired when it comes to awareness of state. A tool that I suggest using follows these instructions on setting up GIT Bash autocompletion. This tool will assist you to better visualize the state of a branc
<?php | |
/** | |
* @author Marco Pivetta <[email protected]> | |
*/ | |
class LazyLoadableObject | |
{ | |
public $publicIdentifierField; | |
protected $protectedIdentifierField; |
<?php | |
use Doctrine\ORM\Mapping as ORM; | |
use Doctrine\Common\Collections\ArrayCollection; | |
/** | |
* @ORM\Entity() | |
* @ORM\Table(name="user") | |
*/ | |
class User |
The following tasks need to be done to finish the i18n component: | |
------------------------------------------------------------------------------ | |
To finish translator: | |
- Add Xliff translation loader with plural support if possible, see: | |
https://wiki.oasis-open.org/xliff/XLIFF2.0/Feature/Plural%20Entries | |
- Add Tmx translation loader (identify if plural support is available) | |
- Complete unit tests | |
------------------------------------------------------------------------------ |
// zend framework è in /var/www/lib/Zend mentre il file che contiene l'autoloader è nella root | |
<?php | |
// Setting include_path to add library to included dirs | |
set_include_path(realpath(__DIR__ . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR .'Zend'.DIRECTORY_SEPARATOR. 'library') . PATH_SEPARATOR . get_include_path()); | |
// Initializing autoloader | |
require_once 'Zend/Loader/Autoloader.php'; | |
Zend_Loader_Autoloader::getInstance(); | |
$dbh = new PDO('pgsql:user=garbezzano password=*a571992g* host=127.0.0.1 dbname=dbstrumenti'); | |
?> |
<?php | |
namespace Application\Dic; | |
use Zend\Di\Di; | |
class Compiled extends Di | |
{ | |
public function newInstance($name, array $params = array(), $isShared = true) |
<?php | |
return array ( | |
'Zend\\EventManager\\EventManager' => | |
array ( | |
'instantiator' => | |
array ( | |
'name' => NULL, | |
'parameters' => | |
array ( | |
0 => |
<?php | |
use Zend\EventManager\StaticEventManager; | |
use Zend\Mvc\MvcEvent; | |
use Locale; | |
$events = StaticEventManager::getInstance(); | |
$events->attach('Zend\Mvc\Application', 'route', function(MvcEvent $event){ | |
$request = $event->getRequest(); | |
$uri = $request->uri(); | |
$baseUrlLength = strlen($request->getBaseUrl() ?: ''); |