Class PathResource
Path resource will build paths
for objects and figure out which
ids they need in their paths.
usage follows:
PathResource::Make($object)
-
Catapult\BaseResource
-
Catapult\PathResource
Methods summary
public
|
#
__construct( object: & $object, data: $data )
constructor
should allow basic PathResource
which would structure based on key value
constructor
should allow basic PathResource
which would structure based on key value
Parameters
|
public static
|
#
Make( object: & $object, data: & $data = null )
path should be build once
the object has been
initialized with data
to build a path we use
each dependancy, if has id in data
add after path and also set in
object.
path should be build once
the object has been
initialized with data
to build a path we use
each dependancy, if has id in data
add after path and also set in
object.
result:
depend1/depend1id/path
Parameters
- $object
- Model Object
- $data
- input or Array
|