<?php
namespace Liaison\Test\Mock;
class Package {
public $lia;
public $dir = null;
protected $compos = [];
protected $name;
public function __construct($liaison){
$this->lia = $liaison;
$this->name = uniqid();
}
public function name(){
return $this->name;
}
public function dir($subdir){
return null;
}
public function addComponent($name, $component){
$this->compos[$name] = $component;
}
public function onPackageReady(){
foreach ($this->compos as $compo){
$compo->onPackageReady();
}
}
public function scanForPrefixesInCompos(){
foreach ($this->compos as $compo){
$compo->autoHandlePrefixedMethods();
}
}
}