#186 -- Add "sent to autodj" flag to media to avoid double-cues.

This commit is contained in:
Buster Silver 2017-07-19 01:52:49 -05:00
parent 6757d21ebe
commit 6b7b1bba9a
24 changed files with 4763 additions and 31 deletions

1
.gitignore vendored
View File

@ -10,7 +10,6 @@ app/modules/frontend/controllers/UtilController.php
# Junk/cache files.
*Thumbs.db
tmp/cache/*---*
app/models/Proxy/*.php
*.DS_Store
*.apdisk
.vagrant

View File

@ -37,7 +37,7 @@ return function (\Slim\Container $di, $settings) {
$options = [
'autoGenerateProxies' => !APP_IN_PRODUCTION,
'proxyNamespace' => 'Proxy',
'proxyPath' => APP_INCLUDE_TEMP . '/proxies',
'proxyPath' => APP_INCLUDE_BASE . '/models/Proxy',
'modelPath' => APP_INCLUDE_BASE . '/models',
'conn' => [
'driver' => 'pdo_mysql',
@ -52,6 +52,8 @@ return function (\Slim\Container $di, $settings) {
]
];
\Doctrine\Common\Proxy\Autoloader::register($options['proxyPath'], $options['proxyNamespace']);
// Fetch and store entity manager.
$config = new \Doctrine\ORM\Configuration;
@ -69,12 +71,16 @@ return function (\Slim\Container $di, $settings) {
$metadata_driver = $config->newDefaultAnnotationDriver($options['modelPath']);
$config->setMetadataDriverImpl($metadata_driver);
/** @var \Redis $redis */
$redis = $di['redis'];
$redis->select(2);
if (APP_IN_PRODUCTION) {
/** @var \Redis $redis */
$redis = $di['redis'];
$redis->select(2);
$cache = new \App\Doctrine\Cache\Redis;
$cache->setRedis($redis);
$cache = new \App\Doctrine\Cache\Redis;
$cache->setRedis($redis);
} else {
$cache = new \Doctrine\Common\Cache\ArrayCache;
}
$config->setMetadataCacheImpl($cache);
$config->setQueryCacheImpl($cache);

View File

@ -0,0 +1,39 @@
<?php
namespace Migration;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20170719045113 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema)
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE song_history ADD sent_to_autodj TINYINT(1) NOT NULL');
}
public function postUp(Schema $schema)
{
$this->connection->exec('UPDATE song_history SET sent_to_autodj=1 WHERE timestamp_cued != 0 AND timestamp_cued IS NOT NULL');
}
/**
* @param Schema $schema
*/
public function down(Schema $schema)
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE song_history DROP sent_to_autodj');
}
}

View File

@ -0,0 +1,294 @@
<?php
namespace Proxy\__CG__\Entity;
/**
* DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
*/
class Analytics extends \Entity\Analytics implements \Doctrine\ORM\Proxy\Proxy
{
/**
* @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with
* three parameters, being respectively the proxy object to be initialized, the method that triggered the
* initialization process and an array of ordered parameters that were passed to that method.
*
* @see \Doctrine\Common\Persistence\Proxy::__setInitializer
*/
public $__initializer__;
/**
* @var \Closure the callback responsible of loading properties that need to be copied in the cloned object
*
* @see \Doctrine\Common\Persistence\Proxy::__setCloner
*/
public $__cloner__;
/**
* @var boolean flag indicating if this object was already initialized
*
* @see \Doctrine\Common\Persistence\Proxy::__isInitialized
*/
public $__isInitialized__ = false;
/**
* @var array properties to be lazy loaded, with keys being the property
* names and values being their default values
*
* @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties
*/
public static $lazyPropertiesDefaults = [];
/**
* @param \Closure $initializer
* @param \Closure $cloner
*/
public function __construct($initializer = null, $cloner = null)
{
$this->__initializer__ = $initializer;
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @param string $name
*/
public function __get($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]);
return parent::__get($name);
}
/**
* {@inheritDoc}
* @param string $name
* @param mixed $value
*/
public function __set($name, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]);
return parent::__set($name, $value);
}
/**
* {@inheritDoc}
* @param string $name
* @return boolean
*/
public function __isset($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]);
return parent::__isset($name);
}
/**
*
* @return array
*/
public function __sleep()
{
if ($this->__isInitialized__) {
return ['__isInitialized__', 'id', 'station_id', 'type', 'timestamp', 'number_min', 'number_max', 'number_avg', 'station'];
}
return ['__isInitialized__', 'id', 'station_id', 'type', 'timestamp', 'number_min', 'number_max', 'number_avg', 'station'];
}
/**
*
*/
public function __wakeup()
{
if ( ! $this->__isInitialized__) {
$this->__initializer__ = function (Analytics $proxy) {
$proxy->__setInitializer(null);
$proxy->__setCloner(null);
$existingProperties = get_object_vars($proxy);
foreach ($proxy->__getLazyProperties() as $property => $defaultValue) {
if ( ! array_key_exists($property, $existingProperties)) {
$proxy->$property = $defaultValue;
}
}
};
}
}
/**
*
*/
public function __clone()
{
$this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []);
}
/**
* Forces initialization of the proxy
*/
public function __load()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __isInitialized()
{
return $this->__isInitialized__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitialized($initialized)
{
$this->__isInitialized__ = $initialized;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitializer(\Closure $initializer = null)
{
$this->__initializer__ = $initializer;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __getInitializer()
{
return $this->__initializer__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setCloner(\Closure $cloner = null)
{
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific cloning logic
*/
public function __getCloner()
{
return $this->__cloner__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
* @static
*/
public function __getLazyProperties()
{
return self::$lazyPropertiesDefaults;
}
/**
* {@inheritDoc}
*/
public function calculateFromArray($number_set)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'calculateFromArray', [$number_set]);
return parent::calculateFromArray($number_set);
}
/**
* {@inheritDoc}
*/
public function __call($method, $arguments)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__call', [$method, $arguments]);
return parent::__call($method, $arguments);
}
/**
* {@inheritDoc}
*/
public function offsetExists($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetExists', [$offset]);
return parent::offsetExists($offset);
}
/**
* {@inheritDoc}
*/
public function offsetSet($key, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetSet', [$key, $value]);
return parent::offsetSet($key, $value);
}
/**
* {@inheritDoc}
*/
public function offsetGet($key)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetGet', [$key]);
return parent::offsetGet($key);
}
/**
* {@inheritDoc}
*/
public function offsetUnset($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetUnset', [$offset]);
return parent::offsetUnset($offset);
}
/**
* {@inheritDoc}
*/
public function fromArray(\Doctrine\ORM\EntityManager $em, $source)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'fromArray', [$em, $source]);
return parent::fromArray($em, $source);
}
/**
* {@inheritDoc}
*/
public function toArray(\Doctrine\ORM\EntityManager $em, $deep = false, $form_mode = false)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', [$em, $deep, $form_mode]);
return parent::toArray($em, $deep, $form_mode);
}
}

View File

@ -0,0 +1,294 @@
<?php
namespace Proxy\__CG__\Entity;
/**
* DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
*/
class ApiKey extends \Entity\ApiKey implements \Doctrine\ORM\Proxy\Proxy
{
/**
* @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with
* three parameters, being respectively the proxy object to be initialized, the method that triggered the
* initialization process and an array of ordered parameters that were passed to that method.
*
* @see \Doctrine\Common\Persistence\Proxy::__setInitializer
*/
public $__initializer__;
/**
* @var \Closure the callback responsible of loading properties that need to be copied in the cloned object
*
* @see \Doctrine\Common\Persistence\Proxy::__setCloner
*/
public $__cloner__;
/**
* @var boolean flag indicating if this object was already initialized
*
* @see \Doctrine\Common\Persistence\Proxy::__isInitialized
*/
public $__isInitialized__ = false;
/**
* @var array properties to be lazy loaded, with keys being the property
* names and values being their default values
*
* @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties
*/
public static $lazyPropertiesDefaults = [];
/**
* @param \Closure $initializer
* @param \Closure $cloner
*/
public function __construct($initializer = null, $cloner = null)
{
$this->__initializer__ = $initializer;
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @param string $name
*/
public function __get($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]);
return parent::__get($name);
}
/**
* {@inheritDoc}
* @param string $name
* @param mixed $value
*/
public function __set($name, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]);
return parent::__set($name, $value);
}
/**
* {@inheritDoc}
* @param string $name
* @return boolean
*/
public function __isset($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]);
return parent::__isset($name);
}
/**
*
* @return array
*/
public function __sleep()
{
if ($this->__isInitialized__) {
return ['__isInitialized__', 'id', 'owner', 'calls_made', 'created'];
}
return ['__isInitialized__', 'id', 'owner', 'calls_made', 'created'];
}
/**
*
*/
public function __wakeup()
{
if ( ! $this->__isInitialized__) {
$this->__initializer__ = function (ApiKey $proxy) {
$proxy->__setInitializer(null);
$proxy->__setCloner(null);
$existingProperties = get_object_vars($proxy);
foreach ($proxy->__getLazyProperties() as $property => $defaultValue) {
if ( ! array_key_exists($property, $existingProperties)) {
$proxy->$property = $defaultValue;
}
}
};
}
}
/**
*
*/
public function __clone()
{
$this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []);
}
/**
* Forces initialization of the proxy
*/
public function __load()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __isInitialized()
{
return $this->__isInitialized__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitialized($initialized)
{
$this->__isInitialized__ = $initialized;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitializer(\Closure $initializer = null)
{
$this->__initializer__ = $initializer;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __getInitializer()
{
return $this->__initializer__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setCloner(\Closure $cloner = null)
{
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific cloning logic
*/
public function __getCloner()
{
return $this->__cloner__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
* @static
*/
public function __getLazyProperties()
{
return self::$lazyPropertiesDefaults;
}
/**
* {@inheritDoc}
*/
public function preSave()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'preSave', []);
return parent::preSave();
}
/**
* {@inheritDoc}
*/
public function __call($method, $arguments)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__call', [$method, $arguments]);
return parent::__call($method, $arguments);
}
/**
* {@inheritDoc}
*/
public function offsetExists($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetExists', [$offset]);
return parent::offsetExists($offset);
}
/**
* {@inheritDoc}
*/
public function offsetSet($key, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetSet', [$key, $value]);
return parent::offsetSet($key, $value);
}
/**
* {@inheritDoc}
*/
public function offsetGet($key)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetGet', [$key]);
return parent::offsetGet($key);
}
/**
* {@inheritDoc}
*/
public function offsetUnset($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetUnset', [$offset]);
return parent::offsetUnset($offset);
}
/**
* {@inheritDoc}
*/
public function fromArray(\Doctrine\ORM\EntityManager $em, $source)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'fromArray', [$em, $source]);
return parent::fromArray($em, $source);
}
/**
* {@inheritDoc}
*/
public function toArray(\Doctrine\ORM\EntityManager $em, $deep = false, $form_mode = false)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', [$em, $deep, $form_mode]);
return parent::toArray($em, $deep, $form_mode);
}
}

