protected function attachResourceToEnd(&$destination,$attachment)
    {
        for ($i=count($destination)-1;$i>-1;$i--) {
            if (is_array($destination[$i])) {
                if ($this->attachResourceToEnd($destination[$i], $attachment)) {
                    return true;
                }
            }
        }
        array_push($destination, $attachment);
        return true;
    }