matt-cannon / blm
Rightmove BLM Parser
Requires
- php: >=5.4.0
- illuminate/support: 4.*
- league/flysystem: 0.5.*
- psr/log: 1.0.*
Requires (Dev)
- block8/php-docblock-checker: 1.*
- monolog/monolog: 1.*
- phpdocumentor/phpdocumentor: 2.*
- phpunit/phpunit: 4.1.*
This package is not auto-updated.
Last update: 2024-12-21 17:48:32 UTC
README
#MattCannon\Blm Rightmove BLM parser for PHP - Please see (http://mattcannon.github.io/rightmove/)[http://mattcannon.github.io/rightmove/]
##Current Status
##Requirements
- PHP 5.4+
##Installation
###Composer
To install this package using composer, run:
composer require matt-cannon/blm:0.2.*
##Usage
To use the parser you should create a new instance of the Parser class, then set
the BLM contents, or pass in a file path to a BLM.
To access the data in the BLM, you should call parseBlm()
.
$adapter = new \League\Flysystem\Adapter\Local('/data/'); $loader = new BlmFileLoader(new League\Flysystem\Filesystem($adapter),'BlmFile.blm'); $parser = new \MattCannon\Blm\Parser(new \Psr\Log\NullLogger(),$loader); $data = $parser->parseBlm(); foreach($data as $property){ var_dump($property); }
You can access the property attributes like so:
<?php $property = $collection->first(); echo $property->displayAddress; echo $property->price;
##Public API To see a full list of all public methods, please look at the interface files in src/MattCannon/Blm/Interfaces - if a method isn't listed in these files, then it may disappear or change it's behavior without notice.