Skip to content

Commit

Permalink
#208 - correcting "agent smith" example
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Jan 23, 2016
1 parent b45c38f commit 8716b55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/lazy-loading-ghost-object.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ $initializer = function (
$initializer = null; // disable initialization

// load data and modify the object here
$properties["\0ClassName\0foo"] = 'foo';
$properties["\0ClassName\0bar"] = 'bar';
$properties["\0MyApp\\Customer\0name"] = 'Agent';
$properties["\0MyApp\\Customer\0surname"] = 'Smith';

// you may also call methods on the object, but remember that
// the constructor was not called yet:
Expand All @@ -116,7 +116,7 @@ $initializer = function (
return true; // confirm that initialization occurred correctly
};

$instance = $factory->createProxy('MyApp\Customer', $initializer);
$ghostObject = $factory->createProxy(\MyApp\Customer::class, $initializer);
```

You can now use your object as before:
Expand Down

0 comments on commit 8716b55

Please sign in to comment.