View File

@ -0,0 +1,305 @@
<?php
namespace Proxy\__CG__\Entity;
/**
* DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
*/
class Listener extends \Entity\Listener implements \Doctrine\ORM\Proxy\Proxy
{
/**
* @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with
* three parameters, being respectively the proxy object to be initialized, the method that triggered the
* initialization process and an array of ordered parameters that were passed to that method.
*
* @see \Doctrine\Common\Persistence\Proxy::__setInitializer
*/
public $__initializer__;
/**
* @var \Closure the callback responsible of loading properties that need to be copied in the cloned object
*
* @see \Doctrine\Common\Persistence\Proxy::__setCloner
*/
public $__cloner__;
/**
* @var boolean flag indicating if this object was already initialized
*
* @see \Doctrine\Common\Persistence\Proxy::__isInitialized
*/
public $__isInitialized__ = false;
/**
* @var array properties to be lazy loaded, with keys being the property
* names and values being their default values
*
* @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties
*/
public static $lazyPropertiesDefaults = [];
/**
* @param \Closure $initializer
* @param \Closure $cloner
*/
public function __construct($initializer = null, $cloner = null)
{
$this->__initializer__ = $initializer;
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @param string $name
*/
public function __get($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]);
return parent::__get($name);
}
/**
* {@inheritDoc}
* @param string $name
* @param mixed $value
*/
public function __set($name, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]);
return parent::__set($name, $value);
}
/**
* {@inheritDoc}
* @param string $name
* @return boolean
*/
public function __isset($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]);
return parent::__isset($name);
}
/**
*
* @return array
*/
public function __sleep()
{
if ($this->__isInitialized__) {
return ['__isInitialized__', 'id', 'station_id', 'listener_uid', 'listener_ip', 'listener_user_agent', 'listener_hash', 'timestamp_start', 'timestamp_end', 'station'];
}
return ['__isInitialized__', 'id', 'station_id', 'listener_uid', 'listener_ip', 'listener_user_agent', 'listener_hash', 'timestamp_start', 'timestamp_end', 'station'];
}
/**
*
*/
public function __wakeup()
{
if ( ! $this->__isInitialized__) {
$this->__initializer__ = function (Listener $proxy) {
$proxy->__setInitializer(null);
$proxy->__setCloner(null);
$existingProperties = get_object_vars($proxy);
foreach ($proxy->__getLazyProperties() as $property => $defaultValue) {
if ( ! array_key_exists($property, $existingProperties)) {
$proxy->$property = $defaultValue;
}
}
};
}
}
/**
*
*/
public function __clone()
{
$this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []);
}
/**
* Forces initialization of the proxy
*/
public function __load()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __isInitialized()
{
return $this->__isInitialized__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitialized($initialized)
{
$this->__isInitialized__ = $initialized;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitializer(\Closure $initializer = null)
{
$this->__initializer__ = $initializer;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __getInitializer()
{
return $this->__initializer__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setCloner(\Closure $cloner = null)
{
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific cloning logic
*/
public function __getCloner()
{
return $this->__cloner__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
* @static
*/
public function __getLazyProperties()
{
return self::$lazyPropertiesDefaults;
}
/**
* {@inheritDoc}
*/
public function getTimestamp()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getTimestamp', []);
return parent::getTimestamp();
}
/**
* {@inheritDoc}
*/
public function getConnectedSeconds()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getConnectedSeconds', []);
return parent::getConnectedSeconds();
}
/**
* {@inheritDoc}
*/
public function __call($method, $arguments)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__call', [$method, $arguments]);
return parent::__call($method, $arguments);
}
/**
* {@inheritDoc}
*/
public function offsetExists($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetExists', [$offset]);
return parent::offsetExists($offset);
}
/**
* {@inheritDoc}
*/
public function offsetSet($key, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetSet', [$key, $value]);
return parent::offsetSet($key, $value);
}
/**
* {@inheritDoc}
*/
public function offsetGet($key)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetGet', [$key]);
return parent::offsetGet($key);
}
/**
* {@inheritDoc}
*/
public function offsetUnset($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetUnset', [$offset]);
return parent::offsetUnset($offset);
}
/**
* {@inheritDoc}
*/
public function fromArray(\Doctrine\ORM\EntityManager $em, $source)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'fromArray', [$em, $source]);
return parent::fromArray($em, $source);
}
/**
* {@inheritDoc}
*/
public function toArray(\Doctrine\ORM\EntityManager $em, $deep = false, $form_mode = false)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', [$em, $deep, $form_mode]);
return parent::toArray($em, $deep, $form_mode);
}
}

View File

@ -0,0 +1,283 @@
<?php
namespace Proxy\__CG__\Entity;
/**
* DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
*/
class Role extends \Entity\Role implements \Doctrine\ORM\Proxy\Proxy
{
/**
* @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with
* three parameters, being respectively the proxy object to be initialized, the method that triggered the
* initialization process and an array of ordered parameters that were passed to that method.
*
* @see \Doctrine\Common\Persistence\Proxy::__setInitializer
*/
public $__initializer__;
/**
* @var \Closure the callback responsible of loading properties that need to be copied in the cloned object
*
* @see \Doctrine\Common\Persistence\Proxy::__setCloner
*/
public $__cloner__;
/**
* @var boolean flag indicating if this object was already initialized
*
* @see \Doctrine\Common\Persistence\Proxy::__isInitialized
*/
public $__isInitialized__ = false;
/**
* @var array properties to be lazy loaded, with keys being the property
* names and values being their default values
*
* @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties
*/
public static $lazyPropertiesDefaults = [];
/**
* @param \Closure $initializer
* @param \Closure $cloner
*/
public function __construct($initializer = null, $cloner = null)
{
$this->__initializer__ = $initializer;
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @param string $name
*/
public function __get($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]);
return parent::__get($name);
}
/**
* {@inheritDoc}
* @param string $name
* @param mixed $value
*/
public function __set($name, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]);
return parent::__set($name, $value);
}
/**
* {@inheritDoc}
* @param string $name
* @return boolean
*/
public function __isset($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]);
return parent::__isset($name);
}
/**
*
* @return array
*/
public function __sleep()
{
if ($this->__isInitialized__) {
return ['__isInitialized__', 'id', 'name', 'users', 'permissions'];
}
return ['__isInitialized__', 'id', 'name', 'users', 'permissions'];
}
/**
*
*/
public function __wakeup()
{
if ( ! $this->__isInitialized__) {
$this->__initializer__ = function (Role $proxy) {
$proxy->__setInitializer(null);
$proxy->__setCloner(null);
$existingProperties = get_object_vars($proxy);
foreach ($proxy->__getLazyProperties() as $property => $defaultValue) {
if ( ! array_key_exists($property, $existingProperties)) {
$proxy->$property = $defaultValue;
}
}
};
}
}
/**
*
*/
public function __clone()
{
$this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []);
}
/**
* Forces initialization of the proxy
*/
public function __load()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __isInitialized()
{
return $this->__isInitialized__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitialized($initialized)
{
$this->__isInitialized__ = $initialized;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitializer(\Closure $initializer = null)
{
$this->__initializer__ = $initializer;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __getInitializer()
{
return $this->__initializer__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setCloner(\Closure $cloner = null)
{
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific cloning logic
*/
public function __getCloner()
{
return $this->__cloner__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
* @static
*/
public function __getLazyProperties()
{
return self::$lazyPropertiesDefaults;
}
/**
* {@inheritDoc}
*/
public function __call($method, $arguments)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__call', [$method, $arguments]);
return parent::__call($method, $arguments);
}
/**
* {@inheritDoc}
*/
public function offsetExists($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetExists', [$offset]);
return parent::offsetExists($offset);
}
/**
* {@inheritDoc}
*/
public function offsetSet($key, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetSet', [$key, $value]);
return parent::offsetSet($key, $value);
}
/**
* {@inheritDoc}
*/
public function offsetGet($key)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetGet', [$key]);
return parent::offsetGet($key);
}
/**
* {@inheritDoc}
*/
public function offsetUnset($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetUnset', [$offset]);
return parent::offsetUnset($offset);
}
/**
* {@inheritDoc}
*/
public function fromArray(\Doctrine\ORM\EntityManager $em, $source)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'fromArray', [$em, $source]);
return parent::fromArray($em, $source);
}
/**
* {@inheritDoc}
*/
public function toArray(\Doctrine\ORM\EntityManager $em, $deep = false, $form_mode = false)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', [$em, $deep, $form_mode]);
return parent::toArray($em, $deep, $form_mode);
}
}

View File

