original_string: public function setBreadcrumbs($breadcrumbs)
      {
          if (!is_array($breadcrumbs)) {
              throw new \InvalidArgumentException(
                  'Breadcrumbs::setBreadcrumbs() only accepts arrays, but '
                  . (is_object($breadcrumbs) ? get_class($breadcrumbs) : gettype($breadcrumbs))
                  . ' given: ' . print_r($breadcrumbs, true)
              );
          }
  
          foreach ($breadcrumbs as $key => $breadcrumb) {
              if (!static::isValidCrumb($breadcrumb)) {
                  throw new \InvalidArgumentException(
                      'Breadcrumbs::setBreadcrumbs() only accepts correctly formatted arrays, but at least one of the '
                      . 'values was misformed: $breadcrumbs[' . $key . '] = ' . print_r($breadcrumb, true)
                  );
              } else {
                  $this->addCrumb(
                      $breadcrumb['name'] ?: '',
                      $breadcrumb['href'] ?: '',
                      isset($breadcrumb['hrefIsFullUrl']) ? (bool) $breadcrumb['hrefIsFullUrl'] : false
                  );
              }
          }
  
          return $this;
      }
code: public function setBreadcrumbs($breadcrumbs)
      {
          if (!is_array($breadcrumbs)) {
              throw new \InvalidArgumentException(
                  'Breadcrumbs::setBreadcrumbs() only accepts arrays, but '
                  . (is_object($breadcrumbs) ? get_class($breadcrumbs) : gettype($breadcrumbs))
                  . ' given: ' . print_r($breadcrumbs, true)
              );
          }
  
          foreach ($breadcrumbs as $key => $breadcrumb) {
              if (!static::isValidCrumb($breadcrumb)) {
                  throw new \InvalidArgumentException(
                      'Breadcrumbs::setBreadcrumbs() only accepts correctly formatted arrays, but at least one of the '
                      . 'values was misformed: $breadcrumbs[' . $key . '] = ' . print_r($breadcrumb, true)
                  );
              } else {
                  $this->addCrumb(
                      $breadcrumb['name'] ?: '',
                      $breadcrumb['href'] ?: '',
                      isset($breadcrumb['hrefIsFullUrl']) ? (bool) $breadcrumb['hrefIsFullUrl'] : false
                  );
              }
          }
  
          return $this;
      }
code_tokens: public function setBreadcrumbs ( $ breadcrumbs ) { if ( ! is_array ( $ breadcrumbs ) ) { throw new \ InvalidArgumentException ( 'Breadcrumbs::setBreadcrumbs() only accepts arrays, but ' . ( is_object ( $ breadcrumbs ) ? get_class ( $ breadcrumbs ) : gettype ( $ breadcrumbs ) ) . ' given: ' . print_r ( $ breadcrumbs , true ) ) ; } foreach ( $ breadcrumbs as $ key => $ breadcrumb ) { if ( ! static :: isValidCrumb ( $ breadcrumb ) ) { throw new \ InvalidArgumentException ( 'Breadcrumbs::setBreadcrumbs() only accepts correctly formatted arrays, but at least one of the ' . 'values was misformed: $breadcrumbs[' . $ key . '] = ' . print_r ( $ breadcrumb , true ) ) ; } else { $ this -> addCrumb ( $ breadcrumb [ 'name' ] ? : '' , $ breadcrumb [ 'href' ] ? : '' , isset ( $ breadcrumb [ 'hrefIsFullUrl' ] ) ? ( bool ) $ breadcrumb [ 'hrefIsFullUrl' ] : false ) ; } } return $ this ; }
docstring: Sets all the breadcrumbs. Useful for quickly configuring the instance.
  
  @param array $breadcrumbs
  @return $this
docstring_tokens: Sets all the breadcrumbs . Useful for quickly configuring the instance .