original_string: public function addAssetLibrary($library_id, array $options = array())
      {
          $added = array();
  
          foreach ($this->library->getFiles($library_id) as $file) {
  
              $extension = pathinfo($file, PATHINFO_EXTENSION);
  
              if ($extension === 'js') {
                  $result = $this->setJs($file, $options);
              } else if ($extension === 'css') {
                  $result = $this->setCss($file, $options);
              }
  
              if (!empty($result)) {
                  $added[] = $file;
              }
          }
  
          return $added;
      }
code: public function addAssetLibrary($library_id, array $options = array())
      {
          $added = array();
  
          foreach ($this->library->getFiles($library_id) as $file) {
  
              $extension = pathinfo($file, PATHINFO_EXTENSION);
  
              if ($extension === 'js') {
                  $result = $this->setJs($file, $options);
              } else if ($extension === 'css') {
                  $result = $this->setCss($file, $options);
              }
  
              if (!empty($result)) {
                  $added[] = $file;
              }
          }
  
          return $added;
      }
code_tokens: public function addAssetLibrary ( $ library_id , array $ options = array ( ) ) { $ added = array ( ) ; foreach ( $ this -> library -> getFiles ( $ library_id ) as $ file ) { $ extension = pathinfo ( $ file , PATHINFO_EXTENSION ) ; if ( $ extension === 'js' ) { $ result = $ this -> setJs ( $ file , $ options ) ; } else if ( $ extension === 'css' ) { $ result = $ this -> setCss ( $ file , $ options ) ; } if ( ! empty ( $ result ) ) { $ added [ ] = $ file ; } } return $ added ; }
docstring: Adds single or multiple asset libraries
  @param string|array $library_id
  @param array $options
  @return array
docstring_tokens: Adds single or multiple asset libraries