Manager
abstract class Manager
Location Manager Class
Traits
Adds event related features to any class.
Properties
protected array | $emitterSingleEvents | from EventEmitter | |
protected array | $emitterEvents | from EventEmitter | |
protected array | $emitterEventSorted | from EventEmitter | |
protected | $sessionKey | ||
protected AbstractLocation | $model | ||
protected | $defaultLocation | ||
protected | $locationModel | ||
protected | $loaded | ||
static protected | $schedulesCache | ||
static protected Closure | $locationSlugResolver | The route parameter resolver callback. |
Methods
Create a new event binding.
Create a new event binding that fires once only
Sort the listeners for a given event by priority.
Fire an event and call the listeners.
Fires a combination of local and global events. The first segment is removed from the event name locally and the local object is passed as the first argument to the event globally. Halting is also enabled by default.
Resolve the location slug from route parameter.
No description
No description
No description
No description
No description
No description
No description
Creates a new instance of the location model
Prepares a query derived from the location model.
Retrieve a location by their unique identifier.
Retrieve a location by their unique slug.
No description
Retrieves key/value pair from session data.
No description
No description
Details
in
EventEmitter at line 36
EventEmitter
bindEvent(string $event, callable $callback, int $priority = 0)
Create a new event binding.
in
EventEmitter at line 52
EventEmitter
bindEventOnce(string $event, callable $callback)
Create a new event binding that fires once only
in
EventEmitter at line 66
protected void
emitterEventSortEvents(string $eventName)
Sort the listeners for a given event by priority.
in
EventEmitter at line 84
EventEmitter
unbindEvent(string $event = null)
Destroys an event binding.
in
EventEmitter at line 124
string|array
fireEvent(string $event, array $params = [], bool $halt = false)
Fire an event and call the listeners.
in
EventEmitter at line 178
mixed
fireSystemEvent(string $event, array $params = [], bool $halt = true)
Fires a combination of local and global events. The first segment is removed from the event name locally and the local object is passed as the first argument to the event globally. Halting is also enabled by default.
For example:
$this->fireSystemEvent('admin.form.myEvent', ['my value']);
Is equivalent to:
$this->fireEvent('form.myEvent', ['myvalue'], true);
Event::fire('admin.form.myEvent', [$this, 'myvalue'], true);
at line 44
Manager
instance()
Helper to get the current location instance.
at line 54
string
resolveLocationSlug()
Resolve the location slug from route parameter.
at line 67
void
locationSlugResolver(Closure $resolver)
Set the location route parameter resolver callback.
at line 75
mixed
getDefaultLocation()
No description
at line 83
setDefaultLocation(string $defaultLocation)
No description
at line 88
getDefault()
No description
at line 93
current()
No description
at line 117
setCurrent(LocationInterface $locationModel)
No description
at line 126
getModel()
No description
at line 135
setModel(LocationInterface $model)
No description
at line 142
setModelById($id)
No description
at line 149
setModelClass($className)
No description
at line 158
AbstractLocation
createLocationModel()
Creates a new instance of the location model
at line 169
protected
createLocationModelQuery()
Prepares a query derived from the location model.
at line 185
void
extendLocationQuery(Builder $query)
Extend the query used for finding the location.
at line 196
AbstractLocation|null
getById(mixed $identifier)
Retrieve a location by their unique identifier.
at line 211
LocationInterface|null
getBySlug(string $slug)
Retrieve a location by their unique slug.
at line 220
searchByCoordinates(CoordinatesInterface $coordinates, $limit = 20)
No description
at line 236
WorkingSchedule
workingSchedule($type, null $days = null)
No description
at line 262
mixed
getSession(string $key = null, string $default = null)
Retrieves key/value pair from session data.
at line 269
putSession($key, $value)
No description
at line 277
forgetSession($key = null)
No description