在对象上调用多个方法?

I tried calling multiple functions on a single object. But I think I failed the syntax. Could you correct me please?

    $objMetaDaten->setStrTitle('test')
        ->setStrBeschreibung('test')
        ->setStrUeberschrift('test')
        ->setStrCanonical('test')
        ->setStrRobots(MetaDaten::INDEX);

What you need is something called fluent setters which will return the object after calling a setter on the object as against the conventional void setters something like below

Class A{
   private $name;
   private $id;

   public function setName($name) {
        $this–>name = $name;
         return $this;
    } 

    public function getName() {
     return $this–>name;
     } 

     public function setId($id) {
        $this–>id = $id;
         return $this;
     } 

     public function getId() {
         return $this–>id;
     } 
} 

So you can then say

 $test = new A();

 $test->setId(1)->setName('Fredrick');

I think you are looking something like this, This is a very basic approach.

class Test{
    function test(){
        return 'Hi!';
    }
}

class Test2{
    function test_2(){
        return new Test();
    }
}

class Test3{
    function test_3(){
        return new Test2();
    }
}

$obj = new Test3();
echo $obj->test_3()->test_2()->test();

OR, you can do this in one class like-

class Test{
    private $num;
    function test(){
        return 'Hi! your number is: '.$this->num;
    }

    function test_2($mul){
        $this->num *= $mul;
        return $this;
    }

    function test_3($add){
        $this->num = $add;
        return $this;
    }
}

$obj = new Test();
echo $obj->test_3(50)->test_2(2)->test();