private function setImage()
    {
        $slug = $this->complement['slug'];

        $complementType = self::getType('strtoupper');
        $complementPath = App::$complementType();
        $complementUrl = $complementType . '_URL';
        $complementUrl = App::$complementUrl();

        $file = 'public/images/' . $slug . '.png';
        $filepath = $complementPath . $slug . '/' . $file;

        $url = 'https://raw.githubusercontent.com/Eliasis-Framework/Complement/';

        $directory = $complementUrl . $slug . '/' . $file;

        $repository = rtrim($this->complement['url-import'], '/') . "/$file";

        $default = $url . 'master/src/static/images/default.png';

        if (File::exists($filepath)) {
            $this->complement['image'] = $directory;
        } elseif (File::exists($repository)) {
            $this->complement['image'] = $repository;
        } else {
            $this->complement['image'] = $default;
        }
    }
private function setImage()
    {
        $slug = $this->complement['slug'];

        $complementType = self::getType('strtoupper');
        $complementPath = App::$complementType();
        $complementUrl = $complementType . '_URL';
        $complementUrl = App::$complementUrl();

        $file = 'public/images/' . $slug . '.png';
        $filepath = $complementPath . $slug . '/' . $file;

        $url = 'https://raw.githubusercontent.com/Eliasis-Framework/Complement/';

        $directory = $complementUrl . $slug . '/' . $file;

        $repository = rtrim($this->complement['url-import'], '/') . "/$file";

        $default = $url . 'master/src/static/images/default.png';

        if (File::exists($filepath)) {
            $this->complement['image'] = $directory;
        } elseif (File::exists($repository)) {
            $this->complement['image'] = $repository;
        } else {
            $this->complement['image'] = $default;
        }
    }
private function setImage ( ) { $ slug = $ this -> complement [ 'slug' ] ; $ complementType = self :: getType ( 'strtoupper' ) ; $ complementPath = App :: $ complementType ( ) ; $ complementUrl = $ complementType . '_URL' ; $ complementUrl = App :: $ complementUrl ( ) ; $ file = 'public/images/' . $ slug . '.png' ; $ filepath = $ complementPath . $ slug . '/' . $ file ; $ url = 'https://raw.githubusercontent.com/Eliasis-Framework/Complement/' ; $ directory = $ complementUrl . $ slug . '/' . $ file ; $ repository = rtrim ( $ this -> complement [ 'url-import' ] , '/' ) . "/$file" ; $ default = $ url . 'master/src/static/images/default.png' ; if ( File :: exists ( $ filepath ) ) { $ this -> complement [ 'image' ] = $ directory ; } elseif ( File :: exists ( $ repository ) ) { $ this -> complement [ 'image' ] = $ repository ; } else { $ this -> complement [ 'image' ] = $ default ; } }
Set image url.

@uses \Eliasis\Framework\App::COMPLEMENT()
@uses \Eliasis\Framework\App::COMPLEMENT_URL()
@uses \Eliasis\Complement\Complement->$complement
@uses \Eliasis\Complement\Traits\ComplementHandler::getType()
Set image url .