@ -0,0 +1,283 @@
<?php
namespace Proxy\__CG__\Entity;
/**
* DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
*/
class RolePermission extends \Entity\RolePermission implements \Doctrine\ORM\Proxy\Proxy
{
/**
* @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with
* three parameters, being respectively the proxy object to be initialized, the method that triggered the
* initialization process and an array of ordered parameters that were passed to that method.
*
* @see \Doctrine\Common\Persistence\Proxy::__setInitializer
*/
public $__initializer__;
/**
* @var \Closure the callback responsible of loading properties that need to be copied in the cloned object
*
* @see \Doctrine\Common\Persistence\Proxy::__setCloner
*/
public $__cloner__;
/**
* @var boolean flag indicating if this object was already initialized
*
* @see \Doctrine\Common\Persistence\Proxy::__isInitialized
*/
public $__isInitialized__ = false;
/**
* @var array properties to be lazy loaded, with keys being the property
* names and values being their default values
*
* @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties
*/
public static $lazyPropertiesDefaults = [];
/**
* @param \Closure $initializer
* @param \Closure $cloner
*/
public function __construct($initializer = null, $cloner = null)
{
$this->__initializer__ = $initializer;
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @param string $name
*/
public function __get($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]);
return parent::__get($name);
}
/**
* {@inheritDoc}
* @param string $name
* @param mixed $value
*/
public function __set($name, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]);
return parent::__set($name, $value);
}
/**
* {@inheritDoc}
* @param string $name
* @return boolean
*/
public function __isset($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]);
return parent::__isset($name);
}
/**
*
* @return array
*/
public function __sleep()
{
if ($this->__isInitialized__) {
return ['__isInitialized__', 'id', 'role_id', 'role', 'action_name', 'station_id', 'station'];
}
return ['__isInitialized__', 'id', 'role_id', 'role', 'action_name', 'station_id', 'station'];
}
/**
*
*/
public function __wakeup()
{
if ( ! $this->__isInitialized__) {
$this->__initializer__ = function (RolePermission $proxy) {
$proxy->__setInitializer(null);
$proxy->__setCloner(null);
$existingProperties = get_object_vars($proxy);
foreach ($proxy->__getLazyProperties() as $property => $defaultValue) {
if ( ! array_key_exists($property, $existingProperties)) {
$proxy->$property = $defaultValue;
}
}
};
}
}
/**
*
*/
public function __clone()
{
$this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []);
}
/**
* Forces initialization of the proxy
*/
public function __load()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __isInitialized()
{
return $this->__isInitialized__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitialized($initialized)
{
$this->__isInitialized__ = $initialized;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitializer(\Closure $initializer = null)
{
$this->__initializer__ = $initializer;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __getInitializer()
{
return $this->__initializer__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setCloner(\Closure $cloner = null)
{
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific cloning logic
*/
public function __getCloner()
{
return $this->__cloner__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
* @static
*/
public function __getLazyProperties()
{
return self::$lazyPropertiesDefaults;
}
/**
* {@inheritDoc}
*/
public function __call($method, $arguments)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__call', [$method, $arguments]);
return parent::__call($method, $arguments);
}
/**
* {@inheritDoc}
*/
public function offsetExists($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetExists', [$offset]);
return parent::offsetExists($offset);
}
/**
* {@inheritDoc}
*/
public function offsetSet($key, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetSet', [$key, $value]);
return parent::offsetSet($key, $value);
}
/**
* {@inheritDoc}
*/
public function offsetGet($key)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetGet', [$key]);
return parent::offsetGet($key);
}
/**
* {@inheritDoc}
*/
public function offsetUnset($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetUnset', [$offset]);
return parent::offsetUnset($offset);
}
/**
* {@inheritDoc}
*/
public function fromArray(\Doctrine\ORM\EntityManager $em, $source)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'fromArray', [$em, $source]);
return parent::fromArray($em, $source);
}
/**
* {@inheritDoc}
*/
public function toArray(\Doctrine\ORM\EntityManager $em, $deep = false, $form_mode = false)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', [$em, $deep, $form_mode]);
return parent::toArray($em, $deep, $form_mode);
}
}

View File

@ -0,0 +1,283 @@
<?php
namespace Proxy\__CG__\Entity;
/**
* DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
*/
class Settings extends \Entity\Settings implements \Doctrine\ORM\Proxy\Proxy
{
/**
* @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with
* three parameters, being respectively the proxy object to be initialized, the method that triggered the
* initialization process and an array of ordered parameters that were passed to that method.
*
* @see \Doctrine\Common\Persistence\Proxy::__setInitializer
*/
public $__initializer__;
/**
* @var \Closure the callback responsible of loading properties that need to be copied in the cloned object
*
* @see \Doctrine\Common\Persistence\Proxy::__setCloner
*/
public $__cloner__;
/**
* @var boolean flag indicating if this object was already initialized
*
* @see \Doctrine\Common\Persistence\Proxy::__isInitialized
*/
public $__isInitialized__ = false;
/**
* @var array properties to be lazy loaded, with keys being the property
* names and values being their default values
*
* @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties
*/
public static $lazyPropertiesDefaults = [];
/**
* @param \Closure $initializer
* @param \Closure $cloner
*/
public function __construct($initializer = null, $cloner = null)
{
$this->__initializer__ = $initializer;
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @param string $name
*/
public function __get($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]);
return parent::__get($name);
}
/**
* {@inheritDoc}
* @param string $name
* @param mixed $value
*/
public function __set($name, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]);
return parent::__set($name, $value);
}
/**
* {@inheritDoc}
* @param string $name
* @return boolean
*/
public function __isset($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]);
return parent::__isset($name);
}
/**
*
* @return array
*/
public function __sleep()
{
if ($this->__isInitialized__) {
return ['__isInitialized__', 'setting_key', 'setting_value'];
}
return ['__isInitialized__', 'setting_key', 'setting_value'];
}
/**
*
*/
public function __wakeup()
{
if ( ! $this->__isInitialized__) {
$this->__initializer__ = function (Settings $proxy) {
$proxy->__setInitializer(null);
$proxy->__setCloner(null);
$existingProperties = get_object_vars($proxy);
foreach ($proxy->__getLazyProperties() as $property => $defaultValue) {
if ( ! array_key_exists($property, $existingProperties)) {
$proxy->$property = $defaultValue;
}
}
};
}
}
/**
*
*/
public function __clone()
{
$this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []);
}
/**
* Forces initialization of the proxy
*/
public function __load()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __isInitialized()
{
return $this->__isInitialized__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitialized($initialized)
{
$this->__isInitialized__ = $initialized;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitializer(\Closure $initializer = null)
{
$this->__initializer__ = $initializer;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __getInitializer()
{
return $this->__initializer__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setCloner(\Closure $cloner = null)
{
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific cloning logic
*/
public function __getCloner()
{
return $this->__cloner__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
* @static
*/
public function __getLazyProperties()
{
return self::$lazyPropertiesDefaults;
}
/**
* {@inheritDoc}
*/
public function __call($method, $arguments)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__call', [$method, $arguments]);
return parent::__call($method, $arguments);
}
/**
* {@inheritDoc}
*/
public function offsetExists($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetExists', [$offset]);
return parent::offsetExists($offset);
}
/**
* {@inheritDoc}
*/
public function offsetSet($key, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetSet', [$key, $value]);
return parent::offsetSet($key, $value);
}
/**
* {@inheritDoc}
*/
public function offsetGet($key)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetGet', [$key]);
return parent::offsetGet($key);
}
/**
* {@inheritDoc}
*/
public function offsetUnset($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetUnset', [$offset]);
return parent::offsetUnset($offset);
}
/**
* {@inheritDoc}
*/
public function fromArray(\Doctrine\ORM\EntityManager $em, $source)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'fromArray', [$em, $source]);
return parent::fromArray($em, $source);
}
/**
* {@inheritDoc}
*/
public function toArray(\Doctrine\ORM\EntityManager $em, $deep = false, $form_mode = false)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', [$em, $deep, $form_mode]);
return parent::toArray($em, $deep, $form_mode);
}
}

View File

