<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
class office
{
    public function documentWrite()
    {
        echo "I am document writ" . "<br>";
        return $this;
    }
    public function ducomentRead()
    {
        echo "I am document read." . "<br>";
        return $this;
    }
    public function documentPrint()
    {
        echo 'I am document printing.' . "<br>";
        return $this;
    }
}
$word = new office();
$word->documentWrite()->ducomentRead()->documentPrint();