set() public method

Sets the value of the given property.
public set ( string $property, mixed $value )
$property string Property name.
$value mixed New value.
 /**
  *
  */
 public function setUp()
 {
     $this->Provider = new StdClass();
     $Container = new Container();
     $Container->set('Foo', $this->Provider);
     $Container->set('filters', ['Foo' => '~^foo$~', 'Bar' => function ($url) {
         return $url === 'bar';
     }]);
     $this->Collection = new Collection($Container);
 }
Exemplo n.º 2
0
 /**
  *
  */
 public function setUp()
 {
     $this->Provider = new ProviderImplementation(new NullLogger());
     $Container = new Container();
     $Container->set('OEmbed', $this->Provider);
     $this->Collection = new Collection($Container);
     $this->Collection->setProperties(['Foo' => ['class' => 'OEmbed', 'filter' => '#^foo$#'], 'Bar' => ['class' => 'OpenGraph', 'filter' => function ($url) {
         return $url === 'bar';
     }]]);
 }