@ -0,0 +1,305 @@
<?php
namespace Proxy\__CG__\Entity;
/**
* DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
*/
class Song extends \Entity\Song implements \Doctrine\ORM\Proxy\Proxy
{
/**
* @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with
* three parameters, being respectively the proxy object to be initialized, the method that triggered the
* initialization process and an array of ordered parameters that were passed to that method.
*
* @see \Doctrine\Common\Persistence\Proxy::__setInitializer
*/
public $__initializer__;
/**
* @var \Closure the callback responsible of loading properties that need to be copied in the cloned object
*
* @see \Doctrine\Common\Persistence\Proxy::__setCloner
*/
public $__cloner__;
/**
* @var boolean flag indicating if this object was already initialized
*
* @see \Doctrine\Common\Persistence\Proxy::__isInitialized
*/
public $__isInitialized__ = false;
/**
* @var array properties to be lazy loaded, with keys being the property
* names and values being their default values
*
* @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties
*/
public static $lazyPropertiesDefaults = [];
/**
* @param \Closure $initializer
* @param \Closure $cloner
*/
public function __construct($initializer = null, $cloner = null)
{
$this->__initializer__ = $initializer;
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @param string $name
*/
public function __get($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]);
return parent::__get($name);
}
/**
* {@inheritDoc}
* @param string $name
* @param mixed $value
*/
public function __set($name, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]);
return parent::__set($name, $value);
}
/**
* {@inheritDoc}
* @param string $name
* @return boolean
*/
public function __isset($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]);
return parent::__isset($name);
}
/**
*
* @return array
*/
public function __sleep()
{
if ($this->__isInitialized__) {
return ['__isInitialized__', 'id', 'text', 'artist', 'title', 'created', 'play_count', 'last_played', 'history'];
}
return ['__isInitialized__', 'id', 'text', 'artist', 'title', 'created', 'play_count', 'last_played', 'history'];
}
/**
*
*/
public function __wakeup()
{
if ( ! $this->__isInitialized__) {
$this->__initializer__ = function (Song $proxy) {
$proxy->__setInitializer(null);
$proxy->__setCloner(null);
$existingProperties = get_object_vars($proxy);
foreach ($proxy->__getLazyProperties() as $property => $defaultValue) {
if ( ! array_key_exists($property, $existingProperties)) {
$proxy->$property = $defaultValue;
}
}
};
}
}
/**
*
*/
public function __clone()
{
$this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []);
}
/**
* Forces initialization of the proxy
*/
public function __load()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __isInitialized()
{
return $this->__isInitialized__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitialized($initialized)
{
$this->__isInitialized__ = $initialized;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitializer(\Closure $initializer = null)
{
$this->__initializer__ = $initializer;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __getInitializer()
{
return $this->__initializer__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setCloner(\Closure $cloner = null)
{
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific cloning logic
*/
public function __getCloner()
{
return $this->__cloner__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
* @static
*/
public function __getLazyProperties()
{
return self::$lazyPropertiesDefaults;
}
/**
* {@inheritDoc}
*/
public function preSave()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'preSave', []);
return parent::preSave();
}
/**
* {@inheritDoc}
*/
public function api()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'api', []);
return parent::api();
}
/**
* {@inheritDoc}
*/
public function __call($method, $arguments)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__call', [$method, $arguments]);
return parent::__call($method, $arguments);
}
/**
* {@inheritDoc}
*/
public function offsetExists($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetExists', [$offset]);
return parent::offsetExists($offset);
}
/**
* {@inheritDoc}
*/
public function offsetSet($key, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetSet', [$key, $value]);
return parent::offsetSet($key, $value);
}
/**
* {@inheritDoc}
*/
public function offsetGet($key)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetGet', [$key]);
return parent::offsetGet($key);
}
/**
* {@inheritDoc}
*/
public function offsetUnset($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetUnset', [$offset]);
return parent::offsetUnset($offset);
}
/**
* {@inheritDoc}
*/
public function fromArray(\Doctrine\ORM\EntityManager $em, $source)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'fromArray', [$em, $source]);
return parent::fromArray($em, $source);
}
/**
* {@inheritDoc}
*/
public function toArray(\Doctrine\ORM\EntityManager $em, $deep = false, $form_mode = false)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', [$em, $deep, $form_mode]);
return parent::toArray($em, $deep, $form_mode);
}
}

View File

@ -0,0 +1,316 @@
<?php
namespace Proxy\__CG__\Entity;
/**
* DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
*/
class SongHistory extends \Entity\SongHistory implements \Doctrine\ORM\Proxy\Proxy
{
/**
* @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with
* three parameters, being respectively the proxy object to be initialized, the method that triggered the
* initialization process and an array of ordered parameters that were passed to that method.
*
* @see \Doctrine\Common\Persistence\Proxy::__setInitializer
*/
public $__initializer__;
/**
* @var \Closure the callback responsible of loading properties that need to be copied in the cloned object
*
* @see \Doctrine\Common\Persistence\Proxy::__setCloner
*/
public $__cloner__;
/**
* @var boolean flag indicating if this object was already initialized
*
* @see \Doctrine\Common\Persistence\Proxy::__isInitialized
*/
public $__isInitialized__ = false;
/**
* @var array properties to be lazy loaded, with keys being the property
* names and values being their default values
*
* @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties
*/
public static $lazyPropertiesDefaults = [];
/**
* @param \Closure $initializer
* @param \Closure $cloner
*/
public function __construct($initializer = null, $cloner = null)
{
$this->__initializer__ = $initializer;
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @param string $name
*/
public function __get($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]);
return parent::__get($name);
}
/**
* {@inheritDoc}
* @param string $name
* @param mixed $value
*/
public function __set($name, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]);
return parent::__set($name, $value);
}
/**
* {@inheritDoc}
* @param string $name
* @return boolean
*/
public function __isset($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]);
return parent::__isset($name);
}
/**
*
* @return array
*/
public function __sleep()
{
if ($this->__isInitialized__) {
return ['__isInitialized__', 'id', 'song_id', 'station_id', 'playlist_id', 'media_id', 'request_id', 'timestamp_cued', 'sent_to_autodj', 'timestamp_start', 'duration', 'listeners_start', 'timestamp_end', 'listeners_end', 'unique_listeners', 'delta_total', 'delta_positive', 'delta_negative', 'delta_points', 'song', 'station', 'playlist', 'request', 'media'];
}
return ['__isInitialized__', 'id', 'song_id', 'station_id', 'playlist_id', 'media_id', 'request_id', 'timestamp_cued', 'sent_to_autodj', 'timestamp_start', 'duration', 'listeners_start', 'timestamp_end', 'listeners_end', 'unique_listeners', 'delta_total', 'delta_positive', 'delta_negative', 'delta_points', 'song', 'station', 'playlist', 'request', 'media'];
}
/**
*
*/
public function __wakeup()
{
if ( ! $this->__isInitialized__) {
$this->__initializer__ = function (SongHistory $proxy) {
$proxy->__setInitializer(null);
$proxy->__setCloner(null);
$existingProperties = get_object_vars($proxy);
foreach ($proxy->__getLazyProperties() as $property => $defaultValue) {
if ( ! array_key_exists($property, $existingProperties)) {
$proxy->$property = $defaultValue;
}
}
};
}
}
/**
*
*/
public function __clone()
{
$this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []);
}
/**
* Forces initialization of the proxy
*/
public function __load()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __isInitialized()
{
return $this->__isInitialized__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitialized($initialized)
{
$this->__isInitialized__ = $initialized;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitializer(\Closure $initializer = null)
{
$this->__initializer__ = $initializer;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __getInitializer()
{
return $this->__initializer__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setCloner(\Closure $cloner = null)
{
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific cloning logic
*/
public function __getCloner()
{
return $this->__cloner__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
* @static
*/
public function __getLazyProperties()
{
return self::$lazyPropertiesDefaults;
}
/**
* {@inheritDoc}
*/
public function getTimestamp()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getTimestamp', []);
return parent::getTimestamp();
}
/**
* {@inheritDoc}
*/
public function getListeners()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getListeners', []);
return parent::getListeners();
}
/**
* {@inheritDoc}
*/
public function api($now_playing = false)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'api', [$now_playing]);
return parent::api($now_playing);
}
/**
* {@inheritDoc}
*/
public function __call($method, $arguments)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__call', [$method, $arguments]);
return parent::__call($method, $arguments);
}
/**
* {@inheritDoc}
*/
public function offsetExists($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetExists', [$offset]);
return parent::offsetExists($offset);
}
/**
* {@inheritDoc}
*/
public function offsetSet($key, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetSet', [$key, $value]);
return parent::offsetSet($key, $value);
}
/**
* {@inheritDoc}
*/
public function offsetGet($key)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetGet', [$key]);
return parent::offsetGet($key);
}
/**
* {@inheritDoc}
*/
public function offsetUnset($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetUnset', [$offset]);
return parent::offsetUnset($offset);
}
/**
* {@inheritDoc}
*/
public function fromArray(\Doctrine\ORM\EntityManager $em, $source)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'fromArray', [$em, $source]);
return parent::fromArray($em, $source);
}
/**
* {@inheritDoc}
*/
public function toArray(\Doctrine\ORM\EntityManager $em, $deep = false, $form_mode = false)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', [$em, $deep, $form_mode]);
return parent::toArray($em, $deep, $form_mode);
}
}

View File

