| 1 | <?php |
||
| 8 | class Package |
||
| 9 | { |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @param $source |
||
| 13 | * @param null $basePath |
||
| 14 | * |
||
| 15 | * @return \frictionlessdata\datapackage\Datapackages\BaseDatapackage |
||
| 16 | * @throws \Exception |
||
| 17 | * @throws \frictionlessdata\datapackage\Exceptions\DatapackageInvalidSourceException |
||
| 18 | */ |
||
| 19 | public static function load($source, $basePath = null) |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param $source |
||
| 27 | * @param null $basePath |
||
| 28 | * |
||
| 29 | * @return \frictionlessdata\datapackage\Validators\DatapackageValidationError[] |
||
| 30 | * @throws \Exception |
||
| 31 | */ |
||
| 32 | public static function validate($source, $basePath = null) |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @param null $descriptor |
||
| 40 | * @param null $basePath |
||
| 41 | * |
||
| 42 | * @return mixed |
||
| 43 | * @throws \Exception |
||
| 44 | */ |
||
| 45 | public static function create($descriptor = null, $basePath = null) |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @throws \Exception |
||
| 59 | */ |
||
| 60 | private static function isZipPresent() { |
||
| 66 | } |
||
| 67 |
Let’s assume you have a class which uses late-static binding:
}
The code above will run fine in your PHP runtime. However, if you now create a sub-class and call the
getSomeVariable()on that sub-class, you will receive a runtime error:In the case above, it makes sense to update
SomeClassto useselfinstead: