src/Command/Command.php
public function getBinary(): string
    {
        if (is_null($this->bin)) {
            $paths = array('/usr/bin/assimp', '/usr/local/bin/assimp', '~/bin/assimp');
            foreach ($paths as $path) {
                try {
                    $this->setBinary($path);
                } catch (\InvalidArgumentException $e) {}
            }

            if (!$this->bin) {
                throw new \RuntimeException('assimp-binary not found in '.explode(', ', $paths), ErrorCodes::FILE_NOT_FOUND);
            }

            if (!is_executable($this->bin)) {
                throw new \RuntimeException('Found a binary file, but it is not executable: '.$this->bin, ErrorCodes::FILE_NOT_EXECUTABLE);
            }
        }
        return $this->bin;
    }
public function getBinary(): string
    {
        if (is_null($this->bin)) {
            $paths = array('/usr/bin/assimp', '/usr/local/bin/assimp', '~/bin/assimp');
            foreach ($paths as $path) {
                try {
                    $this->setBinary($path);
                } catch (\InvalidArgumentException $e) {}
            }

            if (!$this->bin) {
                throw new \RuntimeException('assimp-binary not found in '.explode(', ', $paths), ErrorCodes::FILE_NOT_FOUND);
            }

            if (!is_executable($this->bin)) {
                throw new \RuntimeException('Found a binary file, but it is not executable: '.$this->bin, ErrorCodes::FILE_NOT_EXECUTABLE);
            }
        }
        return $this->bin;
    }
public function getBinary ( ) : string { if ( is_null ( $ this -> bin ) ) { $ paths = array ( '/usr/bin/assimp' , '/usr/local/bin/assimp' , '~/bin/assimp' ) ; foreach ( $ paths as $ path ) { try { $ this -> setBinary ( $ path ) ; } catch ( \ InvalidArgumentException $ e ) { } } if ( ! $ this -> bin ) { throw new \ RuntimeException ( 'assimp-binary not found in ' . explode ( ', ' , $ paths ) , ErrorCodes :: FILE_NOT_FOUND ) ; } if ( ! is_executable ( $ this -> bin ) ) { throw new \ RuntimeException ( 'Found a binary file, but it is not executable: ' . $ this -> bin , ErrorCodes :: FILE_NOT_EXECUTABLE ) ; } } return $ this -> bin ; }
Get the path to the assimp binary

@return string
@throws \RuntimeException
Get the path to the assimp binary