@ -0,0 +1,404 @@
<?php
namespace Proxy\__CG__\Entity;
/**
* DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
*/
class Station extends \Entity\Station implements \Doctrine\ORM\Proxy\Proxy
{
/**
* @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with
* three parameters, being respectively the proxy object to be initialized, the method that triggered the
* initialization process and an array of ordered parameters that were passed to that method.
*
* @see \Doctrine\Common\Persistence\Proxy::__setInitializer
*/
public $__initializer__;
/**
* @var \Closure the callback responsible of loading properties that need to be copied in the cloned object
*
* @see \Doctrine\Common\Persistence\Proxy::__setCloner
*/
public $__cloner__;
/**
* @var boolean flag indicating if this object was already initialized
*
* @see \Doctrine\Common\Persistence\Proxy::__isInitialized
*/
public $__isInitialized__ = false;
/**
* @var array properties to be lazy loaded, with keys being the property
* names and values being their default values
*
* @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties
*/
public static $lazyPropertiesDefaults = [];
/**
* @param \Closure $initializer
* @param \Closure $cloner
*/
public function __construct($initializer = null, $cloner = null)
{
$this->__initializer__ = $initializer;
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @param string $name
*/
public function __get($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]);
return parent::__get($name);
}
/**
* {@inheritDoc}
* @param string $name
* @param mixed $value
*/
public function __set($name, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]);
return parent::__set($name, $value);
}
/**
* {@inheritDoc}
* @param string $name
* @return boolean
*/
public function __isset($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]);
return parent::__isset($name);
}
/**
*
* @return array
*/
public function __sleep()
{
if ($this->__isInitialized__) {
return ['__isInitialized__', 'id', 'name', 'frontend_type', 'frontend_config', 'backend_type', 'backend_config', 'description', 'url', 'radio_base_dir', 'radio_media_dir', 'nowplaying', 'automation_settings', 'automation_timestamp', 'enable_requests', 'request_delay', 'request_threshold', 'enable_streamers', 'needs_restart', 'has_started', 'history', 'media', 'streamers', 'permissions', 'playlists', 'mounts'];
}
return ['__isInitialized__', 'id', 'name', 'frontend_type', 'frontend_config', 'backend_type', 'backend_config', 'description', 'url', 'radio_base_dir', 'radio_media_dir', 'nowplaying', 'automation_settings', 'automation_timestamp', 'enable_requests', 'request_delay', 'request_threshold', 'enable_streamers', 'needs_restart', 'has_started', 'history', 'media', 'streamers', 'permissions', 'playlists', 'mounts'];
}
/**
*
*/
public function __wakeup()
{
if ( ! $this->__isInitialized__) {
$this->__initializer__ = function (Station $proxy) {
$proxy->__setInitializer(null);
$proxy->__setCloner(null);
$existingProperties = get_object_vars($proxy);
foreach ($proxy->__getLazyProperties() as $property => $defaultValue) {
if ( ! array_key_exists($property, $existingProperties)) {
$proxy->$property = $defaultValue;
}
}
};
}
}
/**
*
*/
public function __clone()
{
$this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []);
}
/**
* Forces initialization of the proxy
*/
public function __load()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __isInitialized()
{
return $this->__isInitialized__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitialized($initialized)
{
$this->__isInitialized__ = $initialized;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitializer(\Closure $initializer = null)
{
$this->__initializer__ = $initializer;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __getInitializer()
{
return $this->__initializer__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setCloner(\Closure $cloner = null)
{
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific cloning logic
*/
public function __getCloner()
{
return $this->__cloner__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
* @static
*/
public function __getLazyProperties()
{
return self::$lazyPropertiesDefaults;
}
/**
* {@inheritDoc}
*/
public function getShortName()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getShortName', []);
return parent::getShortName();
}
/**
* {@inheritDoc}
*/
public function getFrontendAdapter(\Interop\Container\ContainerInterface $di)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getFrontendAdapter', [$di]);
return parent::getFrontendAdapter($di);
}
/**
* {@inheritDoc}
*/
public function getBackendAdapter(\Interop\Container\ContainerInterface $di)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getBackendAdapter', [$di]);
return parent::getBackendAdapter($di);
}
/**
* {@inheritDoc}
*/
public function setRadioBaseDir($new_dir)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'setRadioBaseDir', [$new_dir]);
return parent::setRadioBaseDir($new_dir);
}
/**
* {@inheritDoc}
*/
public function setRadioMediaDir($new_dir)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'setRadioMediaDir', [$new_dir]);
return parent::setRadioMediaDir($new_dir);
}
/**
* {@inheritDoc}
*/
public function getRadioMediaDir()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getRadioMediaDir', []);
return parent::getRadioMediaDir();
}
/**
* {@inheritDoc}
*/
public function getRadioPlaylistsDir()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getRadioPlaylistsDir', []);
return parent::getRadioPlaylistsDir();
}
/**
* {@inheritDoc}
*/
public function getRadioConfigDir()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getRadioConfigDir', []);
return parent::getRadioConfigDir();
}
/**
* {@inheritDoc}
*/
public function writeConfiguration(\Interop\Container\ContainerInterface $di)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'writeConfiguration', [$di]);
return parent::writeConfiguration($di);
}
/**
* {@inheritDoc}
*/
public function removeConfiguration(\Interop\Container\ContainerInterface $di)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'removeConfiguration', [$di]);
return parent::removeConfiguration($di);
}
/**
* {@inheritDoc}
*/
public function api(\AzuraCast\Radio\Frontend\FrontendAbstract $fa)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'api', [$fa]);
return parent::api($fa);
}
/**
* {@inheritDoc}
*/
public function __call($method, $arguments)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__call', [$method, $arguments]);
return parent::__call($method, $arguments);
}
/**
* {@inheritDoc}
*/
public function offsetExists($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetExists', [$offset]);
return parent::offsetExists($offset);
}
/**
* {@inheritDoc}
*/
public function offsetSet($key, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetSet', [$key, $value]);
return parent::offsetSet($key, $value);
}
/**
* {@inheritDoc}
*/
public function offsetGet($key)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetGet', [$key]);
return parent::offsetGet($key);
}
/**
* {@inheritDoc}
*/
public function offsetUnset($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetUnset', [$offset]);
return parent::offsetUnset($offset);
}
/**
* {@inheritDoc}
*/
public function fromArray(\Doctrine\ORM\EntityManager $em, $source)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'fromArray', [$em, $source]);
return parent::fromArray($em, $source);
}
/**
* {@inheritDoc}
*/
public function toArray(\Doctrine\ORM\EntityManager $em, $deep = false, $form_mode = false)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', [$em, $deep, $form_mode]);
return parent::toArray($em, $deep, $form_mode);
}
}

View File

@ -0,0 +1,360 @@
<?php
namespace Proxy\__CG__\Entity;
/**
* DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
*/
class StationMedia extends \Entity\StationMedia implements \Doctrine\ORM\Proxy\Proxy
{
/**
* @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with
* three parameters, being respectively the proxy object to be initialized, the method that triggered the
* initialization process and an array of ordered parameters that were passed to that method.
*
* @see \Doctrine\Common\Persistence\Proxy::__setInitializer
*/
public $__initializer__;
/**
* @var \Closure the callback responsible of loading properties that need to be copied in the cloned object
*
* @see \Doctrine\Common\Persistence\Proxy::__setCloner
*/
public $__cloner__;
/**
* @var boolean flag indicating if this object was already initialized
*
* @see \Doctrine\Common\Persistence\Proxy::__isInitialized
*/
public $__isInitialized__ = false;
/**
* @var array properties to be lazy loaded, with keys being the property
* names and values being their default values
*
* @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties
*/
public static $lazyPropertiesDefaults = [];
/**
* @param \Closure $initializer
* @param \Closure $cloner
*/
public function __construct($initializer = null, $cloner = null)
{
$this->__initializer__ = $initializer;
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @param string $name
*/
public function __get($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]);
return parent::__get($name);
}
/**
* {@inheritDoc}
* @param string $name
* @param mixed $value
*/
public function __set($name, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]);
return parent::__set($name, $value);
}
/**
* {@inheritDoc}
* @param string $name
* @return boolean
*/
public function __isset($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]);
return parent::__isset($name);
}
/**
*
* @return array
*/
public function __sleep()
{
if ($this->__isInitialized__) {
return ['__isInitialized__', 'id', 'station_id', 'song_id', 'title', 'artist', 'album', 'isrc', 'length', 'length_text', 'path', 'mtime', 'fade_overlap', 'fade_in', 'fade_out', 'cue_in', 'cue_out', 'station', 'song', 'playlists'];
}
return ['__isInitialized__', 'id', 'station_id', 'song_id', 'title', 'artist', 'album', 'isrc', 'length', 'length_text', 'path', 'mtime', 'fade_overlap', 'fade_in', 'fade_out', 'cue_in', 'cue_out', 'station', 'song', 'playlists'];
}
/**
*
*/
public function __wakeup()
{
if ( ! $this->__isInitialized__) {
$this->__initializer__ = function (StationMedia $proxy) {
$proxy->__setInitializer(null);
$proxy->__setCloner(null);
$existingProperties = get_object_vars($proxy);
foreach ($proxy->__getLazyProperties() as $property => $defaultValue) {
if ( ! array_key_exists($property, $existingProperties)) {
$proxy->$property = $defaultValue;
}
}
};
}
}
/**
*
*/
public function __clone()
{
$this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []);
}
/**
* Forces initialization of the proxy
*/
public function __load()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __isInitialized()
{
return $this->__isInitialized__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitialized($initialized)
{
$this->__isInitialized__ = $initialized;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitializer(\Closure $initializer = null)
{
$this->__initializer__ = $initializer;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __getInitializer()
{
return $this->__initializer__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setCloner(\Closure $cloner = null)
{
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific cloning logic
*/
public function __getCloner()
{
return $this->__cloner__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
* @static
*/
public function __getLazyProperties()
{
return self::$lazyPropertiesDefaults;
}
/**
* {@inheritDoc}
*/
public function setLength($length)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'setLength', [$length]);
return parent::setLength($length);
}
/**
* {@inheritDoc}
*/
public function getCalculatedLength()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getCalculatedLength', []);
return parent::getCalculatedLength();
}
/**
* {@inheritDoc}
*/
public function getFullPath()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getFullPath', []);
return parent::getFullPath();
}
/**
* {@inheritDoc}
*/
public function getAnnotations()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getAnnotations', []);
return parent::getAnnotations();
}
/**
* {@inheritDoc}
*/
public function loadFromFile($force = false)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'loadFromFile', [$force]);
return parent::loadFromFile($force);
}
/**
* {@inheritDoc}
*/
public function writeToFile()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'writeToFile', []);
return parent::writeToFile();
}
/**
* {@inheritDoc}
*/
public function moveToNotProcessed()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'moveToNotProcessed', []);
return parent::moveToNotProcessed();
}
/**
* {@inheritDoc}
*/
public function __call($method, $arguments)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__call', [$method, $arguments]);
return parent::__call($method, $arguments);
}
/**
* {@inheritDoc}
*/
public function offsetExists($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetExists', [$offset]);
return parent::offsetExists($offset);
}
/**
* {@inheritDoc}
*/
public function offsetSet($key, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetSet', [$key, $value]);
return parent::offsetSet($key, $value);
}
/**
* {@inheritDoc}
*/
public function offsetGet($key)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetGet', [$key]);
return parent::offsetGet($key);
}
/**
* {@inheritDoc}
*/
public function offsetUnset($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetUnset', [$offset]);
return parent::offsetUnset($offset);
}
/**
* {@inheritDoc}
*/
public function fromArray(\Doctrine\ORM\EntityManager $em, $source)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'fromArray', [$em, $source]);
return parent::fromArray($em, $source);
}
/**
* {@inheritDoc}
*/
public function toArray(\Doctrine\ORM\EntityManager $em, $deep = false, $form_mode = false)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', [$em, $deep, $form_mode]);
return parent::toArray($em, $deep, $form_mode);
}
}

View File

