public function add($parameter, array $array)
    {

        if (!isset($this->$parameter)) {
            throw new \Exception("Supplied variable doesn't exist");
        }
        $array[$this->callingClassWithoutNamespace()] = $this;
        $up = ucfirst($parameter);
        $object = (dirname(get_class()) . "\\" . $up);
        $object = new $object();
        if (!$object instanceof ArraySerialize) {
            throw new \Exception("Object supplied not serialisable");
        }
        /** @var $object ToArray */
        $object->fromArray($array, $object);
        unset($array[$this->callingClassWithoutNamespace()]);
        $this->$parameter->add($object);
    }