Quantcast
Channel: Franz's Web Blog
Browsing latest articles
Browse All 26 View Live
↧

ZF2 Presentation

https://docs.google.com/presentation/d/1tO9e3QxZ4KXy580sR71dxh_p0CDlMnWWkOgJ-C6L3fA/edit?usp=sharing

View Article


Repost: Object Tiered Architecture

http://www.codeproject.com/Articles/7766/Introduction-to-Object-Oriented-Tiered-Application

View Article


Repost: Composer Branch Aliasing Explained

https://igor.io/2013/01/07/composer-versioning.html

View Article

NOTE: tar compress and extract

Just a simple reminder for linux tar commands for compressing and extracting:Exctract:tar -xvzf ./myfilename.tar.gz myfilenameCompress:tar -cvzf ./myfilename.tar.gz myfilename

View Article

My take on Mocks VS Stubs

I sometimes get confused on the difference between a mock and a stub. Actually I still get confused from time to time but I'll spit out my thoughts right now.Example:class Math{ public function...

View Article


REPOST: Show and Compare Committed Files Using LOG and DIFF in Subversion

Show commited files for revision 63.Syntax: svn log --verbose -r <rev>Example: svn log --verbose -r 63Show difference by comparing actual files. For example, show line by line difference between...

View Article

REPOST: Setting up PHP to connect to a MS SQL Server using PDO_ODBC in Ubuntu

For those who are not familiar of ODBC like I was, its basically an API that lets you connect to other databases. PDO has its ODBC driver which in turn ODBC has its own also. To connect to MS SQL...

View Article

ZF2's MVC Event Trigger Sequence

Below is the trigger sequence of Zend Frameworks 2's MVC Event. 1.) MvcEvent::EVENT_BOOTSTRAP    returns: Zend\Mvc\Application    a.) MvcEvent::EVENT_ROUTE        Returns: Zend\Mvc\Application    b.)...

View Article


Routing URI With Forward Appended Slashes in ZF2

You may sometimes want to route forward appended URIs to its last corresponding action.For example:http://www.sample.com/mycontroller/login/ (WILL NOT route to login...

View Article


TIP: How to Retrieve and Register Custom Controller Plugins

You can think of controller plugins as action helpers in ZF1.In order to retrieve the list of plugins including custom plugins you created.Create a custom plugin: //module.phpclass Module{ public...

View Article

TIP: How to Immitate init() inside Controllers in ZF2

For ZF1 users there is the convenient init() method that you can use on every controller but in ZF2 the init() does not exist anymore for design purposes.There are sometimes advantages though of having...

View Article

How Does a ServiceManager Plugin gets Initialized?

Hopefully this post will explain and answer this question.For this example, I will trace the initialization of the FilterManager Plugin.For those who are not familiar with the plugin functionality of...

View Article

How to Create a Custom ZF2 ServiceManager Plugin?

If you want to discover how a ServiceManager Plugin gets initialized go here:http://www.franzdeleon.me/2013/09/how-does-servicemanager-plugin-get.htmlSo how do we register our own custom ServiceManager...

View Article


How to Pass the ServiceManager to Forms and Taking Advantage of the init()

Seems pretty easy and its also documented in the ZF2 docs but I think its worth repeating here.In short, when creating forms by extending the Form object it is a good practice to create your elements...

View Article

How to delete missing files and add new files in Subversion

Add:svn add * --force Delete:svn st | grep ^! | awk '{print " --force "$2}' | xargs svn rmReference:http://stackoverflow.com/questions/9600382/svn-command-to-delete-all-locally-missing-files

View Article


How to use ZF2's Service Manager Factories with Constructor Based Objects...

Say you have a manufacturer that produces books and you have multiple new instances of books with different title being manufactured. How would you do this via the Service Manager?Your book factory...

View Article

Automagic Mod_Vhost_Alias for Vagrant precise PHP

Just sharing my Apache vhost to enable automatic virtual hosting for my development environment.This will enable anything you put to '/vagrant/www/*' a vhost with a public directory. Useful if you are...

View Article


How to use ZF2's Curl Http Adapter with Header information

Just sharing some of my painful WTF experiences using ZF2's Curl Http client adapter so you wont have to deal with my headaches.Basically I am trying to send a CURL_HTTPHEADER with these params.This is...

View Article

Tip: How to Add Timestamp With CURRENT_DATETIME in Doctrine 2 ORM

Assuming that your database profiler is Mysql: /** * @ORM\Column(type="datetime", nullable=false) * @ORM\Version * @var string */ protected $creationTimestamp;The above declaration should produce:...

View Article

Composer Update/Install

Dont install require-dev packages (--no-dev), prefer the distribution packages (--prefer-dist), maximum verbosity (-vvv), show profiles such as memory usage and time (--profile) php composer.phar...

View Article

install fastcgi

sudo apt-get update && sudo apt-get install libapache2-mod-fastcgi sudo a2enmod fastcgi

View Article


How to Fix SSHFS Mounts Not Writable by PHP

Problem:When accessing a php file in the browser that uses is_writable(), is_dir(),... etc of a mounted directory through sshfs, PHP sometimes cannot detect the mounted directory so the functions above...

View Article


Access SSL Enabled URL via Curl

Sometimes you may have problems accessing URL that are SSL enabled. The solution is to simply set the flags below: $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch,...

View Article

Notes In Resolving Conflict on GIT Rebase

So after doing git rebase master from a featured branch or some other branch you get a conflict.Here are some notes on resolving.After getting the conflict, you will be redirected to temporary branch...

View Article

Escaping Zend_Form Error Element Labels in ZF1

Problem:You have a form element label with extra characters (e.g. *, ", :, etc...) and you want to escape or remove it in the generated error message.Example Zend Form Element:$firstName = new...

View Article

Browsing latest articles
Browse All 26 View Live