@ -0,0 +1,305 @@
<?php
namespace Proxy\__CG__\Entity;
/**
* DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
*/
class StationMount extends \Entity\StationMount implements \Doctrine\ORM\Proxy\Proxy
{
/**
* @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with
* three parameters, being respectively the proxy object to be initialized, the method that triggered the
* initialization process and an array of ordered parameters that were passed to that method.
*
* @see \Doctrine\Common\Persistence\Proxy::__setInitializer
*/
public $__initializer__;
/**
* @var \Closure the callback responsible of loading properties that need to be copied in the cloned object
*
* @see \Doctrine\Common\Persistence\Proxy::__setCloner
*/
public $__cloner__;
/**
* @var boolean flag indicating if this object was already initialized
*
* @see \Doctrine\Common\Persistence\Proxy::__isInitialized
*/
public $__isInitialized__ = false;
/**
* @var array properties to be lazy loaded, with keys being the property
* names and values being their default values
*
* @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties
*/
public static $lazyPropertiesDefaults = [];
/**
* @param \Closure $initializer
* @param \Closure $cloner
*/
public function __construct($initializer = null, $cloner = null)
{
$this->__initializer__ = $initializer;
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @param string $name
*/
public function __get($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]);
return parent::__get($name);
}
/**
* {@inheritDoc}
* @param string $name
* @param mixed $value
*/
public function __set($name, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]);
return parent::__set($name, $value);
}
/**
* {@inheritDoc}
* @param string $name
* @return boolean
*/
public function __isset($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]);
return parent::__isset($name);
}
/**
*
* @return array
*/
public function __sleep()
{
if ($this->__isInitialized__) {
return ['__isInitialized__', 'id', 'station_id', 'name', 'is_default', 'is_public', 'fallback_mount', 'relay_url', 'authhash', 'enable_autodj', 'autodj_format', 'autodj_bitrate', 'frontend_config', 'station'];
}
return ['__isInitialized__', 'id', 'station_id', 'name', 'is_default', 'is_public', 'fallback_mount', 'relay_url', 'authhash', 'enable_autodj', 'autodj_format', 'autodj_bitrate', 'frontend_config', 'station'];
}
/**
*
*/
public function __wakeup()
{
if ( ! $this->__isInitialized__) {
$this->__initializer__ = function (StationMount $proxy) {
$proxy->__setInitializer(null);
$proxy->__setCloner(null);
$existingProperties = get_object_vars($proxy);
foreach ($proxy->__getLazyProperties() as $property => $defaultValue) {
if ( ! array_key_exists($property, $existingProperties)) {
$proxy->$property = $defaultValue;
}
}
};
}
}
/**
*
*/
public function __clone()
{
$this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []);
}
/**
* Forces initialization of the proxy
*/
public function __load()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __isInitialized()
{
return $this->__isInitialized__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitialized($initialized)
{
$this->__isInitialized__ = $initialized;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitializer(\Closure $initializer = null)
{
$this->__initializer__ = $initializer;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __getInitializer()
{
return $this->__initializer__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setCloner(\Closure $cloner = null)
{
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific cloning logic
*/
public function __getCloner()
{
return $this->__cloner__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
* @static
*/
public function __getLazyProperties()
{
return self::$lazyPropertiesDefaults;
}
/**
* {@inheritDoc}
*/
public function setName($new_name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'setName', [$new_name]);
return parent::setName($new_name);
}
/**
* {@inheritDoc}
*/
public function api(\AzuraCast\Radio\Frontend\FrontendAbstract $fa)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'api', [$fa]);
return parent::api($fa);
}
/**
* {@inheritDoc}
*/
public function __call($method, $arguments)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__call', [$method, $arguments]);
return parent::__call($method, $arguments);
}
/**
* {@inheritDoc}
*/
public function offsetExists($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetExists', [$offset]);
return parent::offsetExists($offset);
}
/**
* {@inheritDoc}
*/
public function offsetSet($key, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetSet', [$key, $value]);
return parent::offsetSet($key, $value);
}
/**
* {@inheritDoc}
*/
public function offsetGet($key)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetGet', [$key]);
return parent::offsetGet($key);
}
/**
* {@inheritDoc}
*/
public function offsetUnset($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetUnset', [$offset]);
return parent::offsetUnset($offset);
}
/**
* {@inheritDoc}
*/
public function fromArray(\Doctrine\ORM\EntityManager $em, $source)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'fromArray', [$em, $source]);
return parent::fromArray($em, $source);
}
/**
* {@inheritDoc}
*/
public function toArray(\Doctrine\ORM\EntityManager $em, $deep = false, $form_mode = false)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', [$em, $deep, $form_mode]);
return parent::toArray($em, $deep, $form_mode);
}
}

View File

@ -0,0 +1,338 @@
<?php
namespace Proxy\__CG__\Entity;
/**
* DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
*/
class StationPlaylist extends \Entity\StationPlaylist implements \Doctrine\ORM\Proxy\Proxy
{
/**
* @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with
* three parameters, being respectively the proxy object to be initialized, the method that triggered the
* initialization process and an array of ordered parameters that were passed to that method.
*
* @see \Doctrine\Common\Persistence\Proxy::__setInitializer
*/
public $__initializer__;
/**
* @var \Closure the callback responsible of loading properties that need to be copied in the cloned object
*
* @see \Doctrine\Common\Persistence\Proxy::__setCloner
*/
public $__cloner__;
/**
* @var boolean flag indicating if this object was already initialized
*
* @see \Doctrine\Common\Persistence\Proxy::__isInitialized
*/
public $__isInitialized__ = false;
/**
* @var array properties to be lazy loaded, with keys being the property
* names and values being their default values
*
* @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties
*/
public static $lazyPropertiesDefaults = [];
/**
* @param \Closure $initializer
* @param \Closure $cloner
*/
public function __construct($initializer = null, $cloner = null)
{
$this->__initializer__ = $initializer;
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @param string $name
*/
public function __get($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]);
return parent::__get($name);
}
/**
* {@inheritDoc}
* @param string $name
* @param mixed $value
*/
public function __set($name, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]);
return parent::__set($name, $value);
}
/**
* {@inheritDoc}
* @param string $name
* @return boolean
*/
public function __isset($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]);
return parent::__isset($name);
}
/**
*
* @return array
*/
public function __sleep()
{
if ($this->__isInitialized__) {
return ['__isInitialized__', 'id', 'station_id', 'name', 'type', 'is_enabled', 'play_per_songs', 'play_per_minutes', 'schedule_start_time', 'schedule_end_time', 'play_once_time', 'weight', 'include_in_automation', 'station', 'media'];
}
return ['__isInitialized__', 'id', 'station_id', 'name', 'type', 'is_enabled', 'play_per_songs', 'play_per_minutes', 'schedule_start_time', 'schedule_end_time', 'play_once_time', 'weight', 'include_in_automation', 'station', 'media'];
}
/**
*
*/
public function __wakeup()
{
if ( ! $this->__isInitialized__) {
$this->__initializer__ = function (StationPlaylist $proxy) {
$proxy->__setInitializer(null);
$proxy->__setCloner(null);
$existingProperties = get_object_vars($proxy);
foreach ($proxy->__getLazyProperties() as $property => $defaultValue) {
if ( ! array_key_exists($property, $existingProperties)) {
$proxy->$property = $defaultValue;
}
}
};
}
}
/**
*
*/
public function __clone()
{
$this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []);
}
/**
* Forces initialization of the proxy
*/
public function __load()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __isInitialized()
{
return $this->__isInitialized__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitialized($initialized)
{
$this->__isInitialized__ = $initialized;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitializer(\Closure $initializer = null)
{
$this->__initializer__ = $initializer;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __getInitializer()
{
return $this->__initializer__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setCloner(\Closure $cloner = null)
{
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific cloning logic
*/
public function __getCloner()
{
return $this->__cloner__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
* @static
*/
public function __getLazyProperties()
{
return self::$lazyPropertiesDefaults;
}
/**
* {@inheritDoc}
*/
public function getShortName()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getShortName', []);
return parent::getShortName();
}
/**
* {@inheritDoc}
*/
public function getScheduleStartTimeText()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getScheduleStartTimeText', []);
return parent::getScheduleStartTimeText();
}
/**
* {@inheritDoc}
*/
public function getScheduleEndTimeText()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getScheduleEndTimeText', []);
return parent::getScheduleEndTimeText();
}
/**
* {@inheritDoc}
*/
public function getPlayOnceTimeText()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getPlayOnceTimeText', []);
return parent::getPlayOnceTimeText();
}
/**
* {@inheritDoc}
*/
public function export($file_format = 'pls', $absolute_paths = false)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'export', [$file_format, $absolute_paths]);
return parent::export($file_format, $absolute_paths);
}
/**
* {@inheritDoc}
*/
public function __call($method, $arguments)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__call', [$method, $arguments]);
return parent::__call($method, $arguments);
}
/**
* {@inheritDoc}
*/
public function offsetExists($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetExists', [$offset]);
return parent::offsetExists($offset);
}
/**
* {@inheritDoc}
*/
public function offsetSet($key, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetSet', [$key, $value]);
return parent::offsetSet($key, $value);
}
/**
* {@inheritDoc}
*/
public function offsetGet($key)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetGet', [$key]);
return parent::offsetGet($key);
}
/**
* {@inheritDoc}
*/
public function offsetUnset($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetUnset', [$offset]);
return parent::offsetUnset($offset);
}
/**
* {@inheritDoc}
*/
public function fromArray(\Doctrine\ORM\EntityManager $em, $source)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'fromArray', [$em, $source]);
return parent::fromArray($em, $source);
}
/**
* {@inheritDoc}
*/
public function toArray(\Doctrine\ORM\EntityManager $em, $deep = false, $form_mode = false)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', [$em, $deep, $form_mode]);
return parent::toArray($em, $deep, $form_mode);
}
}

View File

