当前位置: 首页>>代码示例>>PHP>>正文


PHP array_except函数代码示例

本文整理汇总了PHP中array_except函数的典型用法代码示例。如果您正苦于以下问题:PHP array_except函数的具体用法?PHP array_except怎么用?PHP array_except使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了array_except函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: checkPaginate

 public function checkPaginate($keepQuery = null)
 {
     $flag = true;
     $request = Request::get($this->getPageName());
     $cPage = $this->currentPage();
     if ($this->isEmpty() && 1 != $cPage || 1 == $cPage && !is_null($request) && (int) $request != $cPage) {
         if (is_null($keepQuery)) {
             $keepQuery = $this->getKeepQuery();
         }
         if ($keepQuery) {
             $query = array_except(Request::query(), $this->getPageName());
             $this->appends($query);
         }
         $action = $this->getActionOnError();
         switch ($action) {
             case 'abort':
                 App::abort(404);
                 break;
             case 'first':
                 $flag = Redirect::to($this->url(0), $this->getErrorStatus());
                 break;
             case 'out':
                 $url = 1 == $this->currentPage() ? 0 : $this->lastPage();
                 $flag = Redirect::to($this->url($url), $this->getErrorStatus());
                 break;
             default:
                 throw new PageNotFoundException();
         }
     }
     return $flag;
 }
开发者ID:agelxnash,项目名称:seopagination,代码行数:31,代码来源:ReplaceUrl.php

示例2: extractCalendarClassNames

 /**
  * @param $classNames
  * @return array
  */
 private function extractCalendarClassNames($classNames)
 {
     if (is_string($classNames)) {
         $classNames = explode(" ", $classNames);
     }
     return array_flip(array_except(array_flip($classNames), ['ui', 'calendar', 'event']));
 }
开发者ID:SocietyCMS,项目名称:Calendar,代码行数:11,代码来源:EventController.php

示例3: update

 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update(Forum $forum, Request $request)
 {
     $this->validate($request, $this->rules);
     $input = array_except(Input::all(), '_method');
     $forum->update($input);
     return Redirect::route('Forum.show', $forum->id)->with('message', 'Forum updated.');
 }
开发者ID:sarfraz-akhtar01,项目名称:coutallure-laravel,代码行数:13,代码来源:ForumsController.php

示例4: update

 /**
  * Update the specified resource in storage.
  *
  * @param  Request  $request
  * @param  int  $id
  * @return Response
  */
 public function update(Request $request, $id)
 {
     $pay = Paygrade::findOrFail($id);
     $input = array_except(Input::all(), '_method');
     $pay->update($input);
     return Redirect::route('admin.setup.job.paygrades.index')->withFlashSuccess('Pay grades data was successfully edited.');
 }
开发者ID:krizzna,项目名称:hrportal,代码行数:14,代码来源:PaygradeController.php

示例5: update

 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update(Project $project, Task $task)
 {
     // return view('tasks/index',compact('project'));
     $input = array_except(Input::all(), '_method');
     $task->update($input);
     return Redirect::route('projects.tasks.show', [$project->slug, $task->slug])->with('message', 'Task updated.');
 }
开发者ID:shima-rahman,项目名称:lina,代码行数:13,代码来源:TasksController.php

示例6: makeAssets

 /**
  * Outputs <link> and <script> tags to load assets previously added with addJs and addCss method calls
  * @param string $type Return an asset collection of a given type (css, rss, js) or null for all.
  * @return string
  */
 public function makeAssets($type = null)
 {
     if ($type != null) {
         $type = strtolower($type);
     }
     $result = null;
     $reserved = ['build'];
     if ($type == null || $type == 'css') {
         foreach ($this->assets['css'] as $asset) {
             $attributes = HTML::attributes(array_merge(['rel' => 'stylesheet', 'href' => $this->getAssetEntryBuildPath($asset)], array_except($asset['attributes'], $reserved)));
             $result .= '<link' . $attributes . '>' . PHP_EOL;
         }
     }
     if ($type == null || $type == 'rss') {
         foreach ($this->assets['rss'] as $asset) {
             $attributes = HTML::attributes(array_merge(['rel' => 'alternate', 'href' => $this->getAssetEntryBuildPath($asset), 'title' => 'RSS', 'type' => 'application/rss+xml'], array_except($asset['attributes'], $reserved)));
             $result .= '<link' . $attributes . '>' . PHP_EOL;
         }
     }
     if ($type == null || $type == 'js') {
         foreach ($this->assets['js'] as $asset) {
             $attributes = HTML::attributes(array_merge(['src' => $this->getAssetEntryBuildPath($asset)], array_except($asset['attributes'], $reserved)));
             $result .= '<script' . $attributes . '></script>' . PHP_EOL;
         }
     }
     return $result;
 }
开发者ID:tamboer,项目名称:LaravelOctober,代码行数:32,代码来源:AssetMaker.php

示例7: update

 /**
  * Update the specified resource in storage.
  *
  * @param  \App\Project $project
  * @return Response
  */
 public function update(User $user)
 {
     $this->validate($request, $this->rules);
     $input = array_except(Input::all(), '_method');
     $user->update($input);
     return Redirect::route('users.show', $user->name)->with('message', 'User updated.');
 }
开发者ID:lshakeel,项目名称:WE_Assignment3,代码行数:13,代码来源:UsersController.php

示例8: update

 /**
  * Update the specified resource in storage.
  *
  * @param  License $license
  * @return Response
  */
 public function update(License $license, Request $request)
 {
     $input = array_except($request->all(), ['_method', '_token']);
     $license->update($input);
     Cache::flush();
     return redirect()->route('licenses.show', $license->id)->with('message', 'License updated.')->with('message-class', 'success');
 }
