blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 116 | path stringlengths 2 241 | src_encoding stringclasses 31
values | length_bytes int64 14 3.6M | score float64 2.52 5.13 | int_score int64 3 5 | detected_licenses listlengths 0 41 | license_type stringclasses 2
values | text stringlengths 14 3.57M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
fe642ef09739fc158a68caf53c91b8c998bfe54c | PHP | microlancer/lnwiki | /app/Model/Factory/Invoice.php | UTF-8 | 540 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Model\Factory;
use App\Model\Invoice as InvoiceModel;
use App\Model\InvoiceList;
use App\Util\Di;
class Invoice
{
private $di;
public function __construct(Di $di)
{
$this->di = $di;
}
/**
*
* @return InvoiceModel
*/
public function createInvoice()
... | true |
10020f98141ea1ce57cecea217dbde3807d35adf | PHP | roeltz/pipa-base | /src/Pipa/Parser/SyntaxError.php | UTF-8 | 815 | 3.015625 | 3 | [] | no_license | <?php
namespace Pipa\Parser;
use Exception;
use Pipa\Parser\Symbol\Rule;
class SyntaxError extends Exception {
private $offset;
private $string;
private $rule;
function __construct($string, $offset, Rule $rule = null) {
$this->string = $string;
$this->offset = $offset;
$this->rule = $rule;
list($line... | true |
a7270e71381038750e25b3e4fb3d84df85a04ad6 | PHP | chris-at-github/empire-vx | /app/Factories/Processors/PropertiesProcessor.php | UTF-8 | 319 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Factories\Processors;
class PropertiesProcessor extends FactoryProcessor {
/**
* @param object $object
* @param array $data
* @param array $configuration
* @return object
*/
public function process($object, $data, $configuration = []) {
$object->fill($data);
return $object;
}
} | true |
79e2ccac3b3bad2b3e9888d7a89511c14f5d85dd | PHP | WestAMZ/PhpProject | /model/archivo.php | UTF-8 | 7,024 | 2.890625 | 3 | [] | no_license | <?php
include_once(MODELS_DIR . 'subcategoria.php');
class Archivo
{
var $id_archivo;
var $nombre;
var $fecha_subida;
var $descripcion;
var $id_subcategoria;
var $id_usuario;
var $estado;
function __construct(){}
function contructor($i... | true |
8a2af64dbf4361eb343b72c612715acbdac6d6a6 | PHP | Hungnguyen999/PHPAdvanced_ShopGame | /application/controllers/userController.php | UTF-8 | 3,567 | 2.546875 | 3 | [] | no_license | <?php
class userController extends Controller {
public function Login()
{
unset($_SESSION['msgLogin']);
$error = array();
$user = $this->model("User");
$useremail = isset($_POST['username']) ? $_POST['username'] : '';
$userpassword = isset(... | true |
a9fc795648f0bb57a3a162e7b034e26e16af29f3 | PHP | Seb5000/Tienda | /pruebas/prueba7.php | UTF-8 | 2,113 | 2.796875 | 3 | [] | no_license | <pre>
<?php
include "redim.php";
/*
$nombre = $_SERVER['DOCUMENT_ROOT']."/tio/imagenes/categorias/imagenes/defecto.svg";
$info = getimagesize($nombre);
print_r($info);
if($info[2]==IMAGETYPE_WEBP){
echo "Es de tipo WEBP";
}else{
echo "No es WEBP";
}
$type = exif_imagetype($nombre);
print_r($type);
*/
/*
fun... | true |
97758b85d67eb04f2391a43dce52be5cb6741979 | PHP | StarnetTechnologies/winnerschapelowerri | /app/Http/Controllers/ServicesController.php | UTF-8 | 2,579 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use DateTime;
use App\Service;
use App\Matto\PushNotification;
class ServicesController extends Controller
{
public function store(Request $request){
$this->validate($request,[
'title' => 'required',
'day' => 'require... | true |
899fa1cf09f9d1bf2dda4e0e285bca3c2a27a4fc | PHP | NikitaDev14/booker | /Controllers/BaseController.php | UTF-8 | 472 | 2.6875 | 3 | [] | no_license | <?php
namespace Controllers;
class BaseController extends \BaseRegular
{
protected $form; // http form from user
protected $user;
protected $admin;
protected $nextPage;
public function __construct($form)
{
parent::__construct();
$this->form = $form;
$this->user = $this->objFactory
->get... | true |
50d4e60e45fb872a31f2ecda493a68d3b20c550a | PHP | wtsanshou/AllProjects | /KTTN/KttnClientManagement_php/management/Business/client.php | UTF-8 | 1,685 | 2.734375 | 3 | [] | no_license | <?php
/*
* Created on 2013-1-9
*
* get client infomation from database, and put them into a table.
* In this table, manager could modify, delete the admin user and regist member card.
* staff could modify the admin user and regist member card.
*/
/*start a session*/
session_start();
?>
<h1>客户信息</h1>
<ta... | true |
203fa4d523a2b3e34be197686a4fd0bb30d1fabe | PHP | Peter1007/epoll_socket | /command.php | UTF-8 | 1,252 | 3.0625 | 3 | [] | no_license | <?php
/**
* 普通客户端
*
* @package server
* @author linchg
* @version 0.1
* @filesource
*/
error_reporting(E_ALL);
$host = '192.168.7.163';
$port = 9000;
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
if ($socket === false) {
echo "socket_create() failed: reason: " . socket_strerror(socket_last_error()) ... | true |
10c4c4b09502d0041be41afe98013c7cc2d6c256 | PHP | Moftster/CodeKatas | /PHP/6 kyu/odd-occurence/index.php | UTF-8 | 624 | 4.03125 | 4 | [] | no_license | <?php
function matchingCharacters($feed) {
$noOfCharacters = sizeof($feed)-1;
$count = 0;
for($i=0; $i<=$noOfCharacters; $i++) {
echo "This is the for X loop " . $i . "<br>";
for($j=0; $j<=$noOfCharacters; $j++) {
echo "This is the for J loop " . $j . "<br>";
if($feed[$i]==$f... | true |
2be1b51058c46df842fca86ac44d0154070c66be | PHP | ryknow0/INFO3426 | /Assignment_7/calendar/index.php | UTF-8 | 2,086 | 2.828125 | 3 | [] | no_license | <?php
session_start();
require('../model/calendar_db.php');
//Check and try to get the action value of the post, then from the get
$action = filter_input(INPUT_POST, 'action');
if ($action == NULL) { // if no action is pased in teh POST then grab the action from the Get
//if an action is passes set it to th... | true |
35d2e5264b455edfe87a37b98620ba789dab6e1d | PHP | Ranjitha10/Work-dairy | /wd/dd.php | UTF-8 | 3,433 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | <?php
//***************************************
// This is downloaded from www.plus2net.com //
/// You can distribute this code with the link to www.plus2net.com ///
// Please don't remove the link to www.plus2net.com ///
// This is for your learning only not for commercial use. ///////
//The author is not responsibl... | true |
2bdd6bacf16c6fc152fd5980006fd5e14eaf585c | PHP | tech-nik89/lpm4 | /mod/default/server/gameq/GameQ/Protocol/ase.php | UTF-8 | 3,363 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of GameQ.
*
* GameQ is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* GameQ is distrib... | true |
981f83d71abe849e792cb5350f8a84feffd9a06d | PHP | jfsfelipe2011/design-patterns | /Behavioral/Memento/src/Chamado.php | UTF-8 | 1,067 | 3.171875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App;
class Chamado
{
/** @var State */
private $statusAtual;
/**
* Chamado constructor.
*/
public function __construct()
{
$this->statusAtual = new State(State::CRIADO);
}
/**
* Seta status aberto
*/
public functi... | true |
7eb26f2df8abbdd4656282c0d0458877135827ce | PHP | acardosodev/acardoso.dev | /vendor/sycho/flarum-profile-cover/src/CoverValidator.php | UTF-8 | 1,102 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace SychO\ProfileCover;
use Flarum\Foundation\AbstractValidator;
use Flarum\Settings\SettingsRepositoryInterface;
use Illuminate\Validation\Factory;
use Illuminate\Contracts\Events\Dispatcher;
use Symfony\Component\Translation\TranslatorInterface;
class CoverValidator extends AbstractValidator
{
/**
... | true |
2f82d253b8a2d29fad0b9ee8f941aace0aa89dd0 | PHP | jiyauddin535/syntax | /api/test.php | UTF-8 | 737 | 2.640625 | 3 | [] | no_license | <?php
$dbname = 'syntax_note';
$dbuser = 'syntax_note';
$dbpass = 'syntax@123';
$dbhost = 'localhost';
$con = mysqli_connect("localhost","syntax_note","syntax@123","syntax_note");
//print_r($con) ;
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}... | true |
3818cd749759d4e61a5f7a12a5b3ff1e6214a615 | PHP | tghelere/CL | /database/migrations/2018_04_21_120350_create_budgets_table.php | UTF-8 | 1,052 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateBudgetsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('budgets', funct... | true |
22da5d045ddb94579e05a67f3501da0ca32a157b | PHP | gamehacker/IBTeam-CTF-Scoreboard | /partials/profile/profile2.php | UTF-8 | 3,445 | 2.515625 | 3 | [] | no_license | <div class="col-md-8">
<h2>About <?=$data['username']?> </h2>
<table class="table well table-striped table-condensed">
<thead>
<tr>
<th>Team</th>
<th>Points</th>
<!-- <th>Total Submit</th> -->
<th>Status</th>
</tr>
... | true |
a73e59eb43291f6043f139319b7961c8a93cc332 | PHP | alhames/phphelper | /src/SiteMap/AbstractSiteMap.php | UTF-8 | 1,310 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the PHP Helper package.
*
* (c) Pavel Logachev <alhames@mail.ru>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PhpHelper\SiteMap;
/**
* Class AbstractSiteMap.
*/
abstract class Abstr... | true |
897c5f71938451c15e16d5163ad414b55f81ad6a | PHP | mithunmo/phpsample | /libraries/system/system.class.php | UTF-8 | 12,146 | 2.546875 | 3 | [] | no_license | <?php
/**
* system.class.php
*
* Scorpio Framework System File
*
* @author Dave Redfern
* @copyright Dave Redfern (c) 2007-2010
* @package scorpio
* @subpackage system
* @version $Rev: 845 $
*/
/*
* Load dependencies
*/
require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'exception.class.php');
/**
* ... | true |
2bbd19e8f7c869bd34db89371f9fda791fb026d6 | PHP | Clarence-pan/test | /protected/controllers/TestAsyncController.php | UTF-8 | 9,150 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: panchangyun
* Date: 14-9-20
* Time: 上午9:43
*/
class AsyncRunner extends Thread{
public function __construct($func, $params){
$this->func = $func;
$this->params = $params;
}
public function run(){
$this->result = call_user_func_array($thi... | true |
c2b9b538195dc829358eb0917f505cc6a9dc788f | PHP | hodoor6/MarlinOOPintensiv | /Components/ValidateTESTED.php | UTF-8 | 9,486 | 2.921875 | 3 | [] | no_license | <?php
//require $_SERVER['DOCUMENT_ROOT'] . '/Components/DataBase.php';
//
//class Validate
//{
//
// // $passed = false успешное прохождение проверки
// //$erorrs = [] сбор ошибок в масив
// private $passed = false, $erorrs = [], $db = null;
//
// public function __construct()
// {
// //подключен... | true |
5c93a5b708a89169c423e9d66e1a46d2112c6085 | PHP | ambulong/phphoney | /manage.php | UTF-8 | 12,167 | 2.6875 | 3 | [] | no_license | <?php
$zHPManageObj = new zHPManage();
$zHPManageObj->init();
class zHPManage{
private $dbname = 'hbdata.dat'; //shell保存地址
private $shortopts = '';
private $longopts = array(
'add::',
'comment::',
'ls',
'rm::',
'id:... | true |
33b64fe4474e64948941f7b0155ad2d788b74de3 | PHP | thegr8shoaib/itc | /app/Http/Middleware/Subscribed.php | UTF-8 | 631 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware;
use Closure;
use Auth;
use App\User;
class Subscribed
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
... | true |
bde20aee4e4ce2c7e0978225cbfedda625412b60 | PHP | TsSaltan/ts-framework | /ts-plugins/parser/module/Parser.php | UTF-8 | 7,757 | 2.75 | 3 | [] | no_license | <?php
namespace tsframe\module;
use tsframe\exception\ParserException;
class Parser{
/**
* Curl resourse
*/
protected $ch = null;
/**
* Curl params
* @var array
*/
protected $params = [];
/**
* Queries log
* @var array[ ['GET|POST URL'] ]
*/
protected $queries = [];
/**
* 0 - ничего не ло... | true |
740ed137c5cc9fa30786ae29ec960e36e15a57f7 | PHP | william251082/php-assessments | /phpassessment/src/thesaurus.php | UTF-8 | 1,085 | 3.328125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: williamdelrosario
* Date: 2/8/18
* Time: 2:10 PM
*/
namespace TDD;
class Thesaurus
{
private $thesaurus;
function Thesaurus($thesaurus)
{
$this->thesaurus = $thesaurus;
}
public function getSynonyms($word)
{
$ret=array();
... | true |
3dacff88c248e7b15327df9118f81e8a2e1aa951 | PHP | MFGInfo/igreja | /models/lista/localidade.model.php | UTF-8 | 3,267 | 2.578125 | 3 | [] | no_license | <?php
require_once("../persistencia.php");
class Localidade extends Persistencia
{
public $Codigo;
public $Nome;
public $Tipo;
public $Anciao;
public $Diacono;
public $Cooperador;
public $Cooperador_Jovem;
public $Encarregado;
public $Dias_Culto;
public $Dias_Culto_Jovem;
p... | true |
e7b213d1108bd0d5856983144577ebfe859876c6 | PHP | orkestra/OrkestraReportBundle | /Command/DebugCommand.php | UTF-8 | 3,008 | 2.609375 | 3 | [] | no_license | <?php
namespace Orkestra\Bundle\ReportBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand,
Symfony\Component\Console\Input\InputArgument,
Symfony\Component\Console\Input\InputInterface,
Symfony\Component\Console\Output\OutputInterface;
/**
* Displays a list of reports which ... | true |
5f0323ea26c36985af39d5d1ee3eabebbf9f83e4 | PHP | ronenadam/inv-tool | /php/common.php | UTF-8 | 3,406 | 3.328125 | 3 | [] | no_license | <?php
// Get a connection to the database.
function getConnection() {
$host = "localhost";
$user = "inv_user";
$pass = "inv123";
$db = "invdemo";
$connection = @mysqli_connect($host, $user, $pass, $db);
if (mysqli_connect_errno()) {
// TODO Log error to file? ... | true |
7222fdea1eaa61aaab43c21cde338dae1457c6f6 | PHP | jmhobbs/storytlr | /protected/library/Stuffpress/View/Helper/Application.php | UTF-8 | 752 | 2.8125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Stuffpress_View_Helper_Application
{
/**
* Returns site base url
*
* $file is appended to the base url for simplicity
*
* @param string $file
* @return string
*/
public function application()
{
return $this;
}
public function username()
{
$application = Stuffpress_Application::get... | true |
b6072e90b4bee1c2e55524eab212e69796e0c959 | PHP | iulianbeleiu/consolidated-php-world | /src/Classes/Generators/SendingValueGenerator.php | UTF-8 | 419 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Classes\Generators;
use Generator;
use App\Contracts\GeneratorInterface;
class SendingValueGenerator implements GeneratorInterface
{
/**
* @inheritDoc
*/
public function getRange(int $max): Generator
{
for ($i = 1; $i < $max; $i++) {
$injected = yield $i... | true |
2031f0ece91ee0368aea876418ee400ea9685dc0 | PHP | anat369/CRUD-service | /app/Http/Controllers/ItemController.php | UTF-8 | 2,603 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\History;
use App\Item;
use Illuminate\Http\Request;
class ItemController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return view('pages.index', [
... | true |
339eb1e770e527f85f2980bfe8679ed0275a2221 | PHP | keboola/php-storage-driver-bigquery | /src/QueryBuilder/QueryBuilderResponse.php | UTF-8 | 867 | 2.6875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Keboola\StorageDriver\BigQuery\QueryBuilder;
class QueryBuilderResponse
{
private string $query;
/**
* @var list<mixed>|array<string, mixed>
*/
private array $bindings;
/**
* @param list<array>|array<string, mixed> $bindings
*/
public ... | true |
ca1b866fd4308f9434281de97b98483fa23254e2 | PHP | taniaamalik/Web-Programming | /PraktikumPemweb/UTP/form3_process.php | UTF-8 | 960 | 2.59375 | 3 | [] | no_license | <?php
$jalurmasuk = ['155150201111320', '145150101131244', '165210401242122', '185220101248298', '175210105124343', '155220207704958'];
$jalur = $_POST['jalur'];
$Mandiri = [];
$SBM = [];
$SNM = [];
for($i = 0; $i < sizeof($jalurmasuk); $i++) {
$sub = substr($jalurmasuk[$i],7,3);
if($sub=='011'){
... | true |
999ba92c20726715be2cb89496a24ec1bec29b2e | PHP | fjugaldev/Utility | /examples/IteratorLimitExample.php | UTF-8 | 784 | 3.640625 | 4 | [
"MIT"
] | permissive | <?php
require realpath(__DIR__ . '/../') . '/vendor/autoload.php';
use Naucon\Utility\IteratorLimitAbstract;
// define iterator class
class YourIterator extends IteratorLimitAbstract
{
protected $_items = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21);
public function __cons... | true |
bb24af13a325ad38b1b48fd498abef9f283fe6cd | PHP | vaibhavantil/phabricator | /src/applications/differential/customfield/DifferentialManiphestTasksField.php | UTF-8 | 2,554 | 2.53125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
final class DifferentialManiphestTasksField
extends DifferentialCoreCustomField {
public function getFieldKey() {
return 'differential:maniphest-tasks';
}
public function getFieldKeyForConduit() {
return 'maniphestTaskPHIDs';
}
public function canDisableField() {
return false;
}
p... | true |
3e63fdddafff066afb80ef9f0c6b7c4f376ddf18 | PHP | StenFrancesco/roosteruren-new | /roosteruren/app/Models/UserDayIndex.php | UTF-8 | 3,655 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/**
* UserDayIndex
* - user
* - date
* - rooster
* - verlof
* - ziek
* - beschikbaarheid
*/
namespace App\Models;
use Illuminate\Support\Facades\DB;
class UserDayIndex {
public static function index_user_daterange($user, $from, $to) {
foreach (each_date($from, $to) as $date) {
self::index($user,... | true |
bf9ee12819378ed8895cf060dfe8de39ffe1706f | PHP | mlightvn/ci_userlist | /application/helpers/password_helper.php | UTF-8 | 3,352 | 3.296875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* This function used to generate the hashed password
* @param {string} $plainPassword : This is plain text password
*/
if(!function_exists('getHashedPassword'))
{
function getHashedPassword($plainPassword)
{
return hash('sha... | true |
9dfec244fc46f734f486863c877ebd5a7d9451e3 | PHP | ziovik/optimum_admin | /customer/handlers/requests_handler.php | UTF-8 | 5,273 | 2.796875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: daniel
* Date: 8/28/2018
* Time: 1:18 PM
*/
session_start();
include_once "../../inc/functions.php";
include_once "../../inc/db_functions.php";
include_once "../../db_objects/CustomerMessage.php";
include_once "../../db_objects/DistributorMessage.php";
$customer_id = isset... | true |
25cb71cf7f9b5bf2881e0dd66b971a1b18b730f3 | PHP | troikaitsulutions/templeadvisor | /protected/models/user/UserCreateForm.php | UTF-8 | 1,760 | 2.921875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* This is the model class for Create User.
*
* @package cms.models.user
*
*/
class UserCreateForm extends CFormModel
{
public $username;
public $display_name;
public $password;
public $email;
public $people_type;
public $people_id;
public $docs;
... | true |
ed718c930dd0d1022d16cdbbab4d339bd0d81848 | PHP | ihitbuttons/Classes_As_Services | /Platform/Traits/ValidateType_Trait.php | UTF-8 | 1,397 | 2.625 | 3 | [] | no_license | <?php
namespace Platform\Traits;
use \Platform\Exceptions\ValidateType_Exception;
trait ValidateType_Trait
{
private function validateType ($suppliedType, $value)
{
$this->logInfo(__METHOD__, "Called.");
$commaPosition = strpos($suppliedType, ",");
if ($commaPosition !== false) {
... | true |
51fa720c60c91754ca12bf501278a5e195c9e19a | PHP | poojakarthik/my-work | /lib/pdf/barcode/Flex_Pdf_Barcode_CODE128.php | UTF-8 | 11,652 | 3.09375 | 3 | [] | no_license | <?php
/**
* Flex_Pdf_Barcode_CODE128
*
* based on:
*
* Image_Barcode_code128 class
* from PEAR/Image_Barcode:
* @author Jeffrey K. Brown <jkb@darkfantastic.net>
* @copyright 2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version CVS: $Id: code128.php,v 1.3 2006/12/13 1... | true |
f1cd94db8c0895eb034ba863e891a88ef7c742b4 | PHP | ZornitsaSD/second_CI | /application/controllers/names.php | UTF-8 | 1,308 | 2.796875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Names extends CI_Controller{
public function __construct(){
parent::__construct();
$this->load->model('names_model');
}
public function show_all_names(){
//$this->load->model('names_model');
$data['all_names'] = $this->names_model->get_all_names();
$this->load->view('names/show_all_name... | true |
ef1981711fc1b97bc78a9608e1204abef906ba2f | PHP | Jiguli2101/php_tasks_hex | /buildDefinitionList.php | UTF-8 | 554 | 2.546875 | 3 | [] | no_license | <?php
$definitions = [
['Блямба', 'Выпуклость, утолщения на поверхности чего-либо'],
['Бобр', 'Животное из отряда грызунов'],
];
function buildDefinitionList($list)
{
$parts = [];
if (empty($list)) {
return '';
}
foreach ($list as $item) {
$parts[] = "<dt>{$it... | true |
731602bbcc1f66debcd7a210bb58d7274095d66a | PHP | jhned/Template-Library | /src/CategoryList.php | UTF-8 | 7,017 | 3.15625 | 3 | [] | no_license | <?php
namespace CNP\TemplateLibrary;
/**
* Class CategoryList
*
* @package CNP\TemplateLibrary
*
* Uses get_the_category_list() to return a comma-delimited list of category links wrapped in a paragraph.
*
* @link https://developer.wordpress.org/reference/functions/get_the_category_list/
*/
class CategoryLis... | true |
adc365c7cb88e5ada26fb6dd075d0e09afe3c895 | PHP | dachuange/yankeyixue | /Application/Common/Model/Scheme.class.php | UTF-8 | 668 | 2.53125 | 3 | [] | no_license | <?php namespace Common\Model;
use Think\Model;
class Scheme extends Model{
// 指定表名
protected $tableName="scheme";
// 自动验证 固定写法
protected $_validate=array(
array('title','require','名称不能为空'),
array('article','require','文章内容不能为空'),
);
// 自动添加
protected $_auto=array(
array('time','time',1,'function'... | true |
e63f114297551a6828ce7d376da1181083d7e924 | PHP | ChaotiZen/PHP_CH8_HW | /index.php | UTF-8 | 1,518 | 2.984375 | 3 | [] | no_license | <?php
//set default values to be used when page first loads
$userBet = 0;
$die1 = 0;
$die2 = 0;
$dieSum = 0;
$userBetError = "";
$AmountWon = 0.0;
//take action based on variable in POST array
//todo move all to POST!!!!!!!!!!!!
$action = filter_input(INPUT_POST, 'action');
switch ($action)
{
case 'process_game... | true |
951bfd8ad42abb9adc2880c57fe5a406bea9bb24 | PHP | Innmind/async-stream | /src/Readable/Async.php | UTF-8 | 2,896 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace Innmind\Async\Stream\Readable;
use Innmind\Stream\{
Readable,
Stream\Position,
Stream\Position\Mode,
};
use Innmind\Mantle\Suspend;
use Innmind\Immutable\{
Maybe,
Either,
};
final class Async implements Readable
{
private Readable $synchronous;
p... | true |
3c72c89d714f6e7123d5653d194bdc9e81885f8d | PHP | Zhandos94/project | /frontend/validators/ValidateNumeric.php | UTF-8 | 2,700 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by BADI.
* DateTime: 11.12.2016 14:10
*/
namespace frontend\validators;
use frontend\helpers\NumericHelper;
class ValidateNumeric extends AttributeValueValidator
{
private function className()
{
return 'ValidateNumeric';
}
public function execute()
{
$val... | true |
14738e61df53e356f18760c5b5493bf3e1fab6bf | PHP | l3l0/solve_test | /src/Cocoders/BookingLoans/Domain/LoanBalance.php | UTF-8 | 2,864 | 2.953125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Cocoders\BookingLoans\Domain;
use Cocoders\BookingLoans\Domain\Exception\CapitalAmountCannotBeNegative;
use Cocoders\BookingLoans\Domain\Exception\CapitalInterestAmountCannotBeNegative;
use Cocoders\BookingLoans\Domain\Exception\CommisionAmountCannotBeNegative;
use Cocoders\B... | true |
d56246155645d4c39dd7ce2bd346eb5e63131253 | PHP | Havenstd06/laravel-plex | /src/Traits/PlexAPI/Medias.php | UTF-8 | 3,482 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Havenstd06\LaravelPlex\Traits\PlexAPI;
use Psr\Http\Message\StreamInterface;
trait Medias
{
/**
* Get photo of specified height and width
*
* @param string $url
* @param int $width
* @param int $height
* @return array|StreamInterface|string
* @throws \Throwable
... | true |
149222ab5d2f5ca32b279b7321398f27421732f3 | PHP | dsctekhne/tekhne | /models/Workshop.php | UTF-8 | 5,622 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
class Workshop {
// DB
private $conn;
private $table = 'workshops';
public $id_workshop;
public $title;
public $quota;
public $id_instructor;
//Constructor with DB
public function __construct($db) {
$this->conn = $db;
}
// Insert new workshop
public functi... | true |
4aa07f8a86036db941bfb4ff515b40c75a9f3675 | PHP | dargles/comp2203-exampleSite | /comp2203-exampleSite/step5/library/template-page.php | UTF-8 | 1,159 | 2.671875 | 3 | [] | no_license | <?php
/**
* template-page.php is the template page for our website
*
* It calls and streams our top template, templateTop.html.
* The main centre section of this file makes space to stream the page content.
* Finally, it calls and streams our bottom template, templateBottom.html for the
* remainder of our bo... | true |
574418a9269eddfaee0af6d9490da7ecf2c57ae1 | PHP | mkotsovoulou/ITC4314Fall2020 | /twig/public/index.php | UTF-8 | 301 | 2.59375 | 3 | [] | no_license | <?php
require_once '../vendor/autoload.php';
/* Load the template directory */
$loader = new \Twig\Loader\FilesystemLoader('../templates');
$twig = new \Twig\Environment($loader);
/* now reference the template to use to display the data*/
echo $twig->render('home.twig', array('name' => 'Fabien')); | true |
2af69f1d8a272e80eac8ac75d9f8f14d16c77398 | PHP | martinsv/geo | /src/Doctrine/Functions/GreatCircleDistanceFunction.php | UTF-8 | 2,223 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace Brick\Geo\Doctrine\Functions;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\Lexer;
use Doctrine\ORM\Query\SqlWalker;
use Doctrine\ORM\Query\Parser;
/**
* Great circle distance function.
*
* This function calculates the distance between two points on the Earth, approxima... | true |
099de172f74269553fb0f1051ca4f90db5af616d | PHP | nevernet/phalcon-devtools | /ide/3.2.1/Phalcon/Validation/Validator/CreditCard.php | UTF-8 | 1,285 | 2.796875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Phalcon\Validation\Validator {
/**
* Phalcon\Validation\Validator\CreditCard
*
* Checks if a value has a valid credit card number
*
* <code>
* use Phalcon\Validation\Validator\CreditCard as CreditCardValidator;
*
* $validator->add(
* "creditCard",
* new CreditCardValidato... | true |
133f47344d6ba80797e52f8f9424ee56aaecd6e9 | PHP | ferdays/apotik | /entri-data/response.php | UTF-8 | 3,422 | 2.6875 | 3 | [] | no_license | <?php
//include db configuration file
$username = "root"; //mysql username
$password = ""; //mysql password
$hostname = "localhost"; //hostname
$databasename = 'apotik'; //databasename
//connect to database
$mysqli = new mysqli($hostname, $username, $password, $databasename);
include('../system/koneksi.php');
if(is... | true |
a8681c39ac7ba0c7459aea9d0923afb8a4685989 | PHP | zorille/php_framework | /flux/Zorille_framework_socket_serveur.class.php | UTF-8 | 6,503 | 2.921875 | 3 | [] | no_license | <?php
/**
* @author dvargas
* @package Lib
*
*/
namespace Zorille\framework;
/**
* class socket<br>
*
* Gere une socket reseau.
* @package Lib
* @subpackage Flux
*/
class socket_serveur extends abstract_log {
/**
* var privee
* @access private
* @var resource
*/
private $connexion;
/**
* var pr... | true |
68444ef9846e39160471ba1507e474675b82a9c3 | PHP | yzadorozhnaya/appliancesshop- | /app/Http/ViewComposers/ProductComposer.php | UTF-8 | 459 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\ViewComposers;
use App\Models\Cart;
use App\Models\Product;
use Illuminate\View\View;
class ProductComposer
{
public function compose(View $view) {
$cart = new Cart();
$ids=[];
foreach($cart->products as $product) {
$ids[] = $product['id'];
}
... | true |
449403715a9af927e9cf5343b176a61e6fa76f9f | PHP | Olegrio/module-search | /module search ver.1/SaveTourOrder.php | UTF-8 | 3,258 | 2.703125 | 3 | [] | no_license | <?
if(isset($_POST['sourceId'])) {
$sourceId = $_POST['sourceId'];
// echo $sourceId;
}
if(isset($_POST['offerId'])) {
$offerId = $_POST['offerId'];
// echo $offerId;
}
if(isset($_POST['requestId'])) {
$requestId = $_POST['requestId'];
// ec... | true |
32dafaf55c1752b1708b0a72785fc95b2aa9ee58 | PHP | iwantmymtv/kotelezo | /Validation.php | UTF-8 | 3,642 | 2.78125 | 3 | [] | no_license | <?php
require_once('User.php');
class Validator {
private $data;
private $files;
private $errors = [];
public function __construct($post_data,$files = null){
$this->data = $post_data;
$this->files = $files;
}
private function addError($key, $val){
$this->errors[$key] = $val;
}
public ... | true |
71729ea9a3b2e822061618e32ca36e49c60e37a3 | PHP | ear78/wp_practice_2 | /wp-content/themes/wppractice2/xtra-functions/shortcode-functions.php | UTF-8 | 1,046 | 2.734375 | 3 | [] | no_license | <?php
/*
* basic label and input shortcode to add input fields one at a time to create a form.
* if left blank, default values will be added
* shortcode takes (placeholder, for, id, label_name, label_class, input_class) attributes to be able to customize inputs and labels for total customization
* CSS can be target... | true |
4aff9d8c5f0cc8fab56b9312e57e4effe09ea23b | PHP | phpislove/dota2-api-client | /src/Dota/WebApi/Client.php | UTF-8 | 1,051 | 2.875 | 3 | [] | no_license | <?php namespace Dota\WebApi;
use GuzzleHttp\Client as GuzzleClient;
class Client {
/**
* @var string
*/
protected $key;
/**
* @var GuzzleClient
*/
protected $client;
/**
* @var integer
*/
const REQUEST_OK = 200;
/**
* @param string $key
* @param ... | true |
a6c372499a73abb44ab3bb6fc9ac9f03d145438a | PHP | Kenny254/paginationclass | /test.php | UTF-8 | 990 | 3 | 3 | [
"MIT"
] | permissive | <!-- TEST PAGE USING BOOTSTRAP -->
<!DOCTYPE html>
<html>
<head>
<title> Bootstrap Test </title>
<link rel='stylesheet' href='css/bootstrap.min.css'>
</head>
<body>
<section class='container-fluid'>
<section style='text-align:center;' class='jumbotron'>
<h1> Bootstrap Example </h1>
<?php
error_reporting(... | true |
6f2cb0e2b0c8f16631531b6dfcb5bbb47ff9b776 | PHP | sowbiba/com-com-formations | /src/Uploader/ImageUploader.php | UTF-8 | 1,207 | 3 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace App\Uploader;
use Symfony\Component\HttpFoundation\File\UploadedFile;
class ImageUploader
{
/**
* @var string
*/
private $uploadDirectory;
/**
* @var string
*/
private $publicDirectory;
/**
* @var string
*/
private $buildDirectory;
public fun... | true |
cde654004af542b8009840af0dd5eca1b32ba757 | PHP | Angelmbn/ToolSen | /model/MasterModel.php | UTF-8 | 1,183 | 2.6875 | 3 | [] | no_license | <?php
include '../lib/conf/Connection.php';
class MasterModel extends Connection {
public function insert($sql) {
$result=mysqli_query($this->getConnect(), $sql);
return $result;
}
public function consult($sql) {
$result=mysqli_query($this->getConne... | true |
f9c1e7f2d50ff10ca5785cb04f18c6f6cb276abb | PHP | gittieandpete/studio | /buchungaendern.php | UTF-8 | 3,733 | 2.59375 | 3 | [] | no_license | <?php
$titel = "Buchung ändern";
require('includes/functions.php');
require('includes/definitions.php');
require('../../../files/c-major/login_web330.php');
connect ();
session_start();
session_regenerate_id(true);
require('includes/head.php');
require('includes/kopf.php');
require('includes/navi.php'); ?... | true |
bc7b4f4a62cf79aa13538345b0f7dfc8cfaaf5cd | PHP | jojo080889/herogirl-theme | /classes/ComicPressNavigation.php | UTF-8 | 2,167 | 2.65625 | 3 | [] | no_license | <?php
require_once('ComicPressStoryline.php');
require_once('ComicPressDBInterface.php');
class ComicPressNavigation {
// @codeCoverageIgnoreStart
function init($storyline) {
$this->_storyline = $storyline;
$this->_dbi = ComicPressDBInterface::get_instance();
}
// @codeCoverageIgnoreEnd
funct... | true |
dff35edf701e15cd597e84ab53933c0cc2f4b6da | PHP | vikzh/lvl_up | /PHP_SQL_BASIC/Mini Projects/GuestBook.php | UTF-8 | 1,969 | 3.046875 | 3 | [] | no_license | <?php
$host = 'localhost';
$name = 'root';
$password = '';
$db_name = 'guestBook';
$link = mysqli_connect($host, $name, $password, $db_name) or die(mysqli_error($link));
if (isset($_POST['newAdd'])) {
$text = trim(strip_tags($_POST['review']));
$name = trim(strip_tags($_POST['name']));
$addQuery = "INSERT ... | true |
892e4376a8d92c03de9254cb706427ac5876e1c3 | PHP | jalexmelendez/citadel-framework | /src/Command/NewAdminCommand.php | UTF-8 | 6,423 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Command;
use App\Entity\User;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\Persistence\ManagerRegistry;
use RuntimeException;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Co... | true |
03932c73a4c3b6a5217a511ead09d3df6ea30e40 | PHP | kumewata/kogatter | /DontmindModel.php | UTF-8 | 1,420 | 2.765625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: watarukume
* Date: 2017/08/30
* Time: 8:48
*/
// 共通の関数ファイルを読み込み
include('./ModelBase.php');
/*
* 他ユーザーのポストへドンマイしているかどうか、0/1で返す。
*/
//function dontmind_check_count($db, $first, $second){
//
// $sql = "SELECT count(*) FROM dontmind_map
// WHERE post_id ='$firs... | true |
0bcd1191d1f1eb96038f4a4faf64b1e17c1bfbe0 | PHP | gaoolp/phpboot | /src/Docgen/Swagger/Schemas/LicenseObject.php | UTF-8 | 311 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace PhpBoot\Docgen\Swagger\Schemas;
class LicenseObject
{
/**
* Required. The license name used for the API.
* @var string
*/
public $name;
/**
* A URL to the license used for the API. MUST be in the format of a URL.
* @var string
*/
public $url;
} | true |
522e2447aa3f0aa51f23041e2d09b3aa7ef80c7e | PHP | mahayash315/mwitter | /mw_includes/controllers/api/tweet_controller.php | UTF-8 | 1,093 | 2.578125 | 3 | [] | no_license | <?php
require_once(dirname(__FILE__)."/../__includes__.php");
require_once(dirname(__FILE__)."/../authenticated_controller.php");
class TweetController extends AuthenticatedController {
function __before__($action) {
parent::__before__($action);
header("Content-Type: application/json; charset=utf-8");
}
f... | true |
89a2a261b37447db68f8c6e3d51a2f82a31fc118 | PHP | Nexample-G/Convert-Number-into-Words-in-PHP | /index.php | UTF-8 | 2,157 | 3.015625 | 3 | [] | no_license | // This is men Number
$No_men = 314.119;
// remove point and after point number
$No_all = $No_men;
$No_poi = $No_men;
$No_men = floor($No_men);
// this is number degits ! strlen() can give words or number in degits
$No_DEG = strlen($No_men);
// now need number revers ! you can revers any word or number revers usin... | true |
bfc5713a21df1862db9066a60c379d3e9834b418 | PHP | gm163com/wukongHRM | /App/Lib/Model/AppraisalTemplateModel.class.php | UTF-8 | 8,633 | 2.734375 | 3 | [] | no_license | <?php
/**
*
* 绩效考核模板 模型
* author:悟空HR
**/
class AppraisalTemplateModel extends Model{
/**
* 获取分页考核模板数据
**/
public function getAppraisalTemplate($p){
import('@.ORG.Page');
$count = $this->count();
$Page = new Page($count,15);
$show = $Page->show();
$appraisal_template_list = $this->or... | true |
08c45130579058abced6ba8c0662de7c61c2648c | PHP | vgergit/majister | /app/Http/Controllers/LessonsController.php | UTF-8 | 2,206 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Lesson;
use Illuminate\Http\Request;
class LessonsController extends Controller
{
public function __construct()
{
// Define authorisation, only restrict posting lessons for now
$this->middleware('auth')->except(['index','show']);
}
/**
... | true |
22847e8020ec6fe90c8e7cc2ea48f9e587edc25f | PHP | amaes1989/lghouthulst | /admin/bestellingen_per_event.php | UTF-8 | 2,663 | 2.625 | 3 | [] | no_license | <?php
include ("includes/header.php");
if(!$session->is_signed_in ()){
redirect ('login.php');
}
if(empty($_GET['id'])){
redirect ('events.php');
}
$event = Event::find_by_id ($_GET['id']);
$bestellingen = Bestelling::find_all();
$users = User::find_all ();
$eventstypesevents = EventTypeEvent::find_all ();
$ty... | true |
076295074209db33fecd2c2b2ebfdf3c2ac395e0 | PHP | dekadensiotak/absensi-uptdam | /app/table.php | UTF-8 | 3,195 | 2.59375 | 3 | [] | no_license | <?php
require_once "../db/db.php";
require_once "../function/function.php";
ob_start();
session_start();
if (!isset($_SESSION['username'])) header('location:login.php');
$no = 1;
$absen = tampilkan_absen();
$karyawan = tampilkan_karyawan();
if (isset($_POST['filter'])) {
$no_induk = $_POST['nama'];
$bulan = $_P... | true |
91cf7697be2b8ee31b65f8eb092e3e2a7f27a829 | PHP | Hrushabhs/PHP | /obj.php | UTF-8 | 337 | 3.265625 | 3 | [] | no_license | <?php
class myClass{
public $name = "My name is Hrushabh";
public function showName(){
return($this->name);
}
}
$obj = new myClass;
echo '<br>'.$obj->showName();
echo '<br>'.$obj->showName();
echo '<br>'.$obj->showName();
define("Hrushi","Hello Guys my name is KingHR");
echo '<... | true |
c44b5e4be67ce19fa8c78465e61868cab9f704df | PHP | danielfsousa/DaniPress | /registrar.php | UTF-8 | 3,282 | 2.796875 | 3 | [] | no_license | <?php
include_once "includes/db.php";
include "includes/header.php";
global $conexao;
if(isset($_SESSION['funcao'])) {
header("Location: admin/perfil.php");
}
if(isset($_POST['registrar'])) {
$usuario = mysqli_real_escape_string($conexao, $_POST['usuario']);
$email = mysqli_real_escape_string($conexao,... | true |
b0c4b67a8ca5af463ceeeb04c5510477b34ed055 | PHP | zabolserg/wbc | /app/Views/Load.php | UTF-8 | 433 | 2.90625 | 3 | [] | no_license | <?php
namespace App\Views;
class Load
{
private $response;
public function __construct($name)
{
$file = __DIR__ . '/' . $name . '.html';
if (file_exists($file)) {
$this->response = file_get_contents($file);
} else {
$this->response = 'No view ... | true |
fc026b1186138b2cafc273cb075aec709ccf928b | PHP | luigif/WsdlToPhp | /samples/xignite-chart/Draw/XiChartServiceDraw.php | UTF-8 | 45,885 | 2.65625 | 3 | [] | no_license | <?php
/**
* Class file for XiChartServiceDraw
* @date 08/07/2012
*/
/**
* Class XiChartServiceDraw
* @date 08/07/2012
*/
class XiChartServiceDraw extends XiChartWsdlClass
{
/**
* Method to call DrawCapitalizationChartPresetByDate
* Meta informations :
* - documentation : Draw a preset historical market ca... | true |
db9be538e9bf0d71e607bfbf2df317a58ebadfb6 | PHP | jvloo/investbook | /application/controllers/Analysis-1.php | UTF-8 | 11,047 | 2.609375 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Analysis extends CI_Controller
{
public function comment()
{
$root = FCPATH;
$videoId = $this->input->post('videoId');
$commentId = $this->input->post('commentId');
// $videoId = 2;
// $commentId = 1;
/**
* Run se... | true |
4c84f9a0546fb2e3b87d04b5aa5f1a3563f96b6d | PHP | doublemid/untitled | /application/models/model_tasks.php | UTF-8 | 2,720 | 2.765625 | 3 | [] | no_license | <?php
class Model_Tasks extends Model{
protected $num=3;
public function getCountPages(){
$stmt = $this->pdo->query("SELECT COUNT(*) FROM listing_task")->fetch(PDO::FETCH_NUM);
$result= $stmt[0];
$pages=0;
for($i = 0; $i < $result; $i+=$this->num){
$pages... | true |
d67aea8c673d41f807d6aa7474cc2a47a62932ed | PHP | tomcobley/photos | /api/lib/fn-generate-thumbnails.php | UTF-8 | 1,160 | 2.875 | 3 | [] | no_license | <?php
function generateThumbnail($sourcePath, $destPath, $width, $height) {
$image = imagecreatefromjpeg($sourcePath);
$thumb_width = $width;
$thumb_height = $height;
$width = imagesx($image);
$height = imagesy($image);
$original_aspect = $width / $height;
$thumb_aspect = $thumb_width / $thumb_height;... | true |
cc705c3ac345e94f5ed7cab17c1b6e13021c3071 | PHP | chitanka/traduktor | /protected/models/Chapter.php | UTF-8 | 12,059 | 2.609375 | 3 | [
"Beerware"
] | permissive | <?php
/**
* @property Book $book
*
* @property string $url via getUrl()
* @property string $ahref via getAhref()
* @property string deniedWhy via getDeniedWhy()
* @property string errorsString via getErrorsString()
*/
class Chapter extends CActiveRecord {
public static function model($className=__CLASS__) {
r... | true |
5bcaeac87eeb19dbac34ac4d6ea3a4fe1618a23f | PHP | OpenStackweb/openstack-org | /marketplace/code/application/assemblers/ConsultantAssembler.php | UTF-8 | 3,140 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Copyright 2014 Openstack Foundation
* 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 ... | true |
ef8ed06a9fd1b806500e3c39fefd85b27cd8ba86 | PHP | ifedko/url-shortener | /public/app/src/AppCore/Database/MysqlAdapter.php | UTF-8 | 1,469 | 3.125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace AppCore\Database;
use AppCore\Database\Exception\DatabaseAdapterException;
class MysqlAdapter implements DatabaseAdapterInterface
{
/**
* @var string
*/
private $dsn;
/**
* @var string
*/
private $username;
/**
* @var string
*/
private $password... | true |
b0811ab334b5084910646023d9b4dd086280ba9a | PHP | nandanprac/capi | /src/ConsultBundle/Response/QuestionCommentResponse.php | UTF-8 | 2,592 | 2.703125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: anshuman
* Date: 19/06/15
* Time: 16:10
*/
namespace ConsultBundle\Response;
use ConsultBundle\Entity\QuestionComment;
class QuestionCommentResponse extends ConsultResponseObject
{
private $text;
private $identifier;
private $votes;
private $vote=0;
... | true |
685f3c34019f125719a76702297b64e26cc79f1f | PHP | nikolas/Aktive-Merchant | /lib/support/GatewaySupport.php | UTF-8 | 2,106 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
require_once "../merchant.php";
class GatewaySupport
{
private $supported_gateways = array();
private $actions = array("purchase", "authorize", "capture", "void", "credit", "recurring");
public function __construct()
{
$dir_path = realpath('../merchant/billing/gateways');
if ($... | true |
bea118986bb927e6d1a3af1b6ccd8675a5f483d9 | PHP | IndDev-Corp/belajar-repository-pattern | /app/Repositories/FinanceCategoryRepository.php | UTF-8 | 1,645 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\Models\FinanceCategory;
use Illuminate\Support\Collection;
class FinanceCategoryRepository
{
/**
* get all data
*
* @return Collection
*/
public function all()
{
return FinanceCategory::all();
}
/**
* store data to db
... | true |
7658521c4383fc6ef7f81ade46210be79f596fad | PHP | 243773041/model | /app/admin/controller/login.php | UTF-8 | 3,309 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: 24377
* Date: 2017/8/2
* Time: 20:10
*/
namespace app\admin\controller;
use houdunwang\core\Controller;
use Gregwar\Captcha\CaptchaBuilder;
use houdunwang\view\View;
use system\model\User;
class login extends Controller{
// 登录页面
public function index(){
// ... | true |
1e4db6c51e0b1a6c1b6376090c38fc26a80e80c4 | PHP | gitlovejoy/programs | /sorting/simpleSort.php | UTF-8 | 387 | 3.28125 | 3 | [] | no_license | <?php
$arr=array( '2','4','1','3');
$data=simpleSort($arr);
print_r($data);
function simpleSort($data){
for($i=0;$i<count($data);$i++){
for($j=$i+1;$j<count($data);$j++){
echo "i=$i;j=$j\t";
if($data[$i]>$data[$j]){
$temp=$data[$j];
$data[$j]=$data[$i];
$data[$i]=$temp;
... | true |
4dff3627db91c36a76e97f626ff321f5dee40387 | PHP | object8421/ky | /uc/uc/ucweb/Lib/Model/CommonModel.class.php | UTF-8 | 2,361 | 2.578125 | 3 | [] | no_license | <?php
/**
* CommonModel (基础模型)
*
* @author Cunzhang QQ:303918662 <http://www.balns.com>
* @copyright Copyright (c) 2012 Diexun(http://www.diexun.com)
*/
class CommonModel extends MongoModel {
//自动填充设置
protected $_auto = array(
array('id', 'getNextId', 1, 'callback'),
);
/**
* 获取并格式化自增ID
... | true |
a17ad949f08e0615d0d957bf80920e1464c76e3a | PHP | navyateja-marripelli/php-basics | /OOPs/03-private-class.php | UTF-8 | 511 | 3.65625 | 4 | [] | no_license | <?php
class User
{
private $name;
private $email;
public function __construct($name, $email)
{
$this->name = $name;
$this->email = $email;
}
private function getName(){
return $this->name;
}
private function getEmail(){
return $this->email;
}
p... | true |
89779df644a22a8f2b30808b47a527cb2c0b3422 | PHP | avinash2115/zentry | /zentry-api/app/Components/Sessions/ValueObjects/Progress/Payload.php | UTF-8 | 2,278 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Components\Sessions\ValueObjects\Progress;
use App\Components\Sessions\Session\Poi\PoiReadonlyContract;
use App\Components\Sessions\Session\SessionReadonlyContract;
use App\Components\Users\Participant\Goal\GoalReadonlyContract;
use App\Components\Users\Participant\Goal\Tracker\TrackerReadonlyCont... | true |
e507e3b6793d4da52610e38e4234e8e9a0ef3c16 | PHP | ruibarbosareb/thrust_rebortec | /Fields/Time.php | UTF-8 | 441 | 2.71875 | 3 | [] | no_license | <?php
namespace Rebortec\Thrust\Fields;
class Time extends Text
{
protected $withSeconds;
public function withSeconds($withSeconds = true)
{
$this->withSeconds = $withSeconds;
return $this;
}
protected function getFieldType()
{
return 'time';
... | true |
33b236a08db2651fb48050c3b6c482279b6b3517 | PHP | abarretti/AnthonyBarrettiSilexBootstrap4 | /app/ABS/PythonGateway.php | UTF-8 | 654 | 2.578125 | 3 | [] | no_license | <?php
namespace ABS;
class PythonGateway {
private $url = 'http://127.0.0.1:8080/';
// private $url = 'http://anthonybarretti.com:8080';
private $data = ['key' => 'DarthSkywalker456'];
public function run() {
$options = [
'http' => [
'header' => "Content-type: application/x-www-form-urlenc... | true |
e628f70a20341f3e7d0b64a5fe09fb0df64d701d | PHP | psevdo/sh | /repositories/SqlEmployeeRepository.php | UTF-8 | 4,804 | 2.78125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Psevdo
* Date: 07.11.2017
* Time: 9:48
*/
namespace app\repositories;
use app\entities\employee\Address;
use app\entities\employee\Employee;
use app\entities\employee\EmployeeId;
use app\entities\employee\Name;
use app\entities\employee\Phone;
use app\entities\employee\P... | true |