@ -0,0 +1,283 @@
<?php
namespace Proxy\__CG__\Entity;
/**
* DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
*/
class StationRequest extends \Entity\StationRequest implements \Doctrine\ORM\Proxy\Proxy
{
/**
* @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with
* three parameters, being respectively the proxy object to be initialized, the method that triggered the
* initialization process and an array of ordered parameters that were passed to that method.
*
* @see \Doctrine\Common\Persistence\Proxy::__setInitializer
*/
public $__initializer__;
/**
* @var \Closure the callback responsible of loading properties that need to be copied in the cloned object
*
* @see \Doctrine\Common\Persistence\Proxy::__setCloner
*/
public $__cloner__;
/**
* @var boolean flag indicating if this object was already initialized
*
* @see \Doctrine\Common\Persistence\Proxy::__isInitialized
*/
public $__isInitialized__ = false;
/**
* @var array properties to be lazy loaded, with keys being the property
* names and values being their default values
*
* @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties
*/
public static $lazyPropertiesDefaults = [];
/**
* @param \Closure $initializer
* @param \Closure $cloner
*/
public function __construct($initializer = null, $cloner = null)
{
$this->__initializer__ = $initializer;
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @param string $name
*/
public function __get($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]);
return parent::__get($name);
}
/**
* {@inheritDoc}
* @param string $name
* @param mixed $value
*/
public function __set($name, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]);
return parent::__set($name, $value);
}
/**
* {@inheritDoc}
* @param string $name
* @return boolean
*/
public function __isset($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]);
return parent::__isset($name);
}
/**
*
* @return array
*/
public function __sleep()
{
if ($this->__isInitialized__) {
return ['__isInitialized__', 'id', 'station_id', 'track_id', 'timestamp', 'played_at', 'ip', 'station', 'track'];
}
return ['__isInitialized__', 'id', 'station_id', 'track_id', 'timestamp', 'played_at', 'ip', 'station', 'track'];
}
/**
*
*/
public function __wakeup()
{
if ( ! $this->__isInitialized__) {
$this->__initializer__ = function (StationRequest $proxy) {
$proxy->__setInitializer(null);
$proxy->__setCloner(null);
$existingProperties = get_object_vars($proxy);
foreach ($proxy->__getLazyProperties() as $property => $defaultValue) {
if ( ! array_key_exists($property, $existingProperties)) {
$proxy->$property = $defaultValue;
}
}
};
}
}
/**
*
*/
public function __clone()
{
$this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []);
}
/**
* Forces initialization of the proxy
*/
public function __load()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __isInitialized()
{
return $this->__isInitialized__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitialized($initialized)
{
$this->__isInitialized__ = $initialized;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitializer(\Closure $initializer = null)
{
$this->__initializer__ = $initializer;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __getInitializer()
{
return $this->__initializer__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setCloner(\Closure $cloner = null)
{
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific cloning logic
*/
public function __getCloner()
{
return $this->__cloner__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
* @static
*/
public function __getLazyProperties()
{
return self::$lazyPropertiesDefaults;
}
/**
* {@inheritDoc}
*/
public function __call($method, $arguments)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__call', [$method, $arguments]);
return parent::__call($method, $arguments);
}
/**
* {@inheritDoc}
*/
public function offsetExists($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetExists', [$offset]);
return parent::offsetExists($offset);
}
/**
* {@inheritDoc}
*/
public function offsetSet($key, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetSet', [$key, $value]);
return parent::offsetSet($key, $value);
}
/**
* {@inheritDoc}
*/
public function offsetGet($key)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetGet', [$key]);
return parent::offsetGet($key);
}
/**
* {@inheritDoc}
*/
public function offsetUnset($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetUnset', [$offset]);
return parent::offsetUnset($offset);
}
/**
* {@inheritDoc}
*/
public function fromArray(\Doctrine\ORM\EntityManager $em, $source)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'fromArray', [$em, $source]);
return parent::fromArray($em, $source);
}
/**
* {@inheritDoc}
*/
public function toArray(\Doctrine\ORM\EntityManager $em, $deep = false, $form_mode = false)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', [$em, $deep, $form_mode]);
return parent::toArray($em, $deep, $form_mode);
}
}

View File

@ -0,0 +1,283 @@
<?php
namespace Proxy\__CG__\Entity;
/**
* DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
*/
class StationStreamer extends \Entity\StationStreamer implements \Doctrine\ORM\Proxy\Proxy
{
/**
* @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with
* three parameters, being respectively the proxy object to be initialized, the method that triggered the
* initialization process and an array of ordered parameters that were passed to that method.
*
* @see \Doctrine\Common\Persistence\Proxy::__setInitializer
*/
public $__initializer__;
/**
* @var \Closure the callback responsible of loading properties that need to be copied in the cloned object
*
* @see \Doctrine\Common\Persistence\Proxy::__setCloner
*/
public $__cloner__;
/**
* @var boolean flag indicating if this object was already initialized
*
* @see \Doctrine\Common\Persistence\Proxy::__isInitialized
*/
public $__isInitialized__ = false;
/**
* @var array properties to be lazy loaded, with keys being the property
* names and values being their default values
*
* @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties
*/
public static $lazyPropertiesDefaults = [];
/**
* @param \Closure $initializer
* @param \Closure $cloner
*/
public function __construct($initializer = null, $cloner = null)
{
$this->__initializer__ = $initializer;
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @param string $name
*/
public function __get($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]);
return parent::__get($name);
}
/**
* {@inheritDoc}
* @param string $name
* @param mixed $value
*/
public function __set($name, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]);
return parent::__set($name, $value);
}
/**
* {@inheritDoc}
* @param string $name
* @return boolean
*/
public function __isset($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]);
return parent::__isset($name);
}
/**
*
* @return array
*/
public function __sleep()
{
if ($this->__isInitialized__) {
return ['__isInitialized__', 'id', 'station_id', 'streamer_username', 'streamer_password', 'comments', 'is_active', 'station'];
}
return ['__isInitialized__', 'id', 'station_id', 'streamer_username', 'streamer_password', 'comments', 'is_active', 'station'];
}
/**
*
*/
public function __wakeup()
{
if ( ! $this->__isInitialized__) {
$this->__initializer__ = function (StationStreamer $proxy) {
$proxy->__setInitializer(null);
$proxy->__setCloner(null);
$existingProperties = get_object_vars($proxy);
foreach ($proxy->__getLazyProperties() as $property => $defaultValue) {
if ( ! array_key_exists($property, $existingProperties)) {
$proxy->$property = $defaultValue;
}
}
};
}
}
/**
*
*/
public function __clone()
{
$this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []);
}
/**
* Forces initialization of the proxy
*/
public function __load()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __isInitialized()
{
return $this->__isInitialized__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitialized($initialized)
{
$this->__isInitialized__ = $initialized;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitializer(\Closure $initializer = null)
{
$this->__initializer__ = $initializer;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __getInitializer()
{
return $this->__initializer__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setCloner(\Closure $cloner = null)
{
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific cloning logic
*/
public function __getCloner()
{
return $this->__cloner__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
* @static
*/
public function __getLazyProperties()
{
return self::$lazyPropertiesDefaults;
}
/**
* {@inheritDoc}
*/
public function __call($method, $arguments)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__call', [$method, $arguments]);
return parent::__call($method, $arguments);
}
/**
* {@inheritDoc}
*/
public function offsetExists($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetExists', [$offset]);
return parent::offsetExists($offset);
}
/**
* {@inheritDoc}
*/
public function offsetSet($key, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetSet', [$key, $value]);
return parent::offsetSet($key, $value);
}
/**
* {@inheritDoc}
*/
public function offsetGet($key)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetGet', [$key]);
return parent::offsetGet($key);
}
/**
* {@inheritDoc}
*/
public function offsetUnset($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetUnset', [$offset]);
return parent::offsetUnset($offset);
}
/**
* {@inheritDoc}
*/
public function fromArray(\Doctrine\ORM\EntityManager $em, $source)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'fromArray', [$em, $source]);
return parent::fromArray($em, $source);
}
/**
* {@inheritDoc}
*/
public function toArray(\Doctrine\ORM\EntityManager $em, $deep = false, $form_mode = false)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', [$em, $deep, $form_mode]);
return parent::toArray($em, $deep, $form_mode);
}
}

View File

