<commit_before><?php
class Vps_Asset
{
    private $_icon;
    private $_type;
    public function __construct($icon, $type = null)
    {
        if (!$type) {
            $paths = Zend_Registry::get('config')->path;
            if (file_exists($paths->vps.'/images/'.$icon.'.png')) {
                $filename = $paths->vps.'/images/'.$icon.'.png';
                $type = 'vps/images';
                $icon .= '.png';
            } else if (file_exists($paths->vps.'/images/'.$icon.'.gif')) {
                $filename = $paths->vps.'/images/'.$icon.'.gif';
                $type = 'vps/images';
                $icon .= '.gif';
            } else if (file_exists($paths->vps.'/images/'.$icon.'.jpg')) {
                $filename = $paths->vps.'/images/'.$icon.'.jpg';
                $type = 'vps/images';
                $icon .= '.jpg';
            } else if (file_exists($paths->silkicons.'/'.$icon)) {
                $filename = $paths->silkicons.'/'.$icon;
                $type = 'silkicons';
            } else if (file_exists($paths->silkicons.'/'.$icon.'.png')) {
                $filename = $paths->silkicons.'/'.$icon.'.png';
                $type = 'silkicons';
                $icon .= '.png';
            } else if (file_exists($paths->vps.'/images/fileicons/'.$icon.'.png')) {
                $filename = $paths->vps.'/images/fileicons/'.$icon.'.png';
                $type = 'vps/images/fileicons';
                $icon .= '.png';
            } else if (file_exists($paths->vps.'/images/fileicons/'.$icon.'.jpg')) {
                $filename = $paths->vps.'/images/fileicons/'.$icon.'.jpg';
                $type = 'vps/images/fileicons';
                $icon .= '.jpg';
            } else {
                throw new Vps_Exception("Asset '$icon' not found");
            }
        }
        $this->_type = $type;
        $this->_icon = $icon;
    }
    
    public function getFilename()
    {
        $paths = Zend_Registry::get('config')->path;
        return $paths->{$this->_type}.'/'.$this->_icon;
    }

    public function __toString()
    {
        return '/assets/'.$this->_type.'/'.$this->_icon;<commit_msg>Assets können jetzt auch vom Web kommen<commit_after><?php
class Vps_Asset
{
    private $_icon;
    private $_type;
    public function __construct($icon, $type = null)
    {
        if (!$type) {
            $paths = Zend_Registry::get('config')->path;
            if (file_exists($paths->vps.'/images/'.$icon.'.png')) {
                $filename = $paths->vps.'/images/'.$icon.'.png';
                $type = 'vps/images';
                $icon .= '.png';
            } else if (file_exists($paths->vps.'/images/'.$icon.'.gif')) {
                $filename = $paths->vps.'/images/'.$icon.'.gif';
                $type = 'vps/images';
                $icon .= '.gif';
            } else if (file_exists($paths->vps.'/images/'.$icon.'.jpg')) {
                $filename = $paths->vps.'/images/'.$icon.'.jpg';
                $type = 'vps/images';
                $icon .= '.jpg';
            } else if (file_exists($paths->silkicons.'/'.$icon)) {
                $filename = $paths->silkicons.'/'.$icon;
                $type = 'silkicons';
            } else if (file_exists($paths->silkicons.'/'.$icon.'.png')) {
                $filename = $paths->silkicons.'/'.$icon.'.png';
                $type = 'silkicons';
                $icon .= '.png';
            } else if (file_exists($paths->vps.'/images/fileicons/'.$icon.'.png')) {
                $filename = $paths->vps.'/images/fileicons/'.$icon.'.png';
                $type = 'vps/images/fileicons';
                $icon .= '.png';
            } else if (file_exists($paths->vps.'/images/fileicons/'.$icon.'.jpg')) {
                $filename = $paths->vps.'/images/fileicons/'.$icon.'.jpg';
                $type = 'vps/images/fileicons';
                $icon .= '.jpg';
            } else if (file_exists($paths->web.'/images/icons/'.$icon)) {
                $filename = $paths->web.'/images/icons/'.$icon;
                $type = 'web/images/icons/';
            } else if (file_exists($paths->web.'/images/icons/'.$icon.'.png')) {
                $filename = $paths->web.'/images/icons/'.$icon;
                $type = 'web/images/icons/';
                $icon .= '.png';
            } else {
                throw new Vps_Exception("Asset '$icon' not found");
            }
        }
        $this->_type = $type;
        $this->_icon = $icon;
    }

    public function getFilename()
    {
        $paths = Zend_Registry::get('config')->path;
        return $paths->{$this->_type}.'/'.$this->_icon;
    }

    public function __toString()
    {
        return '/assets/'.$this->_type.'/'.$this->_icon;
{'fraction_non_alphanumeric': 0.20743099787685776, 'fraction_numerical': 0.0, 'mean_word_length': 1.5631120783460284, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7077469', 'n_tokens_mistral': 1455, 'n_tokens_neox': 1441, 'n_words': 219}