Package.php

<?php

namespace Liaison\Test\Mock;


class Package implements \LiaisonInterface\LifeCycler {

    public $lia;
    public $dir = null;
    protected $compos = [];

    public function __construct($liaison){
        $this->lia = $liaison;
    }

    public function dir($subdir){
        return null;
    }

    public function addComponent($name, $component){
        $this->compos[$name] = $component;
    }
    public function onPreStart(){}
    public function onStart(){
        foreach ($this->compos as $compo){
            $compo->onStart();
        }
    }
}