original_string: public static function factoryReference($reference) {
      $className = $reference[2];
      if (!class_exists($className)) {
        throw new Exceptions\EntityClassNotFoundException(
            "factoryReference called for a class that can't be found, $className."
        );
      }
      $entity = call_user_func([$className, 'factory']);
      $entity->referenceSleep($reference);
      return $entity;
    }
code: public static function factoryReference($reference) {
      $className = $reference[2];
      if (!class_exists($className)) {
        throw new Exceptions\EntityClassNotFoundException(
            "factoryReference called for a class that can't be found, $className."
        );
      }
      $entity = call_user_func([$className, 'factory']);
      $entity->referenceSleep($reference);
      return $entity;
    }
code_tokens: public static function factoryReference ( $ reference ) { $ className = $ reference [ 2 ] ; if ( ! class_exists ( $ className ) ) { throw new Exceptions \ EntityClassNotFoundException ( "factoryReference called for a class that can't be found, $className." ) ; } $ entity = call_user_func ( [ $ className , 'factory' ] ) ; $ entity -> referenceSleep ( $ reference ) ; return $ entity ; }
docstring: Create a new sleeping reference instance.
  
  Sleeping references won't retrieve their data from the database until it
  is actually used.
  
  @param array $reference The Nymph Entity Reference to use to wake.
  @return \Nymph\Entity The new instance.
docstring_tokens: Create a new sleeping reference instance .