Thursday, March 27, 2014

Consuming SOAP services

Full web service description is at http://www.webservicex.net/ws/WSDetails.aspx?CATID=12&WSID=64
Yellow highlighted portion is SOAP Web Service URI
Green Highlighted portion is the method name.

Monday, March 24, 2014

Post installation tasks on CentOS regarding Apache web server

This is a short troubleshooting guide for system administrators. Almost all tasks described in this post should be done as root. You need to be familiar with basic Linux commands / editors such as cat, vi, chmod and chown.

Wednesday, March 19, 2014

Wednesday, March 12, 2014

Most Useful PHP Snippets

Dumping arrays or objects with HTML markup text as member. This prevents creating iFrame and similar tags in your debug output.

Monday, March 10, 2014

Git Workflow for Local and Remote Repository

Typical workflow for two developer that clone/fetch/push to a remote git repo. Each developer use one tracking branch. Once changes are pushed to remote repo we use rebase twice to merge the local branches into the master branch.

Tuesday, March 4, 2014

Git resolving conflict on remote machine

Git conflict resolution on remote server after two branches merging into master branch
Branches are master, armand and ralph.

Monday, March 3, 2014

OOP Basics

/**
 * Instances CANNOT use private and protected members
 * Children CAN inherit only public and protected members
 */
class MyClass
{
    public $name = 'John';
    protected $username = 'JohnT23';
    private $password = 'secret';

    function printAll()
    {
        echo "From class MyClass:";
        echo $this->name." ";
        echo $this->username." ";
        echo $this->password." ";
    }
}

$obj = new MyClass();
echo "From Instance \$obj:".$obj->name."\n"; //Works
//echo $obj->username; // Fatal Error
//echo $obj->password; // Fatal Error
$obj->printAll();

echo"\n<br>";

class MyClass2 extends MyClass
{
    // We can re-declare/access the public and protected method
    // but not private ones
    function printAll()
    {
        echo "From class MyClass2:";
        echo $this->name." ";
        echo $this->username." ";
        // Children cannot access private member of parent
        // echo $this->password; // Error
    }
}

$obj2 = new MyClass2();
echo "<br>
 From Instance \$obj2:".$obj2->name; // Works
//echo $obj->username; // Fatal Error
//echo $obj->password; // Fatal Error
$obj2->printAll();