original_string: public function clearCache($imagestyle_id = null)
      {
          $result = null;
          $this->hook->attach('image.style.clear.cache.before', $imagestyle_id, $result, $this);
  
          if (isset($result)) {
              return (bool) $result;
          }
  
          $result = gplcart_file_delete_recursive($this->getDirectory($imagestyle_id));
          $this->hook->attach('image.style.clear.cache.after', $imagestyle_id, $result, $this);
          return (bool) $result;
      }
code: public function clearCache($imagestyle_id = null)
      {
          $result = null;
          $this->hook->attach('image.style.clear.cache.before', $imagestyle_id, $result, $this);
  
          if (isset($result)) {
              return (bool) $result;
          }
  
          $result = gplcart_file_delete_recursive($this->getDirectory($imagestyle_id));
          $this->hook->attach('image.style.clear.cache.after', $imagestyle_id, $result, $this);
          return (bool) $result;
      }
code_tokens: public function clearCache ( $ imagestyle_id = null ) { $ result = null ; $ this -> hook -> attach ( 'image.style.clear.cache.before' , $ imagestyle_id , $ result , $ this ) ; if ( isset ( $ result ) ) { return ( bool ) $ result ; } $ result = gplcart_file_delete_recursive ( $ this -> getDirectory ( $ imagestyle_id ) ) ; $ this -> hook -> attach ( 'image.style.clear.cache.after' , $ imagestyle_id , $ result , $ this ) ; return ( bool ) $ result ; }
docstring: Removes cached files for all or a certain image style
  @param integer|null $imagestyle_id
  @return boolean
docstring_tokens: Removes cached files for all or a certain image style