@ -0,0 +1,349 @@
<?php
namespace Proxy\__CG__\Entity;
/**
* DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
*/
class User extends \Entity\User implements \Doctrine\ORM\Proxy\Proxy
{
/**
* @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with
* three parameters, being respectively the proxy object to be initialized, the method that triggered the
* initialization process and an array of ordered parameters that were passed to that method.
*
* @see \Doctrine\Common\Persistence\Proxy::__setInitializer
*/
public $__initializer__;
/**
* @var \Closure the callback responsible of loading properties that need to be copied in the cloned object
*
* @see \Doctrine\Common\Persistence\Proxy::__setCloner
*/
public $__cloner__;
/**
* @var boolean flag indicating if this object was already initialized
*
* @see \Doctrine\Common\Persistence\Proxy::__isInitialized
*/
public $__isInitialized__ = false;
/**
* @var array properties to be lazy loaded, with keys being the property
* names and values being their default values
*
* @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties
*/
public static $lazyPropertiesDefaults = [];
/**
* @param \Closure $initializer
* @param \Closure $cloner
*/
public function __construct($initializer = null, $cloner = null)
{
$this->__initializer__ = $initializer;
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @param string $name
*/
public function __get($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]);
return parent::__get($name);
}
/**
* {@inheritDoc}
* @param string $name
* @param mixed $value
*/
public function __set($name, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]);
return parent::__set($name, $value);
}
/**
* {@inheritDoc}
* @param string $name
* @return boolean
*/
public function __isset($name)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]);
return parent::__isset($name);
}
/**
*
* @return array
*/
public function __sleep()
{
if ($this->__isInitialized__) {
return ['__isInitialized__', 'id', 'email', 'auth_password', 'name', 'timezone', 'locale', 'theme', 'created_at', 'updated_at', 'roles'];
}
return ['__isInitialized__', 'id', 'email', 'auth_password', 'name', 'timezone', 'locale', 'theme', 'created_at', 'updated_at', 'roles'];
}
/**
*
*/
public function __wakeup()
{
if ( ! $this->__isInitialized__) {
$this->__initializer__ = function (User $proxy) {
$proxy->__setInitializer(null);
$proxy->__setCloner(null);
$existingProperties = get_object_vars($proxy);
foreach ($proxy->__getLazyProperties() as $property => $defaultValue) {
if ( ! array_key_exists($property, $existingProperties)) {
$proxy->$property = $defaultValue;
}
}
};
}
}
/**
*
*/
public function __clone()
{
$this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []);
}
/**
* Forces initialization of the proxy
*/
public function __load()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __isInitialized()
{
return $this->__isInitialized__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitialized($initialized)
{
$this->__isInitialized__ = $initialized;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitializer(\Closure $initializer = null)
{
$this->__initializer__ = $initializer;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __getInitializer()
{
return $this->__initializer__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setCloner(\Closure $cloner = null)
{
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific cloning logic
*/
public function __getCloner()
{
return $this->__cloner__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
* @static
*/
public function __getLazyProperties()
{
return self::$lazyPropertiesDefaults;
}
/**
* {@inheritDoc}
*/
public function preSave()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'preSave', []);
return parent::preSave();
}
/**
* {@inheritDoc}
*/
public function getAvatar($size = 50)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getAvatar', [$size]);
return parent::getAvatar($size);
}
/**
* {@inheritDoc}
*/
public function verifyPassword($password)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'verifyPassword', [$password]);
return parent::verifyPassword($password);
}
/**
* {@inheritDoc}
*/
public function getAuthPassword()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getAuthPassword', []);
return parent::getAuthPassword();
}
/**
* {@inheritDoc}
*/
public function setAuthPassword($password)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'setAuthPassword', [$password]);
return parent::setAuthPassword($password);
}
/**
* {@inheritDoc}
*/
public function generateRandomPassword()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'generateRandomPassword', []);
return parent::generateRandomPassword();
}
/**
* {@inheritDoc}
*/
public function __call($method, $arguments)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__call', [$method, $arguments]);
return parent::__call($method, $arguments);
}
/**
* {@inheritDoc}
*/
public function offsetExists($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetExists', [$offset]);
return parent::offsetExists($offset);
}
/**
* {@inheritDoc}
*/
public function offsetSet($key, $value)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetSet', [$key, $value]);
return parent::offsetSet($key, $value);
}
/**
* {@inheritDoc}
*/
public function offsetGet($key)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetGet', [$key]);
return parent::offsetGet($key);
}
/**
* {@inheritDoc}
*/
public function offsetUnset($offset)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'offsetUnset', [$offset]);
return parent::offsetUnset($offset);
}
/**
* {@inheritDoc}
*/
public function fromArray(\Doctrine\ORM\EntityManager $em, $source)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'fromArray', [$em, $source]);
return parent::fromArray($em, $source);
}
/**
* {@inheritDoc}
*/
public function toArray(\Doctrine\ORM\EntityManager $em, $deep = false, $form_mode = false)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', [$em, $deep, $form_mode]);
return parent::toArray($em, $deep, $form_mode);
}
}

View File

@ -5,29 +5,35 @@ use Entity;
class SongHistoryRepository extends \App\Doctrine\Repository
{
public function getNextSongForStation(Entity\Station $station, $force = false)
public function getNextSongForStation(Entity\Station $station, $is_autodj = false)
{
$threshold = 60 * 15;
$next_song = $this->_em->createQuery('SELECT sh, s, sm
FROM ' . $this->_entityName . ' sh JOIN sh.song s JOIN sh.media sm
WHERE sh.station_id = :station_id
AND sh.timestamp_cued >= :threshold
AND sh.sent_to_autodj = 0
AND sh.timestamp_start = 0
AND sh.timestamp_end = 0
ORDER BY sh.id DESC')
->setParameter('station_id', $station->id)
->setParameter('threshold', time() - $threshold)
->setParameter('threshold', time() - 60 * 15)
->setMaxResults(1)
->getOneOrNullResult();
if (!($next_song instanceof Entity\SongHistory) || $force) {
if (!($next_song instanceof Entity\SongHistory)) {
/** @var Entity\Repository\StationMediaRepository $media_repo */
$media_repo = $this->_em->getRepository(Entity\StationMedia::class);
$next_song = $media_repo->getNextSong($station);
}
if ($is_autodj) {
$next_song->sent_to_autodj = true;
$this->_em->persist($next_song);
$this->_em->flush();
}
return $next_song;
}

View File

@ -11,6 +11,7 @@ class SongHistory extends \App\Doctrine\Entity
{
public function __construct()
{
$this->sent_to_autodj = false;
$this->timestamp_cued = 0;
$this->timestamp_start = 0;
@ -51,6 +52,9 @@ class SongHistory extends \App\Doctrine\Entity
/** @Column(name="timestamp_cued", type="integer", nullable=true) */
protected $timestamp_cued;
/** @Column(name="sent_to_autodj", type="boolean") */
protected $sent_to_autodj;
/** @Column(name="timestamp_start", type="integer") */
protected $timestamp_start;

View File

@ -68,14 +68,16 @@ class InternalController extends BaseController
$history_repo = $this->em->getRepository(Entity\SongHistory::class);
/** @var Entity\SongHistory|null $sh */
$sh = $history_repo->getNextSongForStation($this->station);
$sh = $history_repo->getNextSongForStation($this->station, $this->hasParam('api_auth'));
if ($sh instanceof Entity\SongHistory) {
// 'annotate:type=\"song\",album=\"$ALBUM\",display_desc=\"$FULLSHOWNAME\",liq_start_next=\"2.5\",liq_fade_in=\"3.5\",liq_fade_out=\"3.5\":$SONGPATH'
$song_path = $sh->media->getFullPath();
return $this->_return('annotate:' . implode(',', $sh->media->getAnnotations()) . ':' . $song_path);
} else {
return $this->_return(APP_INCLUDE_ROOT . '/resources/error.mp3');
$error_mp3_path = (APP_INSIDE_DOCKER) ? '/usr/local/share/icecast/web/error.mp3' : APP_INCLUDE_ROOT . '/resources/error.mp3';
return $this->_return($error_mp3_path);
}
}

View File

@ -41,12 +41,7 @@ class Redis extends \Doctrine\Common\Cache\RedisCache
*/
public function saveMultiple(array $keysAndValues, $lifetime = 0)
{
$namespacedKeysAndValues = array();
foreach ($keysAndValues as $key => $value) {
$namespacedKeysAndValues[$key] = $value;
}
return $this->doSaveMultiple($namespacedKeysAndValues, $lifetime);
return $this->doSaveMultiple($keysAndValues, $lifetime);
}
/**

View File

@ -147,11 +147,6 @@ class NowPlaying extends SyncAbstract
$next_song = $this->history_repo->getNextSongForStation($station);
// Special check to prevent the same song looping infinitely.
if ($next_song->song_id === $song_obj->id) {
$next_song = $this->history_repo->getNextSongForStation($station, true);
}
if ($next_song instanceof Entity\SongHistory) {
$np->playing_next = $next_song->api();
}

View File

@ -7,6 +7,7 @@ $di = require dirname(__FILE__).'/../app/bootstrap.php';
// Load app, to generate routes, etc.
$di->get('app');
/** @var \Doctrine\ORM\EntityManager $em */
$em = $di['em'];
$db = $em->getConnection();
@ -16,9 +17,9 @@ $helperSet = new \Symfony\Component\Console\Helper\HelperSet(array(
'dialog' => new \Symfony\Component\Console\Helper\QuestionHelper(),
));
$config = $di['config'];
$settings = $di['app_settings'];
$cli = new \Symfony\Component\Console\Application($config->application->name.' Command Line Tools', \AzuraCast\Version::getVersion());
$cli = new \Symfony\Component\Console\Application($settings['name'].' Command Line Tools', \AzuraCast\Version::getVersion());
$cli->setCatchExceptions(true);
$cli->setHelperSet($helperSet);
@ -30,14 +31,14 @@ $migrate_config->setMigrationsTableName('app_migrations');
$migrate_config->setMigrationsDirectory(__DIR__.'/../app/models/Migration');
$migrate_config->setMigrationsNamespace('Migration');
$migration_commands = array(
$migration_commands = [
new \Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand(),
new \Doctrine\DBAL\Migrations\Tools\Console\Command\ExecuteCommand(),
new \Doctrine\DBAL\Migrations\Tools\Console\Command\GenerateCommand(),
new \Doctrine\DBAL\Migrations\Tools\Console\Command\MigrateCommand(),
new \Doctrine\DBAL\Migrations\Tools\Console\Command\StatusCommand(),
new \Doctrine\DBAL\Migrations\Tools\Console\Command\VersionCommand()
);
];
foreach($migration_commands as $cmd)
$cmd->setMigrationConfiguration($migrate_config);
@ -45,7 +46,7 @@ foreach($migration_commands as $cmd)
$cli->addCommands($migration_commands);
// App-specific commands
$cli->addCommands(array(
$cli->addCommands([
new \AzuraCast\Console\Command\ClearCache($di),
new \AzuraCast\Console\Command\RestartRadio($di),
new \AzuraCast\Console\Command\Sync($di),
@ -55,6 +56,6 @@ $cli->addCommands(array(
new \AzuraCast\Console\Command\GenerateApiDocs($di),
new \AzuraCast\Console\Command\UptimeWait($di),
new \AzuraCast\Console\Command\MigrateConfig($di),
));
]);
$cli->run();