text stringlengths 29 2.99M |
|---|
<?php
use App\Http\Controllers\Admin\MenuController;
use App\Http\Controllers\Admin\OrderController;
use App\Http\Controllers\Admin\ProductController;
use App\Http\Controllers\Admin\SliderController;
use App\Http\Controllers\Admin\UploadController;
use App\Http\Controllers\Admin\Users\LoginController;
use App\Http\Con... |
<?php
//============================================================+
// File name : example_018.php
// Begin : 2008-03-06
// Last Update : 2011-10-01
//
// Description : Example 018 for TCPDF class
// RTL document with Persian language
//
// Author: Nicola Asuni
//
// (c) Copyright:
// ... |
<?php
/**
* Created by PhpStorm.
* User: wu
* Date: 2020/3/16
* Time: 14:05
*/
namespace App\Http\Common;
class Common
{
/**
* 时间搜索插件封装
* @param $timeset
* @return array
*/
function get_time_search($timeset)
{
switch ($timeset) {
case 1;//... |
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRatesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('rates', function ... |
<?php
namespace App\Http\Controllers;
use App\Department;
use App\RoleUser;
use Illuminate\Http\Request;
use App\User;
use App\DepartmentUser;
use App\Role;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Auth;
class UsersController extends Controller
{
... |
<?php
namespace App\Http\Controllers;
use App\Bank;
use App\Country;
use App\GradeRank;
use App\Major;
use App\Person;
use App\PersonTitles;
use App\SceMembershipType;
use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use App\Rules\ValidDate;
use App\Rules\ValidHijriDate;
use App\Rules\ValidGregorianD... |
<?php
namespace FirePHP\Exception;
/**
* UploadFileNotFoundException est l'exception à l'upload lors que le fichier n'est pas trouvé.
* @author Yoann Chaumin <yoann.chaumin@gmail.com>
*/
class UploadFileNotFoundException extends Exception
{
}
?> |
<?php
namespace DevGroup\Users\actions;
use DevGroup\Users\models\User;
use DevGroup\Users\models\UserService;
use yii\base\Action;
use Yii;
use yii\web\NotFoundHttpException;
use yii\web\ServerErrorHttpException;
/**
* Class DeleteSocial
*
* @package DevGroup\Users\actions
*/
class DeleteSocial extends Action
{... |
<?php
namespace app\wxpay\controller;
use think\Loader;
use think\Controller;
class Index extends Controller
{
public function index()
{
return $this->fetch();
}
public function native()
{
Loader::import('wxpay.WxPayNativePay', EXTEND_PATH);
//Loader::import('wxpay.lib.WxPa... |
Laravel provides an expressive, minimal API arround the Guzzle HTTP client, allowing you to quickly make outgoing HTTP requests to communicate with other web apps.
Laravel's wrapper around Guzzle is focused on its most common use cases and a wonderful dev experience.
Before getting started, insure you have the Guzzl... |
<?php
/*
Helper File for Plugin: Filedownload
Plugin URI: http://www.worldweb-innovation.de/
Description: Database functions
Author: Peter Gross
Author URI: http://www.worldweb-innovation.de/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public Licen... |
<?php
return [
'test-00036-00405' => [
'ua' => 'Mozilla/5.0 (Linux; Android 4.4.2; XT890 Build/KIA20.74) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36',
'properties' => [
'Browser_Name' => 'Chrome',
'Browser_Type' ... |
<?php
namespace App\Http\Livewire;
use App\Models\Site;
use App\Valet\Valet;
use Livewire\Component;
use Livewire\WithPagination;
class Sites extends Component
{
use WithPagination;
protected $paginationTheme = 'bootstrap';
public $project_path;
public $project_name;
public $onLatestVerision;
... |
<?php
namespace App\Models;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class Pasien extends Authenticatable
{
use Notifiable;
protected $fillable = [
'nomor','nama','username','password','lp','kota','foto','alamat_pasien','gol_darah','hp_pasien',... |
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Validation\Rule;
use Illuminate\Support\Facades\DB;
use Carbon\Carbon;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\weapon;
class WeaponController extends Controller
{
/**
* Display a listing of the re... |
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed t... |
<?php
/**
* This file is part of the ValueObjects package.
*
* (c) Lorenzo Marzullo <marzullo.lorenzo@gmail.com>
*/
namespace ValueObjects\Common;
/**
* Interface QuantityInterface.
* A quantity is class composed by an amount and a unit.
* Eg: moneys , physics measures, ...
* See http://martinfowler.com/eaaD... |
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed t... |
<?php
/**
* Shipping zone admin
*
* @package WooCommerce/Admin/Shipping
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<h2>
<a href="<?php echo esc_url( admin_url( 'admin.php?page=wc-settings&tab=easy_shipping' ) ); ?>"><?php esc_html_e( 'Shipping zones', 'woocommerce' ); ?></a> >
<span class="wc-shipping-zon... |
<?php
namespace Kirby\Http;
/**
* A set of methods that make it more convenient to get variables
* from the global server array
*
* @package Kirby Http
* @author Bastian Allgeier <bastian@getkirby.com>
* @link https://getkirby.com
* @copyright Bastian Allgeier GmbH
* @license https://opensource.or... |
<?php
namespace Gomee\Repositories;
trait CacheAction
{
/**
* các phương thúc lấy dữ liệu
*
* @var array
*/
protected $getDataMethods = [];
/**
* đẩy repository vào một cache task
*
* @param string $key
* @param integer $time
* @param array $params
* ... |
<?php
/**
* Fired when the plugin is uninstalled. Deletes options and slider posts.
*
* @package Lucid\Slider
*/
// Exit if the uninstall is not called from WordPress
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) )
die();
require 'inc/core.php';
/**
* Delete all slider posts.
*/
function lucid_slider_delete_all_pos... |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
*
*
* 基于Codeigniter的
*
* @package ZhenGoo
* @author Ghostdom.wj <ghostdom.wj@gmail.com>
* @copyright Copyright (c) 20011 - 2012, pintutu.com.
* @link http://www.pintutu.com
* @version 0.1.0
*/
// ----------------------------... |
<?php
namespace Core\AttributeBundle\Entity;
use Doctrine\ORM\EntityRepository;
class AttributeValueRepository extends EntityRepository
{
public function getValuesByNameQueryBuilder($name = null, $all = false, $value = null)
{
$queryBuilder = $this->getEntityManager()->createQueryBuilder()
... |
<?php
spl_autoload_register(function($class) use ($basedir) {
$parts = explode('\\', $class);
$path = __DIR__ . '/lib/' . implode('/', $parts) . '.php';
if (!file_exists($path))
return false;
require $path;
}); |
#if !defined(UM_JULES)
! *****************************COPYRIGHT**************************************
! (C) Crown copyright Met Office. All rights reserved.
! For further details please refer to the file COPYRIGHT.txt
! which you should have received as part of this distribution.
! *****************************COPYRIGH... |
<?php
namespace Site\ShopBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Doctrine\ORM\EntityRepository;
/**
* Description of CartPaymentShippingType
*
* @author Birko
*/
class CartPaymentShip... |
<?php
/**
* Content Areas Plugin, Furasta.Org
*
* @author Conor Mac Aoidh <conormacaoidh@gmail.com>
* @licence http://furasta.org/licence.txt The BSD Licence
* @version 1
*/
if( $widget_id == 0 ){ // add new widget to database and return id
$defaults = json_encode( array(
) );
query( 'insert into ' . DB_PRE... |
<?php
class NegociacaoParcelaModel {
private $id;
private $negociacao;
private $cobranca;
function getId() {
return $this->id;
}
function getNegociacao() {
return $this->negociacao;
}
function getCobranca() {
return $this->cobranca;
}
function se... |
<?php
/*
* This file is part of the Stinger Media Parser package.
*
* (c) Oliver Kotte <oliver.kotte@stinger-soft.net>
* (c) Florian Meyer <florian.meyer@stinger-soft.net>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace... |
<?php
namespace Philcross\GetAddress\Tests\Responses;
use PHPUnit\Framework\TestCase;
use Philcross\GetAddress\Responses\Ip;
use Philcross\GetAddress\Responses\Domain;
use Philcross\GetAddress\Responses\AbstractWhitelist;
class WhitelistTest extends TestCase
{
public function test_i_can_use_the_getters_to_retrie... |
<?php
return [
'test-00061-02510' => [
'ua' => 'Firefox/35.0.1 (x86 de); anonymized by Abelssoft 147017980',
'properties' => [
'Browser_Name' => 'Firefox',
'Browser_Type' => 'Browser',
'Browser_Bits' => 32,
'Br... |
<?php
@require_once '../github_secret.php';
if (!defined('GITHUB_SECRET')) {
http_response_code(500);
die();
}
$post_data = file_get_contents('php://input');
$signature = hash_hmac('sha1', $post_data, GITHUB_SECRET);
header("Content-Type: text/plain");
if ($_SERVER['REQUEST_METHOD'] != 'POST'
|| !isset($_... |
<?php
namespace BromineMai\CorYar;
use BromineMai\CorYar\Packager\Json;
use BromineMai\CorYar\Packager\Msgpack;
use BromineMai\CorYar\Packager\Packager;
use BromineMai\CorYar\Exception\ExceptionHelper;
use BromineMai\CorYar\Packager\Php;
/**
* Class Yar
* @package BromineMai\CorYar
*/
class Yar{
pr... |
<?php
/**
* Template for the Admin header/footer picker settings screen.
*
* @package EightshiftBoilerplate
*/
use EightshiftBoilerplate\AdminMenus\ReusableBlocksHeaderFooter;
use EightshiftBoilerplateVendor\EightshiftLibs\Helpers\Components;
$globalManifest = Components::getManifest(dirname(__DIR__, 2));
$manif... |
<?php
/**
* Created by solly [06.04.17 3:23]
*/
namespace insolita\opcache\contracts;
use yii\data\ArrayDataProvider;
/**
* Class IOpcachePresenter
*
* @package backend\modules\opcache\services
*/
interface IOpcachePresenter
{
/**
* @return mixed
*/
public function setUpFormat();
/**... |
<?php defined('BASEPATH') OR exit('No direct script access allowed');
/**
* CodeIgniter MathCaptcha
*
* @category Libraries
* @license MIT License (http://opensource.org/licenses/MIT)
* @author steven kamanu
* @version 1.0
*/
class Mathcaptcha
{
private $addNum1;
private $addNum2;
pub... |
<?php
namespace AbstractFactory\Service;
use AbstractFactory\Contract\DBFactoryInterface;
use AbstractFactory\Contract\RepositoryFactoryInterface;
use AbstractFactory\Entity\DBQueryBuilder;
use AbstractFactory\Entity\DBRecord;
use AbstractFactory\Entity\RecordDb;
use AbstractFactory\Repository\MySqlBuilder;
class Se... |
<?php
namespace App\Helper;
use Illuminate\Support\Facades\Auth;
class AuthHelper
{
public static function showUsername()
{
$user = Auth::user();
$name = "";
if (!empty($user->first_name)) {
$name .= $user->first_name . " ";
}
if (!empty($user->last_name... |
<?php
// command line php xx.php
/*
* quickselect leetcode https://leetcode.com/problemset/all/?page=1&topicSlugs=quickselect
*/
$arr = array( 6,1,3,7,5,2,3,4,45,5,4,75,8,6,78,7980890,2,4,2,432,5,34,5634,34,5);
echo "\n input array: ".implode(',',$arr)."\n";
echo "\n == testing sort algo == \n";
$solution = new ... |
<?php
namespace SafeBox\Infrastructure\Repository\SafeBox;
use SafeBox\Application\Service\SafeBox\CommonPasswordRepositoryInterface;
class FileCommonPasswordRepository implements CommonPasswordRepositoryInterface
{
function all(): array
{
return [
'123456',
'123456789',
... |
<?php
namespace Tests\Feature;
use Tests\TestCase;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Foundation\Testing\RefreshDatabase;
class ChequeTest extends TestCase
{
/**
* Get all the cheques
*
* @return void
*/
public function testListOfAllCheques()
{
$respon... |
<?php
namespace Hue\Helpers;
require_once 'vendor/autoload.php';
class Config
{
public function __construct(){
foreach (parse_ini_file($_SERVER['HOME'].'/.hue') as $key => $value) {
$this->$key = $value;
}
}
public function get($property){
if(isset($this->$property)){
return $this->$property;
... |
<?php //Etiqueta php
class Bd{
private static $conexion = NULL; //Variable conexion para la cadena
private function __construc() {} //Precargar información para el uso de la conexión
public static function conectar(){
$pdo_option[PDO::ATTR_ERRMODE]=PDO::ERRMODE_EXCEPTIO... |
<?php
/**
* Created by PhpStorm.
* User: EVER
* Date: 24/06/2016
* Time: 11:37
*/
namespace CrudBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use app\CrudBundle\Entity\Invoice;
... |
<?php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
use App\Http\Requests;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Validator;
class ResetPasswordContr... |
<?php
require_once "ControllerInterface.php";
require_once "../model/Orders/OrderClass.php";
require_once "../model/persist/OrderADO.php";
require_once "../model/persist/Users/UserADO.php";
require_once "../model/persist/TablesADO/TableADO.php";
class OrderControllerClass implements ControllerInterface {
... |
<?php
/*
* This file is part of SplashSync Project.
*
* Copyright (C) Splash Sync <www.splashsync.com>
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* For the ... |
<?php
declare(strict_types=1);
namespace voku\SimplePhpParser\Parsers;
use Roave\BetterReflection\Reflection\ReflectionClass;
final class PhpCodeChecker
{
public static function checkFromString(
string $code,
array $access = ['public', 'protected', 'private'],
bool $skipMixedTypesAsError... |
<?php
return [
'test-00135-03707' => [
'ua' => 'Mozilla/5.0 (Windows NT 6.2; rv:47.0.1) Gecko/20100101 Firefox/47.0.1 anonymized by Abelssoft 676839740',
'properties' => [
'Browser_Name' => 'Firefox',
'Browser_Type' => 'Browser',
'Br... |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -
* Since this contro... |
<html>
<head>
<meta charset="UTF-8">
<title>Common Problems</title>
</head>
<body>
<?php
phpinfo(); // makes simple php page confirms its working and more details
/*
# E_STRICT is available, with the value 2048. When enabled, messages will be issued to warn you about code usage which is deprecated or ... |
<?php
use Illuminate\Support\Facades\Route;
use App\Models\User;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are... |
<?php
namespace App\Repositories\Contracts;
use Illuminate\Database\Eloquent\Collection;
interface CategoryInterface
{
/**
* @param $type
* @return Collection
*/
public function getAll($type);
}
|
<?php
/**
* WP Settings - A set of classes to create a WordPress settings page for a Theme or a plugin.
* @author David Mårtensson <david.martensson@gmail.com>
* @version 1.9.1
* @package FeedMeAStrayCat
* @subpackage WPSettings
* @license MIT http://en.wikipedia.org/wiki/MIT_License
*/
// Set namespace
... |
<?php
namespace App\Factory;
use App\Entity\People;
use App\Repository\PeopleRepository;
use Zenstruck\Foundry\RepositoryProxy;
use Zenstruck\Foundry\ModelFactory;
use Zenstruck\Foundry\Proxy;
/**
* @method static People|Proxy findOrCreate(array $attributes)
* @method static People|Proxy random()
* @method static... |
<?php
declare(strict_types=1);
namespace YapepBase\Test\Unit\Storage;
use Mockery\MockInterface;
use YapepBase\Debug\DataHandlerRegistry;
use YapepBase\Debug\ICanReturnItems;
use YapepBase\Debug\Item\Storage;
use YapepBase\Helper\DateHelper;
abstract class TestAbstract extends \YapepBase\Test\Unit\TestAbstract
{
... |
<?php
namespace Backend\Controller;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;
use Zend\View\Model\JsonModel;
use Zend\Db\Sql\Expression;
use Mynamespace\SimpleImage;
class BankAccountController extends AbstractActionController
{
public function indexAction() {
$appl... |
<?php
return[
"login" => "Please sign in",
"password" => "Password",
"btnlogin" => "Sign in",
"menuhome" => "Home",
"menucompany" => "Companies",
"menuemployee" => "Employees",
"l... |
<?php
/*-----------------------------------------------------------------------------------*/
/* Button Config
/*-----------------------------------------------------------------------------------*/
$gw_shortcodes['button'] = array(
'no_preview' => true,
'params' => array(
'url' => array(
'std' => '',
'type... |
<?php
namespace App;
use App\Models\Element;
use App\Models\ElementCollection;
use App\Models\Messages;
use App\Models\Player;
class Game
{
private ElementCollection $gameElements;
private Player $player;
private Element $computerChoice;
private Messages $message;
private array $ga... |
<?php
/**
* Created by PhpStorm.
* User: mirza
* Date: 7/17/18
* Time: 12:56 PM
*/
namespace Model\Service;
use Exception;
use Model\Entity\ResponseBootstrap;
use Model\Mapper\NotificationMapper;
class NotificationService
{
private $notificationMapper;
private $configuration;
private $response;
... |
<?php
return [
'test-00101-11508' => [
'ua' => 'Mozilla/5.0 (X11; Ubuntu; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.2000.38 Safari/537.36',
'properties' => [
'Browser_Name' => 'Chrome',
'Browser_Type' => 'Browser',
... |
<?php
/**
* Created by PhpStorm.
* Author: ZhiPeng
* Date: 2017/2/13
* Project: Cat Visual
*/
namespace console\controllers;
use Yii;
use yii\console\Controller;
class BaseController extends Controller {
public function actions() {
return [
'error' => [
... |
<?php
/**
* Class Cookies
*/
class Cookies
{
/**
* @param $key
* @return string Cookie
*/
public static function get($key)
{
if (isset($_COOKIE[$key])) {
return $_COOKIE[$key];
} else {
return "La cookie $key n'existe pas";
}
}
/**
... |
<?php
use Faker\Generator as Faker;
$factory->define(\App\Models\Task::class, function (Faker $faker) {
return [
'name'=>$faker->streetName,
'priority'=>$faker->randomElement(['not_defined','low','medium','high','urgent']),
'billable'=>$faker->numberBetween(0,1),
'price_per_hour'=>... |
<?php namespace App;
class Address extends Elegant
{
protected $table = 'Addresses';
public static $rules = [
'street'=> 'required|alphanumeric',
'number'=> 'required|alphanumeric',
'inner_number' => 'alphanumeric',
'postal_code' => 'required|numeric|size:5',
'colony'=> 'r... |
<?php
/**
* Created by PhpStorm.
* User: alvin
* Date: 21/12/2017
* Time: 12:18 PM
*/
namespace AltheaTech\Talkable\Helper;
use Magento\Customer\Model\Session;
use Magento\Directory\Model\CountryFactory;
use Magento\Framework\App\Helper\AbstractHelper;
use Magento\Framework\App\Helper\Context;
use Magento\Sales\... |
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function ... |
<?php
/**
* Contao Open Source CMS
*
* Copyright (c) 2005-2013 Leo Feyer
*
* @package Core
* @link https://contao.org
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
*/
/**
* Table tl_forum_threads
*/
$GLOBALS['TL_DCA']['tl_forum_threads'] = array
(
// Config
'config' => array
(
'dataCon... |
<?php
return [
'Userid' => '用户id',
'Tid' => '任务id',
'Create_time' => '完成时间'
];
|
<?php
if (!isset($oreon)) {
exit();
}
function nagvisInstall($dir) {
if (is_dir($dir)) {
return true;
}
return false;
}
$path = './modules/centreon-nagvis/';
$attrsTextLong = array("size" => "50");
$form = new HTML_QuickFormCustom('Form', 'post', '?p=' . $p);
$form->addElement('header', 'title', _('Cen... |
<?php
/**
* Kima Status Code
* @author Steve Vega
*/
namespace Kima\Http;
use Kima\Error;
/**
* Status Code
* Handles the status codes
*/
class StatusCode
{
/**
* Error messages
*/
const ERROR_UNKNOWN_STATUS_CODE = 'Unknown status code "%d"';
/**
* Status codes messages
* @var ... |
<?php
namespace chly19\Dice;
use PHPUnit\Framework\TestCase;
/**
* Test cases for class Robot.
*/
class RobotTest extends TestCase
{
/**
* Create new instance of Robot class with random number of dice per roll.
*/
public function setUp(): void
{
$this->number = rand(1, 4);
$... |
<?php
/**
* 角色模型
* buzhidao
* 2015-7-30
*/
namespace Admin\Model;
class RoleModel extends CommonModel
{
public function __construct()
{
parent::__construct();
}
//获取角色信息
public function getRole($roleid=null, $rolename=null, $start=0, $length=0)
{
$where = array();
... |
<?php namespace App\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
use App\Models\StockMetrics;
use App\Models\Stock;
use App\Models\Historicals;
use Carbon\Carbon;
class UpdateStockMetricsCommand extends Command {
... |
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class ChangeVideosAndUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
// videos
DB::statement("ALTER TABLE learner.videos cha... |
<?php
App::uses('BaseAuthorize', 'Controller/Component/Auth');
App::uses('Token', 'Apis.Model');
App::uses('OauthCredentials', 'Apis.Lib');
/**
* @property Token $Token
*/
class OauthAuthorize extends BaseAuthorize {
public $Token;
public function __construct(\ComponentCollection $collection, $settings = array()... |
<?php
declare(strict_types=1);
namespace App\Services\Activity;
use App\Models\Activity;
use App\Models\Game;
use Illuminate\Support\Facades\Auth;
class ActivityService
{
public function create(string $action, array $data = null, Game $game = null): Activity
{
$coverUrl = null;
$gameId = null... |
<?php namespace App\Http\Controllers;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\Equipo;
use App\CalixtaAPI;
use Illuminate\Http\Request;
class MensajeController extends Controller {
public function enviar_mensaje(Request $request)
{
$sms= CalixtaAPI::enviaMensaje($request->numtel,$reques... |
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| ... |
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRecebidosTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('recebidos', f... |
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| ... |
<?php
declare(strict_types=1);
namespace wpengine\cache_plugin;
require_once __DIR__ . '/../clear-all-cache-status.php';
require_once __DIR__ . '/../security/security-checks.php';
require_once __DIR__ . '/../wpe-common-adapter.php';
require_once __DIR__ . '/../max-cdn-provider.php';
\wpengine\cache_plugin\check_sec... |
<?php
namespace App\AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity()
*/
class User
{
/**
* @ORM\Column(type="integer")
* @ORM\Id()
* @ORM\GeneratedValue()
*/
public $id;
/**
* @ORM\Column()
*/
public $name;
/**
* @ORM\Column()
*/
... |
<?php
namespace Verkoo\Common\Entities;
use Verkoo\Common\Traits\Priceable;
use Illuminate\Database\Eloquent\Model;
class Product extends Model
{
use Priceable;
protected $appends = ['vat', 'quantity', 'product_id', 'product_name'];
protected $hidden = ['category', 'cost', 'created_at', 'initial_stock'... |
<?php
/**
* This file is part of the Zephir.
*
* (c) Phalcon Team <team@zephir-lang.com>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Zephir;
/**
* Class Exception for backward compatibility after migrating to name... |
<?php
namespace App\Controller;
use App\Repository\ItemsRepository;
use App\Services\Cart\CartService;
use App\Services\SecurityService;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class DefaultController extends AbstractController
{
public fu... |
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed t... |
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\ProductTypeController;
use App\Http\Controllers\ProductBrandController;
use App\Http\Controllers\ProductController;
use App\Http\Controllers\ProductVendorController;
Route::get('/', function () {
return view('auth/login');
});
Route::middlewar... |
<?php
use yii\db\Schema;
use yii\db\Migration;
class m150909_134657_user extends Migration
{
/*
public function up()
{
}
public function down()
{
echo "m150909_134657_user cannot be reverted.\n";
return false;
}
*/
// Use safeUp/safeDown to run migration code within... |
<?php
namespace Atemschutz\CoreBundle\Entity;
use Doctrine\ORM\NoResultException;
use Symfony\Component\Security\Core\User\UserProviderInterface;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
use Symfony\Component\Security\C... |
<?php
/**
* Install Overview, Furasta.Org
*
* An overview of whats required to install the CMS.
*
* @author Conor Mac Aoidh <conormacaoidh@gmail.com>
* @license http://furasta.org/licence.txt The BSD License
* @version 1.0
* @package installer
*/
session_start( );
require 'header.php';
$phpver... |
<?php
namespace Academe\Instructions\Traits;
trait Sortable
{
/**
* @var array
*/
protected $orders = [];
/**
* @param $field
* @param $direction
* @return $this
*/
public function sort($field, $direction)
{
$this->orders[] = [$field, $direction];
re... |
<?php
// No utilizar el registro 0
$ayudas = array(
'1' => array(
'titulo_cuadro' => 'Generar Ayudas',
'introduccion' => 'Una plantilla que para como generar mas ayudas.',
'ruta' => '/help_plantilla/',
'fichero' => 'index.php'
),
'2' => array(
'titulo_cuadro' =>... |
<?php
class Solution {
/**
* @param Integer[] $nums1
* @param Integer[] $nums2
* @return Integer[]
*/
function intersection($nums1, $nums2) {
$count1 = count($nums1);
$count2 = count($nums2);
if($count1 == 0 || $count2==0){
return [];
}
$n... |
<?php
function display_styles($id){
$width = '';
$height = '';
$mr = ''; $ml = ''; $mt = ''; $mb = '';
$pt = ''; $pr = ''; $pb = ''; $pl = '';
$bg_color = '';
$bg_img = '';
$ff = '';
/* **************************************************************... |
<?php
use common\modules\catalog\models\CatalogCategory;
use common\modules\catalog\models\CatalogCategoryAttributeValue;
use frontend\widgets\leads\LeadForm;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\web\View;
/* @var $this View */
/* @var $model CatalogCategory */
?><div class="catalog-item__info">
<di... |
<?php
namespace App\Modules;
class Direction{
public $routes;
public $optimized_routes;
public $optimized_routes_geocoding;
const API_URL = 'https://maps.googleapis.com/maps/api/directions/json';
const API_KEY = 'AIzaSyCHb-YMhGAiffYYib4AgztCBKH_U2C1iRE';
public function __construct(){
... |
<?php
/**
* Aist Console (http://mateuszsitek.com/projects/console)
*
* @copyright Copyright (c) 2017 DIGITAL WOLVES LTD (http://digitalwolves.ltd) All rights reserved.
* @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
*/
namespace Aist\Console;
class Module
{
/**
* {@inheritDoc}
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.