original_string: protected function _setDir($path) {
          if ($handle = opendir($path)) {
              while (false !== ($entry = readdir($handle))) {
                  $extension = explode('.', basename($entry));
                  $ext = $extension[count($extension) - 1];
  
                  if ($ext == $this->_type) {
                      $this->_setFile($path . $entry);
                  }
              }
  
              closedir($handle);
          }
      }
code: protected function _setDir($path) {
          if ($handle = opendir($path)) {
              while (false !== ($entry = readdir($handle))) {
                  $extension = explode('.', basename($entry));
                  $ext = $extension[count($extension) - 1];
  
                  if ($ext == $this->_type) {
                      $this->_setFile($path . $entry);
                  }
              }
  
              closedir($handle);
          }
      }
code_tokens: protected function _setDir ( $ path ) { if ( $ handle = opendir ( $ path ) ) { while ( false !== ( $ entry = readdir ( $ handle ) ) ) { $ extension = explode ( '.' , basename ( $ entry ) ) ; $ ext = $ extension [ count ( $ extension ) - 1 ] ; if ( $ ext == $ this -> _type ) { $ this -> _setFile ( $ path . $ entry ) ; } } closedir ( $ handle ) ; } }
docstring: configure a directory
  @access public
  @param $path string
  @return void
  @since 3.0
  @package Gcs\Framework\Core\Asset
docstring_tokens: configure a directory