public function referenceSleep($reference) {
    if (count($reference) !== 3
        || $reference[0] !== 'nymph_entity_reference'
        || !is_int($reference[1])
        || !is_string($reference[2])) {
      throw new Exceptions\InvalidParametersException(
          'referenceSleep expects parameter 1 to be a valid Nymph entity '.
          'reference.'
      );
    }
    $thisClass = get_class($this);
    if ($reference[2] !== $thisClass) {
      throw new Exceptions\InvalidParametersException(
          "referenceSleep can only be called with an entity reference of the ".
          "same class. Given class: {$reference[2]}; this class: $thisClass."
      );
    }
    $this->isASleepingReference = true;
    $this->guid = $reference[1];
    $this->sleepingReference = $reference;
  }
public function referenceSleep($reference) {
    if (count($reference) !== 3
        || $reference[0] !== 'nymph_entity_reference'
        || !is_int($reference[1])
        || !is_string($reference[2])) {
      throw new Exceptions\InvalidParametersException(
          'referenceSleep expects parameter 1 to be a valid Nymph entity '.
          'reference.'
      );
    }
    $thisClass = get_class($this);
    if ($reference[2] !== $thisClass) {
      throw new Exceptions\InvalidParametersException(
          "referenceSleep can only be called with an entity reference of the ".
          "same class. Given class: {$reference[2]}; this class: $thisClass."
      );
    }
    $this->isASleepingReference = true;
    $this->guid = $reference[1];
    $this->sleepingReference = $reference;
  }
public function referenceSleep ( $ reference ) { if ( count ( $ reference ) !== 3 || $ reference [ 0 ] !== 'nymph_entity_reference' || ! is_int ( $ reference [ 1 ] ) || ! is_string ( $ reference [ 2 ] ) ) { throw new Exceptions \ InvalidParametersException ( 'referenceSleep expects parameter 1 to be a valid Nymph entity ' . 'reference.' ) ; } $ thisClass = get_class ( $ this ) ; if ( $ reference [ 2 ] !== $ thisClass ) { throw new Exceptions \ InvalidParametersException ( "referenceSleep can only be called with an entity reference of the " . "same class. Given class: {$reference[2]}; this class: $thisClass." ) ; } $ this -> isASleepingReference = true ; $ this -> guid = $ reference [ 1 ] ; $ this -> sleepingReference = $ reference ; }
Set up a sleeping reference.
@param array $reference The reference to use to wake.
Set up a sleeping reference .