array(
type => 'string' | 'children',
selector => 'img.cover',
[attribute] => 'src'
)
public static create ( string[] $getter_configuration ) : Facebook\InstantArticles\Transformer\Getters\AbstractGetter | ||
$getter_configuration | string[] | that maps the properties for getter |
return | Facebook\InstantArticles\Transformer\Getters\AbstractGetter |
/** * @param $property * @param array $value * * @return $this */ public function withProperty($property, $value) { if ($value) { $this->properties[$property] = GetterFactory::create($value); } return $this; }
public function createFrom($properties) { foreach ($properties['children'] as $getter_configuration) { $this->children[] = GetterFactory::create($getter_configuration); } return $this; }