本文整理匯總了PHP中Illuminate\Support\Fluent::getAttributes方法的典型用法代碼示例。如果您正苦於以下問題:PHP Fluent::getAttributes方法的具體用法?PHP Fluent::getAttributes怎麽用?PHP Fluent::getAttributes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Illuminate\Support\Fluent
的用法示例。
在下文中一共展示了Fluent::getAttributes方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: migrationHasSucceed
/**
* Response when extension migration has succeed.
*
* @param \Illuminate\Support\Fluent $extension
*
* @return mixed
*/
public function migrationHasSucceed(Fluent $extension)
{
$message = trans('orchestra/foundation::response.extensions.migrate', $extension->getAttributes());
return $this->redirectWithMessage(handles('orchestra::extensions'), $message);
}
示例2: runValidationEvents
/**
* Run validation events and return the finalize rules and phrases.
*
* @param array|string $events
* @param array $phrases
*
* @return array
*/
protected function runValidationEvents($events, array $phrases)
{
is_array($events) || ($events = (array) $events);
// Merge all the events.
$events = array_merge($this->getValidationEvents(), $events);
// Convert rules array to Fluent, in order to pass it by references
// in all event listening to this validation.
$rules = new Fluent($this->getBindedRules());
$phrases = new Fluent(array_merge($this->getValidationPhrases(), $phrases));
foreach ((array) $events as $event) {
$this->validationDispatcher->fire($event, [&$rules, &$phrases]);
}
return [$rules->getAttributes(), $phrases->getAttributes()];
}
示例3: configurationUpdated
/**
* Response when update extension configuration succeed.
*
* @param \Illuminate\Support\Fluent $extension
*
* @return mixed
*/
public function configurationUpdated(Fluent $extension)
{
$this->dispatch(new RefreshRouteCache());
$message = trans('orchestra/foundation::response.extensions.configure', $extension->getAttributes());
return $this->redirectWithMessage(handles('orchestra::extensions'), $message);
}
示例4: runValidationEvents
/**
* Run validation events and return the finalize rules.
*
* @param array $events
* @return array
*/
protected function runValidationEvents($events)
{
// Merge all the events.
$events = array_merge($this->events, (array) $events);
// Convert rules array to Fluent, in order to pass it by references
// in all event listening to this validation.
$rules = new Fluent($this->getBindedRules());
foreach ((array) $events as $event) {
Event::fire($event, array(&$rules));
}
return $rules->getAttributes();
}