Class Identifiable
Domain object uniquely represented by its URI. Entity and snowflake are
example of domain objects which are identified by it's identity, instead of
values. While entity does not implement Identifiable, aggregate root does.
-
NGS\Patterns\Searchable
implements
NGS\Patterns\IDomainObject
-
NGS\Patterns\Identifiable
implements
NGS\Patterns\IIdentifiable
Methods summary
public static
Object
|
#
find( string|array $uri )
Finds one or more objects by one or more URIs.
Finds one or more objects by one or more URIs.
Parameters
- $uri
string|array Single string or array of strings representing URIs
Returns
Object if single string is given, or array of objects
Throws
NotFoundException When argument is a single string URI and object is not found.
Implementation of
|
public static
boolean
|
#
exists( string $uri )
Checks if object with given URI exists. It won't throw an exception if object
is not found (as Identifiable::find would).
Checks if object with given URI exists. It won't throw an exception if object
is not found (as Identifiable::find would).
Parameters
- $uri
string $uri Object URI
Returns
boolean True if object was found, false otherwise.
|