Skip to content

Instantly share code, notes, and snippets.

@sarahhenkens
Created June 1, 2012 22:14
Show Gist options
  • Select an option

  • Save sarahhenkens/2855448 to your computer and use it in GitHub Desktop.

Select an option

Save sarahhenkens/2855448 to your computer and use it in GitHub Desktop.
Child class of AMQPConnection cannot access its own attributes
<?php
class MockAMQPConnection extends AMQPConnection {
protected $foo = 'bar';
public function getFoo() {
return $this->foo;
}
}
$mock = new MockAMQPConnection();
// The following line will trigger
// Notice: Undefined property: MockAMQPConnection::$foo
echo $mock->getFoo();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment