original_string: public function set_identifiers(array $identifiers = array()) {
          if ($this->identifiers !== null) {
              throw new coding_exception("You can only set identifiers on initial definition creation." .
                  " Define a new cache to set different identifiers.");
          }
          if (!empty($identifiers) && !empty($this->invalidationevents)) {
              throw new coding_exception("You cannot use event invalidation and identifiers at the same time.");
          }
  
          foreach ($this->requireidentifiers as $identifier) {
              if (!isset($identifiers[$identifier])) {
                  throw new coding_exception('Identifier required for cache has not been provided: '.$identifier);
              }
          }
  
          $this->identifiers = array();
  
          foreach ($identifiers as $name => $value) {
              $this->identifiers[$name] = (string)$value;
          }
          // Reset the key prefix's they need updating now.
          $this->keyprefixsingle = null;
          $this->keyprefixmulti = null;
  
          return true;
      }
code: public function set_identifiers(array $identifiers = array()) {
          if ($this->identifiers !== null) {
              throw new coding_exception("You can only set identifiers on initial definition creation." .
                  " Define a new cache to set different identifiers.");
          }
          if (!empty($identifiers) && !empty($this->invalidationevents)) {
              throw new coding_exception("You cannot use event invalidation and identifiers at the same time.");
          }
  
          foreach ($this->requireidentifiers as $identifier) {
              if (!isset($identifiers[$identifier])) {
                  throw new coding_exception('Identifier required for cache has not been provided: '.$identifier);
              }
          }
  
          $this->identifiers = array();
  
          foreach ($identifiers as $name => $value) {
              $this->identifiers[$name] = (string)$value;
          }
          // Reset the key prefix's they need updating now.
          $this->keyprefixsingle = null;
          $this->keyprefixmulti = null;
  
          return true;
      }
code_tokens: public function set_identifiers ( array $ identifiers = array ( ) ) { if ( $ this -> identifiers !== null ) { throw new coding_exception ( "You can only set identifiers on initial definition creation." . " Define a new cache to set different identifiers." ) ; } if ( ! empty ( $ identifiers ) && ! empty ( $ this -> invalidationevents ) ) { throw new coding_exception ( "You cannot use event invalidation and identifiers at the same time." ) ; } foreach ( $ this -> requireidentifiers as $ identifier ) { if ( ! isset ( $ identifiers [ $ identifier ] ) ) { throw new coding_exception ( 'Identifier required for cache has not been provided: ' . $ identifier ) ; } } $ this -> identifiers = array ( ) ; foreach ( $ identifiers as $ name => $ value ) { $ this -> identifiers [ $ name ] = ( string ) $ value ; } // Reset the key prefix's they need updating now. $ this -> keyprefixsingle = null ; $ this -> keyprefixmulti = null ; return true ; }
docstring: Sets the identifiers for this definition, or updates them if they have already been set.
  
  @param array $identifiers
  @return bool false if no identifiers where changed, true otherwise.
  @throws coding_exception
docstring_tokens: Sets the identifiers for this definition or updates them if they have already been set .