This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace backend\widgets; | |
use yii\helpers\Html; | |
/** | |
* PageSize widget is an addition to the \yii\grid\GridView that enables | |
* changing the size of a page on GridView. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace backend\components; | |
class DiskStatus { | |
const RAW_OUTPUT = true; | |
private $diskPath; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace backend\helpers; | |
use Yii; | |
use yii\db\Query; | |
use yii\base\Object; | |
use SitemapPHP\Sitemap; | |
/** | |
* | |
* This is based on https://github.com/evert/sitemap-php/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace backend\components; | |
class XmlToJson { | |
public function Parse ($url) { | |
$fileContents= file_get_contents($url); | |
$fileContents = str_replace(array("\n", "\r", "\t"), '', $fileContents); | |
$fileContents = trim(str_replace('"', "'", $fileContents)); | |
$simpleXml = simplexml_load_string($fileContents); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace backend\components; | |
/** | |
* File: Browser.php | |
* Typical Usage: | |
* | |
* $browser = new Browser(); | |
* if( $browser->getBrowser() == Browser::BROWSER_FIREFOX && $browser->getVersion() >= 2 ) { | |
* echo 'You have FireFox version 2 or greater'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Server setup for Ubuntu 16.04 on Digital Ocean | |
**The setup installs the following software:** | |
* Nginx | |
* MySQL | |
* PHP | |
* Node | |
* Composer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace backend\assets; | |
use yii\web\AssetBundle; | |
use yii\web\View; | |
/** | |
* Class AngularAsset | |
*/ | |
class AngularAsset extends AssetBundle | |
{ | |
public $sourcePath = '@bower/angular/'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace backend\components; | |
class FacebookDebugger | |
{ | |
/* | |
* https://developers.facebook.com/docs/opengraph/using-objects | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace backend\components; | |
/** | |
* File: Countires.php | |
* Last Modified: July 22nd, 2016 | |
* | |
* Typical Usage: | |
* | |
* $countries = (new Countries())->getAll(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace backend\components; | |
class Nationalities | |
{ | |
/** | |
* List all the nationalities as an array format. | |
* | |
* @param null | |
* @return array |
OlderNewer