本文整理汇总了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();
}