开发者ID:HeidiWang123,项目名称:our-world-in-data-grapher,代码行数:13,代码来源:LicensesController.php

示例9: open

 public function open(array $options = [])
 {
     $method = array_get($options, 'method', 'post');
     if ($this->formConfig == []) {
         $this->loadConfig();
     }
     $this->opened = true;
     $options = $this->appendClassToOptions($this->formConfig['class'], $options);
     // We need to extract the proper method from the attributes. If the method is
     // something other than GET or POST we'll use POST since we will spoof the
     // actual method since forms don't support the reserved methods in HTML.
     $attributes['method'] = $this->getMethod($method);
     $attributes['action'] = $this->getAction($options);
     $attributes['accept-charset'] = 'UTF-8';
     // If the method is PUT, PATCH or DELETE we will need to add a spoofer hidden
     // field that will instruct the Symfony request to pretend the method is a
     // different method than it actually is, for convenience from the forms.
     $append = $this->getAppendage($method);
     if (isset($options['files']) && $options['files']) {
         $options['enctype'] = 'multipart/form-data';
     }
     // Finally we're ready to create the final form HTML field. We will attribute
     // format the array of attributes. We will also add on the appendage which
     // is used to spoof requests for this PUT, PATCH, etc. methods on forms.
     $attributes = array_merge($attributes, array_except($options, $this->reserved));
     // Finally, we will concatenate all of the attributes into a single string so
     // we can build out the final form open statement. We'll also append on an
     // extra value for the hidden _method field if it's needed for the form.
     $attributes = $this->html->attributes($attributes);
     return '<form' . $attributes . '>' . $append;
 }
开发者ID:drickferreira,项目名称:enhanced-bootstrap-forms,代码行数:31,代码来源:FormBuilder.php

示例10: update

 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  Project $project
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, Project $project)
 {
     $input = array_except(Input::all(), '_method');
     $project->update($input);
     Session::flash('flash_message', 'Project updated successfully!');
     return Redirect::route('projects.index')->with('message', 'Project created');
 }
开发者ID:stoic1979,项目名称:laravel_project,代码行数:14,代码来源:ProjectsController.php

示例11: update

 /**
  * Update the specified resource in storage.
  *
  * @param  Request  $request
  * @param  int  $id
  * @return Response
  */
 public function update(Request $request, $id)
 {
     $comp = CompanyStructure::findOrFail($id);
     $input = array_except(Input::all(), '_method');
     $comp->update($input);
     return Redirect::route('admin.setup.company.structures.index')->withFlashSuccess('Company structure data was successfully edited.');
 }
开发者ID:krizzna,项目名称:hrportal,代码行数:14,代码来源:CompanyController.php

示例12: update

 /**
  * Update the specified resource in storage.
  *
  * @param \Illuminate\Http\Request $request
  * @param  int  $id
  * @return Response
  */
 public function update(Project $project, Request $request)
 {
     $this->validate($request, $this->rules);
     $input = array_except(Input::all(), '_method');
     $project->update($input);
     return Redirect::route('project.index', $project->slug)->with('message', 'Project updated.');
 }
开发者ID:alexisribault,项目名称:todo-angularjs,代码行数:14,代码来源:ProjectController.php

示例13: getAuthorization

 /**
  * Serve authorization page
  * @param  Authorizer $authorizer
  * @return View response
  */
 public function getAuthorization(Authorizer $authorizer)
 {
     $authParams = $authorizer->getAuthCodeRequestParams();
     $formParams = array_except($authParams, 'client');
     $formParams['client_id'] = $authParams['client']->getId();
     return view('auth.pages.authorization', ['params' => $formParams, 'client' => $authParams['client']]);
 }
开发者ID:roseffendi,项目名称:notnot,代码行数:12,代码来源:OauthController.php

示例14: update

 /**
  * Update the specified resource in storage.
  *
  * @param  \App\Project $project
  * @param  \App\Task    $task
  * @param \Illuminate\Http\Request $request 
  * @return Response
  */
 public function update(Project $project, Task $task, Request $request)
 {
     $this->validate($request, $this->rules);
     $input = array_except(Input::all(), '_method');
     $task->update($input);
     return Redirect::route('projects.tasks.show', [$project->slug, $task->slug])->with('message', 'Task updated.');
 }
开发者ID:nowarena,项目名称:homestead,代码行数:15,代码来源:TasksController.php

示例15: update

 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Repair $repair, Request $request)
 {
     $input = array_except(Input::all(), ['_method']);
     $this->validate($request, ['LicencePlate' => ['required', 'exists:cars', 'regex:/\\b([A-Z]{3}\\s?(\\d{3}|\\d{2}|d{1})\\s?[A-Z])|([A-Z]\\s?(\\d{3}|\\d{2}|\\d{1})\\s?[A-Z]{3})|(([A-HK-PRSVWY][A-HJ-PR-Y])\\s?([0][2-9]|[1-9][0-9])\\s?[A-HJ-PR-Z]{3})\\b/'], 'StaffId' => 'required|exists:staff,Id', 'Ongoing' => 'boolean', 'Type' => 'required', 'StartDate' => 'required|date', 'EndDate' => 'required|date|after:StartDate', 'Cost' => 'required|numeric|min:0', 'Paid' => 'boolean']);
     $repair->update($input);
     return Redirect::route('repairs.index')->with('message', 'Repair updated');
 }
开发者ID:redcatthethird,项目名称:garage-manager,代码行数:14,代码来源:RepairsController.php


注:本文中的array_except函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。