Se añade version 1.0 de parser html

correciones menores a codigo anterior realizado.
Se añade html de prueba
Se añaden librerias de restapi
parent 8ea2da10
......@@ -16,9 +16,14 @@ class AppKernel extends Kernel
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new Propel\PropelBundle\PropelBundle(),
new FOS\RestBundle\FOSRestBundle(),
new JMS\SerializerBundle\JMSSerializerBundle(),
new Nelmio\ApiDocBundle\NelmioApiDocBundle(),
new Nelmio\CorsBundle\NelmioCorsBundle(),
new AppBundle\AppBundle(),
new BackendBundle\BackendBundle(),
new CampaniaBundle\CampaniaBundle(),
new WsBundle\WsBundle(),
);
if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
......
......@@ -23,7 +23,7 @@
</li>
<li class="menu-item " aria-haspopup="true" >
<a href="{{path('campania_listado')}}" class="menu-link "><i class="menu-bullet menu-bullet-line"><span></span></i>
<span class="menu-text">Listado Campaña</span></a>
<span class="menu-text">Listado Campañas</span></a>
</li>
{%if is_granted('ROLE_ADMIN')%}
<li class="menu-item " aria-haspopup="true" >
......
<html>
<body>
{%set fila =0, filaAux = 0%}
{%for contenido as contenidosHead%}
{%if fila != contenido.fila%}
{%set fila = contenido.fila, filaAux = contenido.fila%}
{%if loop.first%}<div class="row" id="{{contenido.getFila()}}">{%else%}</div><div class="row" id="{{contenido.getFila()}}">{%endif%}
{{contenido.contenido}}
{%else%}
{{contenido.contenido}}
{%endif%}
{%endfor%}
</body>
</html>
......@@ -439,11 +439,13 @@ class SymfonyRequirements extends RequirementCollection
'Change the permissions of either "<strong>app/logs/</strong>" or "<strong>var/logs/</strong>" directory so that the web server can write into it.'
);
if (version_compare($installedPhpVersion, '7.0.0', '<')) {
$this->addPhpIniRequirement(
'date.timezone', true, false,
'date.timezone setting must be set',
'Set the "<strong>date.timezone</strong>" setting in php.ini<a href="#phpini">*</a> (like Europe/Paris).'
);
}
if (false !== $requiredPhpVersion && version_compare($installedPhpVersion, $requiredPhpVersion, '>=')) {
$this->addRequirement(
......@@ -624,12 +626,6 @@ class SymfonyRequirements extends RequirementCollection
'Install and enable the <strong>mbstring</strong> extension.'
);
$this->addRecommendation(
function_exists('iconv'),
'iconv() should be available',
'Install and enable the <strong>iconv</strong> extension.'
);
$this->addRecommendation(
function_exists('utf8_decode'),
'utf8_decode() should be available',
......@@ -684,6 +680,21 @@ class SymfonyRequirements extends RequirementCollection
'Upgrade your <strong>intl</strong> extension with a newer ICU version (4+).'
);
if (class_exists('Symfony\Component\Intl\Intl')) {
$this->addRecommendation(
\Symfony\Component\Intl\Intl::getIcuDataVersion() <= \Symfony\Component\Intl\Intl::getIcuVersion(),
sprintf('intl ICU version installed on your system is outdated (%s) and does not match the ICU data bundled with Symfony (%s)', \Symfony\Component\Intl\Intl::getIcuVersion(), \Symfony\Component\Intl\Intl::getIcuDataVersion()),
'To get the latest internationalization data upgrade the ICU system package and the intl PHP extension.'
);
if (\Symfony\Component\Intl\Intl::getIcuDataVersion() <= \Symfony\Component\Intl\Intl::getIcuVersion()) {
$this->addRecommendation(
\Symfony\Component\Intl\Intl::getIcuDataVersion() === \Symfony\Component\Intl\Intl::getIcuVersion(),
sprintf('intl ICU version installed on your system (%s) does not match the ICU data bundled with Symfony (%s)', \Symfony\Component\Intl\Intl::getIcuVersion(), \Symfony\Component\Intl\Intl::getIcuDataVersion()),
'To avoid internationalization data inconsistencies upgrade the symfony/intl component.'
);
}
}
$this->addPhpIniRecommendation(
'intl.error_level',
create_function('$cfgValue', 'return (int) $cfgValue === 0;'),
......
......@@ -119,10 +119,14 @@ function echo_block($style, $title, $message)
echo PHP_EOL.PHP_EOL;
echo_style($style, str_repeat(' ', $width).PHP_EOL);
echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT).PHP_EOL);
echo_style($style, str_pad($message, $width, ' ', STR_PAD_RIGHT).PHP_EOL);
echo_style($style, str_repeat(' ', $width).PHP_EOL);
echo_style($style, str_repeat(' ', $width));
echo PHP_EOL;
echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT));
echo PHP_EOL;
echo_style($style, $message);
echo PHP_EOL;
echo_style($style, str_repeat(' ', $width));
echo PHP_EOL;
}
function has_color_support()
......
imports:
- { resource: parameters.yml }
- { resource: parameters_cors.yml }
- { resource: security.yml }
- { resource: services.yml }
- { resource: "@BackendBundle/Resources/config/services.yml" }
- { resource: "@CampaniaBundle/Resources/config/services.yml" }
- { resource: "@WsBundle/Resources/config/services.yml" }
# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
......@@ -136,3 +138,31 @@ propel:
dsn: %database_driver%:host=%database_host%;dbname=%database_name%;charset=UTF8
options: {}
attributes: {}
fos_rest:
param_fetcher_listener: true
view:
view_response_listener: force
disable_csrf_role: ROLE_API
nelmio_api_doc:
name: 'Documentacion WebServices Mcafee'
nelmio_cors:
# defaults:
# allow_credentials: false
# allow_origin: []
# allow_headers: []
# allow_methods: []
# expose_headers: []
# max_age: 0
# hosts: []
# origin_regex: false
# forced_allow_origin_value: ~
paths:
'^/api/':
origin_regex: true
allow_credentials: true
allow_origin: %cors_allow_origin%
allow_headers: ['Authorization', 'X-Requested-With', 'Content-Type', 'Accept', 'Origin', 'X-Custom-Auth']
allow_methods: ['POST', 'GET']
max_age: 3600
\ No newline at end of file
......@@ -20,4 +20,5 @@ parameters:
# A secret key that's used to generate certain security-related tokens
secret: ThisTokenIsNotSoSecretChangeIt
pass_ws_userapi: ~
jms_serializer.camel_case_naming_strategy.class: ~
# This file is auto-generated during the composer install
parameters:
cors_allow_origin: ['*']
......@@ -5,3 +5,13 @@ campania:
backend:
resource: "@BackendBundle/Resources/config/routing.yml"
prefix: /backend
ws:
resource: "@WsBundle/Resources/config/routing.yml"
prefix: /api
campania_api_test:
path: test/api/test
defaults: { _controller: CampaniaBundle:Campania:cargarHtmlFront }
\ No newline at end of file
......@@ -4,6 +4,10 @@ security:
# http://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded
providers:
in_memory:
memory:
users:
userApi: { password: "%pass_ws_userapi%", roles: [ 'ROLE_USER', 'ROLE_API' ] }
backend_backendusuario_provider:
id: backend_provider
......@@ -17,6 +21,11 @@ security:
firewalls:
# disables authentication for assets and the profiler, adapt it according to your needs
api_ws:
pattern: ^/api/
stateless: true
http_basic:
provider: in_memory
login_backend_firewall:
pattern: ^/backend/login$
......@@ -61,9 +70,12 @@ security:
# http://symfony.com/doc/current/cookbook/security/form_login_setup.html
access_control:
- { path: ^/api/doc, roles: ROLE_API_ADMIN }
- { path: ^/api, roles: [IS_AUTHENTICATED_FULLY,ROLE_API] }
- { path: ^/backend/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/backend/*, roles: [ROLE_ADMIN, ROLE_USER, ROLE_OBSERVER]}
role_hierarchy:
ROLE_API_ADMIN: [ROLE_API]
ROLE_ADMIN: [ROLE_USER, ROLE_OBSERVER]
......@@ -85,6 +85,7 @@
<column name="fil_id" phpName="FilId" type="INTEGER" required="false"/>
<column name="cco_entorno" phpName="CcoEntorno" type="INTEGER" required="false"/>
<column name="cco_contenido" phpName="CcoContenido" type="LONGVARCHAR" required="false"/>
<column name="cco_fila" phpName="CcoFila" type="INTEGER" required="false"/>
<column name="cco_columna" phpName="CcoColumna" type="INTEGER" required="false"/>
<column name="cco_orden" phpName="CcoOrden" type="INTEGER" required="false"/>
<column name="cco_tipo" phpName="CcoTipo" type="INTEGER" required="false"/>
......@@ -223,6 +224,29 @@
<parameter name="Engine" value="InnoDB"/>
</vendor>
</table>
<table name="template_css_relacion" phpName="TemplateCssRelacion" idMethod="native">
<column name="tcr_id" phpName="TcrId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="tem_id" phpName="TemId" type="INTEGER" required="false"/>
<column name="dco_id" phpName="DcoId" type="INTEGER" required="false"/>
<column name="tcr_tipo" phpName="TcrTipo" type="INTEGER" required="false"/>
<column name="tcr_entorno" phpName="TcrEntorno" type="INTEGER" required="false"/>
<column name="tcr_clase_css" phpName="TcrClaseCss" type="VARCHAR" size="1000" required="false"/>
<foreign-key foreignTable="disposicion_columnas" name="fk_dco_id_relacion" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference local="dco_id" foreign="dco_id"/>
</foreign-key>
<foreign-key foreignTable="template" name="fk_tem_id_relacion" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference local="tem_id" foreign="tem_id"/>
</foreign-key>
<index name="fk_tem_id_relacion_idx">
<index-column name="tem_id"/>
</index>
<index name="fk_dco_id_relacion_idx">
<index-column name="dco_id"/>
</index>
<vendor type="mysql">
<parameter name="Engine" value="InnoDB"/>
</vendor>
</table>
<table name="tipo" phpName="Tipo" idMethod="native">
<column name="tip_id" phpName="TipId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="tip_nombre" phpName="TipNombre" type="VARCHAR" size="255" required="false"/>
......
......@@ -4,68 +4,20 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "e3a41c8fd2fd24d88c7760a035d3b770",
"content-hash": "93a3bdc8c4403510e959ee09f2908494",
"packages": [
{
"name": "automattic/woocommerce",
"version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/woocommerce/wc-api-php.git",
"reference": "a71aa95cc3de3f1d68c6303525d03c0557a96137"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/woocommerce/wc-api-php/zipball/a71aa95cc3de3f1d68c6303525d03c0557a96137",
"reference": "a71aa95cc3de3f1d68c6303525d03c0557a96137",
"shasum": ""
},
"require": {
"ext-curl": "*",
"ext-json": "*",
"php": ">= 5.4.0"
},
"require-dev": {
"phpunit/phpunit": "*",
"squizlabs/php_codesniffer": "3.*"
},
"type": "library",
"autoload": {
"psr-4": {
"Automattic\\WooCommerce\\": [
"src/WooCommerce"
]
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Claudio Sanches",
"email": "claudio.sanches@automattic.com"
}
],
"description": "A PHP wrapper for the WooCommerce REST API",
"keywords": [
"api",
"woocommerce"
],
"time": "2019-01-16T20:28:40+00:00"
},
{
"name": "composer/ca-bundle",
"version": "1.2.7",
"version": "1.2.8",
"source": {
"type": "git",
"url": "https://github.com/composer/ca-bundle.git",
"reference": "95c63ab2117a72f48f5a55da9740a3273d45b7fd"
"reference": "8a7ecad675253e4654ea05505233285377405215"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/95c63ab2117a72f48f5a55da9740a3273d45b7fd",
"reference": "95c63ab2117a72f48f5a55da9740a3273d45b7fd",
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/8a7ecad675253e4654ea05505233285377405215",
"reference": "8a7ecad675253e4654ea05505233285377405215",
"shasum": ""
},
"require": {
......@@ -113,12 +65,16 @@
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2020-04-08T08:27:21+00:00"
"time": "2020-08-23T12:54:47+00:00"
},
{
"name": "doctrine/annotations",
......@@ -903,170 +859,80 @@
"time": "2017-12-17T02:57:51+00:00"
},
{
"name": "dompdf/dompdf",
"version": "v0.8.3",
"name": "friendsofsymfony/rest-bundle",
"version": "2.4.0",
"source": {
"type": "git",
"url": "https://github.com/dompdf/dompdf.git",
"reference": "75f13c700009be21a1965dc2c5b68a8708c22ba2"
"url": "https://github.com/FriendsOfSymfony/FOSRestBundle.git",
"reference": "3725279a6554c1d894eee0b377f49d3f69e3c217"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/dompdf/dompdf/zipball/75f13c700009be21a1965dc2c5b68a8708c22ba2",
"reference": "75f13c700009be21a1965dc2c5b68a8708c22ba2",
"url": "https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/zipball/3725279a6554c1d894eee0b377f49d3f69e3c217",
"reference": "3725279a6554c1d894eee0b377f49d3f69e3c217",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-mbstring": "*",
"phenx/php-font-lib": "0.5.*",
"phenx/php-svg-lib": "0.3.*",
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8|^5.5|^6.5",
"squizlabs/php_codesniffer": "2.*"
},
"suggest": {
"ext-gd": "Needed to process images",
"ext-gmagick": "Improves image processing performance",
"ext-imagick": "Improves image processing performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-develop": "0.7-dev"
}
},
"autoload": {
"psr-4": {
"Dompdf\\": "src/"
},
"classmap": [
"lib/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-2.1"
],
"authors": [
{
"name": "Fabien Ménager",
"email": "fabien.menager@gmail.com"
},
{
"name": "Brian Sweeney",
"email": "eclecticgeek@gmail.com"
},
{
"name": "Gabriel Bull",
"email": "me@gabrielbull.com"
}
],
"description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter",
"homepage": "https://github.com/dompdf/dompdf",
"time": "2018-12-14T02:40:31+00:00"
},
{
"name": "guzzlehttp/guzzle",
"version": "6.5.5",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
"reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
"shasum": ""
"doctrine/inflector": "^1.0",
"php": "^5.5.9|~7.0",
"psr/log": "^1.0",
"symfony/config": "^2.7|^3.0|^4.0",
"symfony/debug": "^2.7|^3.0|^4.0",
"symfony/dependency-injection": "^2.7|^3.0|^4.0",
"symfony/event-dispatcher": "^2.7|^3.0|^4.0",
"symfony/finder": "^2.7|^3.0|^4.0",
"symfony/framework-bundle": "^2.7|^3.0|^4.0",
"symfony/http-foundation": "^2.7|^3.0|^4.0",
"symfony/http-kernel": "^2.7|^3.0|^4.0",
"symfony/routing": "^2.7|^3.0|^4.0",
"symfony/security-core": "^2.7|^3.0|^4.0",
"symfony/templating": "^2.7|^3.0|^4.0",
"willdurand/jsonp-callback-validator": "^1.0",
"willdurand/negotiation": "^2.0"
},
"require": {
"ext-json": "*",
"guzzlehttp/promises": "^1.0",
"guzzlehttp/psr7": "^1.6.1",
"php": ">=5.5",
"symfony/polyfill-intl-idn": "^1.17.0"
"conflict": {
"jms/serializer": "1.3.0",
"jms/serializer-bundle": "<1.2.0",
"sensio/framework-extra-bundle": "<3.0.13"
},
"require-dev": {
"ext-curl": "*",
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
"psr/log": "^1.1"
"jms/serializer-bundle": "^1.2|^2.0",
"phpoption/phpoption": "^1.1",
"psr/http-message": "^1.0",
"sensio/framework-extra-bundle": "^3.0.13|^4.0|^5.0",
"symfony/asset": "^2.7|^3.0|^4.0",
"symfony/browser-kit": "^2.7|^3.0|^4.0",
"symfony/css-selector": "^2.7|^3.0|^4.0",
"symfony/dependency-injection": "^2.7.20|^3.0|^4.0",
"symfony/expression-language": "~2.7|^3.0|^4.0",
"symfony/form": "^2.7|^3.0|^4.0",
"symfony/phpunit-bridge": "^4.0",
"symfony/security-bundle": "^2.7|^3.0|^4.0",
"symfony/serializer": "^2.7.11|^3.0.4|^4.0",
"symfony/twig-bundle": "^2.7|^3.0|^4.0",
"symfony/validator": "^2.7|^3.0|^4.0",
"symfony/web-profiler-bundle": "^2.7|^3.0|^4.0",
"symfony/yaml": "^2.7|^3.0|^4.0"
},
"suggest": {
"psr/log": "Required for using the Log middleware"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "6.5-dev"
}
},
"autoload": {
"psr-4": {
"GuzzleHttp\\": "src/"
},
"files": [
"src/functions_include.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
}
],
"description": "Guzzle is a PHP HTTP client library",
"homepage": "http://guzzlephp.org/",
"keywords": [
"client",
"curl",
"framework",
"http",
"http client",
"rest",
"web service"
],
"time": "2020-06-16T21:01:06+00:00"
},
{
"name": "guzzlehttp/promises",
"version": "v1.3.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
"shasum": ""
},
"require": {
"php": ">=5.5.0"
"jms/serializer-bundle": "Add support for advanced serialization capabilities, recommended, requires ^1.0",
"sensio/framework-extra-bundle": "Add support for the request body converter and the view response listener, requires ^3.0",
"symfony/expression-language": "Add support for using the expression language in the routing, requires ^2.7|^3.0",
"symfony/serializer": "Add support for basic serialization capabilities and xml decoding, requires ^2.7|^3.0",
"symfony/validator": "Add support for validation capabilities in the ParamFetcher, requires ^2.7|^3.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0"
},
"type": "library",
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "1.4-dev"
"dev-master": "2.4-dev"
}
},
"autoload": {
"psr-4": {
"GuzzleHttp\\Promise\\": "src/"
"FOS\\RestBundle\\": ""
},
"files": [
"src/functions_include.php"
"exclude-from-classmap": [
"Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
......@@ -1075,87 +941,24 @@
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
}
],
"description": "Guzzle promises library",
"keywords": [
"promise"
],
"time": "2016-12-20T10:07:11+00:00"
},
{
"name": "guzzlehttp/psr7",
"version": "1.6.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "239400de7a173fe9901b9ac7c06497751f00727a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
"reference": "239400de7a173fe9901b9ac7c06497751f00727a",
"shasum": ""
},
"require": {
"php": ">=5.4.0",
"psr/http-message": "~1.0",
"ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
},
"provide": {
"psr/http-message-implementation": "1.0"
"name": "Lukas Kahwe Smith",
"email": "smith@pooteeweet.org"
},
"require-dev": {
"ext-zlib": "*",
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
},
"suggest": {
"zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.6-dev"
}
},
"autoload": {
"psr-4": {
"GuzzleHttp\\Psr7\\": "src/"
},
"files": [
"src/functions_include.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
"name": "FriendsOfSymfony Community",
"homepage": "https://github.com/friendsofsymfony/FOSRestBundle/contributors"
},
{
"name": "Tobias Schultze",
"homepage": "https://github.com/Tobion"
"name": "Konstantin Kudryashov",
"email": "ever.zet@gmail.com"
}
],
"description": "PSR-7 message implementation that also provides common utility methods",
"description": "This Bundle provides various tools to rapidly develop RESTful API's with Symfony",
"homepage": "http://friendsofsymfony.github.com",
"keywords": [
"http",
"message",
"psr-7",
"request",
"response",
"stream",
"uri",
"url"
"rest"
],
"time": "2019-07-01T23:21:34+00:00"
"time": "2018-08-21T16:54:14+00:00"
},
{
"name": "incenteev/composer-parameter-handler",
......@@ -1547,95 +1350,53 @@
"time": "2017-05-10T10:17:17+00:00"
},
{
"name": "longman/telegram-bot",
"version": "0.63.1",
"name": "michelf/php-markdown",
"version": "1.9.0",
"source": {
"type": "git",
"url": "https://github.com/php-telegram-bot/core.git",
"reference": "1cf5d1fd38c81df7650358d1ae85a16957db5d22"
"url": "https://github.com/michelf/php-markdown.git",
"reference": "c83178d49e372ca967d1a8c77ae4e051b3a3c75c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-telegram-bot/core/zipball/1cf5d1fd38c81df7650358d1ae85a16957db5d22",
"reference": "1cf5d1fd38c81df7650358d1ae85a16957db5d22",
"url": "https://api.github.com/repos/michelf/php-markdown/zipball/c83178d49e372ca967d1a8c77ae4e051b3a3c75c",
"reference": "c83178d49e372ca967d1a8c77ae4e051b3a3c75c",
"shasum": ""
},
"require": {
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"ext-pdo": "*",
"guzzlehttp/guzzle": "^6.3",
"php": "^5.5|^7.0",
"psr/log": "^1.1"
"php": ">=5.3.0"
},
"require-dev": {
"dms/phpunit-arraysubset-asserts": "^0.1.0",
"monolog/monolog": "^2.0",
"phpunit/phpunit": "^8.4",
"squizlabs/php_codesniffer": "^3.4"
"phpunit/phpunit": ">=4.3 <5.8"
},
"type": "library",
"autoload": {
"psr-4": {
"Longman\\TelegramBot\\": "src/"
"Michelf\\": "Michelf/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
"BSD-3-Clause"
],
"authors": [
{
"name": "Avtandil Kikabidze aka LONGMAN",
"email": "akalongman@gmail.com",
"homepage": "http://longman.me",
"name": "Michel Fortin",
"email": "michel.fortin@michelf.ca",
"homepage": "https://michelf.ca/",
"role": "Developer"
},
{
"name": "PHP Telegram Bot Team",
"homepage": "https://github.com/php-telegram-bot/core/graphs/contributors",
"role": "Developer"
"name": "John Gruber",
"homepage": "https://daringfireball.net/"
}
],
"description": "PHP Telegram bot",
"homepage": "https://github.com/php-telegram-bot/core",
"description": "PHP Markdown",
"homepage": "https://michelf.ca/projects/php-markdown/",
"keywords": [
"api",
"bot",
"telegram"
],
"funding": [
{
"url": "https://github.com/php-telegram-bot/core",
"type": "custom"
},
{
"url": "https://github.com/noplanman",
"type": "github"
},
{
"url": "https://ko-fi.com/phptelegrambot",
"type": "ko_fi"
},
{
"url": "https://liberapay.com/PHP-Telegram-Bot",
"type": "liberapay"
},
{
"url": "https://opencollective.com/php-telegram-bot",
"type": "open_collective"
},
{
"url": "https://www.patreon.com/phptelegrambot",
"type": "patreon"
},
{
"url": "https://tidelift.com/funding/github/packagist/longman/telegram-bot",
"type": "tidelift"
}
"markdown"
],
"time": "2020-06-24T12:05:37+00:00"
"time": "2019-12-02T02:32:27+00:00"
},
{
"name": "monolog/monolog",
......@@ -1725,33 +1486,66 @@
"time": "2020-07-23T08:35:51+00:00"
},
{
"name": "paragonie/random_compat",
"version": "v2.0.18",
"name": "nelmio/api-doc-bundle",
"version": "2.13.4",
"target-dir": "Nelmio/ApiDocBundle",
"source": {
"type": "git",
"url": "https://github.com/paragonie/random_compat.git",
"reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db"
"url": "https://github.com/nelmio/NelmioApiDocBundle.git",
"reference": "28802f2c44dbbf29aa7f5dc80a10f44d3558f580"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/paragonie/random_compat/zipball/0a58ef6e3146256cc3dc7cc393927bcc7d1b72db",
"reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db",
"url": "https://api.github.com/repos/nelmio/NelmioApiDocBundle/zipball/28802f2c44dbbf29aa7f5dc80a10f44d3558f580",
"reference": "28802f2c44dbbf29aa7f5dc80a10f44d3558f580",
"shasum": ""
},
"require": {
"php": ">=5.2.0"
"michelf/php-markdown": "~1.4",
"php": ">=5.4",
"symfony/console": "~2.3|~3.0|~4.0",
"symfony/framework-bundle": "~2.3|~3.0|~4.0",
"symfony/twig-bundle": "~2.3|~3.0|~4.0"
},
"conflict": {
"jms/serializer": "<0.12",
"jms/serializer-bundle": "<0.11",
"symfony/symfony": "~2.7.8",
"twig/twig": "<1.12"
},
"require-dev": {
"phpunit/phpunit": "4.*|5.*"
"doctrine/doctrine-bundle": "~1.5",
"doctrine/orm": "~2.3",
"dunglas/api-bundle": "~1.0",
"friendsofsymfony/rest-bundle": "~1.0|~2.0",
"jms/serializer-bundle": ">=0.11",
"sensio/framework-extra-bundle": "~3.0",
"symfony/browser-kit": "~2.3|~3.0|~4.0",
"symfony/css-selector": "~2.3|~3.0|~4.0",
"symfony/finder": "~2.3|~3.0|~4.0",
"symfony/form": "~2.3|~3.0|~4.0",
"symfony/phpunit-bridge": "~2.7|~3.0|~4.0",
"symfony/serializer": "~2.7|~3.0|~4.0",
"symfony/validator": "~2.3|~3.0|~4.0",
"symfony/yaml": "~2.3|~3.0|~4.0"
},
"suggest": {
"ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
"dunglas/api-bundle": "For making use of resources definitions of DunglasApiBundle.",
"friendsofsymfony/rest-bundle": "For making use of REST information in the doc.",
"jms/serializer": "For making use of serializer information in the doc.",
"symfony/form": "For using form definitions as input.",
"symfony/validator": "For making use of validator information in the doc."
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-2.x": "2.13-dev"
}
},
"type": "library",
"autoload": {
"files": [
"lib/random.php"
]
"psr-0": {
"Nelmio\\ApiDocBundle": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
......@@ -1759,96 +1553,129 @@
],
"authors": [
{
"name": "Paragon Initiative Enterprises",
"email": "security@paragonie.com",
"homepage": "https://paragonie.com"
"name": "Nelmio",
"homepage": "http://nelm.io"
},
{
"name": "Symfony Community",
"homepage": "https://github.com/nelmio/NelmioApiDocBundle/contributors"
}
],
"description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
"description": "Generates documentation for your REST API from annotations",
"keywords": [
"csprng",
"polyfill",
"pseudorandom",
"random"
"api",
"doc",
"documentation",
"rest"
],
"time": "2019-01-03T20:59:08+00:00"
"time": "2019-06-01T13:34:59+00:00"
},
{
"name": "phenx/php-font-lib",
"version": "0.5.2",
"name": "nelmio/cors-bundle",
"version": "1.5.6",
"source": {
"type": "git",
"url": "https://github.com/PhenX/php-font-lib.git",
"reference": "ca6ad461f032145fff5971b5985e5af9e7fa88d8"
"url": "https://github.com/nelmio/NelmioCorsBundle.git",
"reference": "10a24c10f242440211ed31075e74f81661c690d9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PhenX/php-font-lib/zipball/ca6ad461f032145fff5971b5985e5af9e7fa88d8",
"reference": "ca6ad461f032145fff5971b5985e5af9e7fa88d8",
"url": "https://api.github.com/repos/nelmio/NelmioCorsBundle/zipball/10a24c10f242440211ed31075e74f81661c690d9",
"reference": "10a24c10f242440211ed31075e74f81661c690d9",
"shasum": ""
},
"require": {
"symfony/framework-bundle": "^2.7 || ^3.0 || ^4.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5 || ^6 || ^7"
"matthiasnoback/symfony-dependency-injection-test": "^1.0 || ^2.0",
"mockery/mockery": "^0.9 || ^1.0",
"symfony/phpunit-bridge": "^2.7 || ^3.0 || ^4.0"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "1.5.x-dev"
}
},
"type": "library",
"autoload": {
"psr-4": {
"FontLib\\": "src/FontLib"
}
"Nelmio\\CorsBundle\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-3.0"
"MIT"
],
"authors": [
{
"name": "Fabien Ménager",
"email": "fabien.menager@gmail.com"
"name": "Nelmio",
"homepage": "http://nelm.io"
},
{
"name": "Symfony Community",
"homepage": "https://github.com/nelmio/NelmioCorsBundle/contributors"
}
],
"description": "A library to read, parse, export and make subsets of different types of font files.",
"homepage": "https://github.com/PhenX/php-font-lib",
"time": "2020-03-08T15:31:32+00:00"
"description": "Adds CORS (Cross-Origin Resource Sharing) headers support in your Symfony2 application",
"keywords": [
"api",
"cors",
"crossdomain"
],
"time": "2019-06-17T08:53:14+00:00"
},
{
"name": "phenx/php-svg-lib",
"version": "v0.3.3",
"name": "paragonie/random_compat",
"version": "v2.0.18",
"source": {
"type": "git",
"url": "https://github.com/PhenX/php-svg-lib.git",
"reference": "5fa61b65e612ce1ae15f69b3d223cb14ecc60e32"
"url": "https://github.com/paragonie/random_compat.git",
"reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PhenX/php-svg-lib/zipball/5fa61b65e612ce1ae15f69b3d223cb14ecc60e32",
"reference": "5fa61b65e612ce1ae15f69b3d223cb14ecc60e32",
"url": "https://api.github.com/repos/paragonie/random_compat/zipball/0a58ef6e3146256cc3dc7cc393927bcc7d1b72db",
"reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db",
"shasum": ""
},
"require": {
"sabberworm/php-css-parser": "^8.3"
"php": ">=5.2.0"
},
"require-dev": {
"phpunit/phpunit": "^5.5|^6.5"
"phpunit/phpunit": "4.*|5.*"
},
"suggest": {
"ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
},
"type": "library",
"autoload": {
"psr-4": {
"Svg\\": "src/Svg"
}
"files": [
"lib/random.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-3.0"
"MIT"
],
"authors": [
{
"name": "Fabien Ménager",
"email": "fabien.menager@gmail.com"
}
],
"description": "A library to read, parse and export to PDF SVG files.",
"homepage": "https://github.com/PhenX/php-svg-lib",
"time": "2019-09-11T20:02:13+00:00"
"name": "Paragon Initiative Enterprises",
"email": "security@paragonie.com",
"homepage": "https://paragonie.com"
}
],
"description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
"keywords": [
"csprng",
"polyfill",
"pseudorandom",
"random"
],
"time": "2019-01-03T20:59:08+00:00"
},
{
"name": "phing/phing",
......@@ -2183,56 +2010,6 @@
],
"time": "2019-11-05T14:55:42+00:00"
},
{
"name": "psr/http-message",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-message.git",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Http\\Message\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for HTTP messages",
"homepage": "https://github.com/php-fig/http-message",
"keywords": [
"http",
"http-message",
"psr",
"psr-7",
"request",
"response"
],
"time": "2016-08-06T14:39:51+00:00"
},
{
"name": "psr/log",
"version": "1.1.3",
......@@ -2280,91 +2057,6 @@
],
"time": "2020-03-23T09:12:05+00:00"
},
{
"name": "ralouphie/getallheaders",
"version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/ralouphie/getallheaders.git",
"reference": "120b605dfeb996808c31b6477290a714d356e822"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
"reference": "120b605dfeb996808c31b6477290a714d356e822",
"shasum": ""
},
"require": {
"php": ">=5.6"
},
"require-dev": {
"php-coveralls/php-coveralls": "^2.1",
"phpunit/phpunit": "^5 || ^6.5"
},
"type": "library",
"autoload": {
"files": [
"src/getallheaders.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ralph Khattar",
"email": "ralph.khattar@gmail.com"
}
],
"description": "A polyfill for getallheaders.",
"time": "2019-03-08T08:55:37+00:00"
},
{
"name": "sabberworm/php-css-parser",
"version": "8.3.1",
"source": {
"type": "git",
"url": "https://github.com/sabberworm/PHP-CSS-Parser.git",
"reference": "d217848e1396ef962fb1997cf3e2421acba7f796"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/d217848e1396ef962fb1997cf3e2421acba7f796",
"reference": "d217848e1396ef962fb1997cf3e2421acba7f796",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"require-dev": {
"codacy/coverage": "^1.4",
"phpunit/phpunit": "~4.8"
},
"type": "library",
"autoload": {
"psr-0": {
"Sabberworm\\CSS": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Raphael Schweikert"
}
],
"description": "Parser for CSS Files written in PHP",
"homepage": "http://www.sabberworm.com/blog/2010/6/10/php-css-parser",
"keywords": [
"css",
"parser",
"stylesheet"
],
"time": "2020-06-01T09:10:00+00:00"
},
{
"name": "sensio/distribution-bundle",
"version": "v5.0.25",
......@@ -2877,172 +2569,6 @@
],
"time": "2020-07-14T12:35:20+00:00"
},
{
"name": "symfony/polyfill-intl-idn",
"version": "v1.18.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-idn.git",
"reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/5dcab1bc7146cf8c1beaa4502a3d9be344334251",
"reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/polyfill-intl-normalizer": "^1.10",
"symfony/polyfill-php70": "^1.10",
"symfony/polyfill-php72": "^1.10"
},
"suggest": {
"ext-intl": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.18-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Intl\\Idn\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Laurent Bassin",
"email": "laurent@bassin.info"
},
{
"name": "Trevor Rowbotham",
"email": "trevor.rowbotham@pm.me"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"idn",
"intl",
"polyfill",
"portable",
"shim"
],
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-08-04T06:02:08+00:00"
},
{
"name": "symfony/polyfill-intl-normalizer",
"version": "v1.18.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
"reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e",
"reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"suggest": {
"ext-intl": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.18-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Intl\\Normalizer\\": ""
},
"files": [
"bootstrap.php"
],
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for intl's Normalizer class and related functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"intl",
"normalizer",
"polyfill",
"portable",
"shim"
],
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-07-14T12:35:20+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.18.1",
......@@ -3421,79 +2947,6 @@
],
"time": "2020-07-14T12:35:20+00:00"
},
{
"name": "symfony/polyfill-php72",
"version": "v1.18.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "639447d008615574653fb3bc60d1986d7172eaae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae",
"reference": "639447d008615574653fb3bc60d1986d7172eaae",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.18-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php72\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-07-14T12:35:20+00:00"
},
{
"name": "symfony/polyfill-util",
"version": "v1.18.1",
......@@ -3686,23 +3139,25 @@
},
{
"name": "symfony/symfony",
"version": "v2.8.5",
"version": "v2.8.52",
"source": {
"type": "git",
"url": "https://github.com/symfony/symfony.git",
"reference": "39ddd2383f4113cf67f8b28cde2c9d3fa340c3c2"
"reference": "88f3ef62d6ab870128352c8686c7889562698faf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/symfony/zipball/39ddd2383f4113cf67f8b28cde2c9d3fa340c3c2",
"reference": "39ddd2383f4113cf67f8b28cde2c9d3fa340c3c2",
"url": "https://api.github.com/repos/symfony/symfony/zipball/88f3ef62d6ab870128352c8686c7889562698faf",
"reference": "88f3ef62d6ab870128352c8686c7889562698faf",
"shasum": ""
},
"require": {
"doctrine/common": "~2.4",
"ext-xml": "*",
"php": ">=5.3.9",
"psr/log": "~1.0",
"symfony/polyfill-apcu": "~1.1",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-intl-icu": "~1.0",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php54": "~1.0",
......@@ -3711,10 +3166,11 @@
"symfony/polyfill-php70": "~1.0",
"symfony/polyfill-util": "~1.0",
"symfony/security-acl": "~2.7|~3.0.0",
"twig/twig": "~1.23|~2.0"
"twig/twig": "~1.34|~2.4"
},
"conflict": {
"phpdocumentor/reflection": "<1.0.7"
"phpdocumentor/reflection": "<1.0.7",
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0"
},
"replace": {
"symfony/asset": "self.version",
......@@ -3765,14 +3221,17 @@
"symfony/yaml": "self.version"
},
"require-dev": {
"doctrine/annotations": "~1.0",
"doctrine/data-fixtures": "1.0.*",
"doctrine/dbal": "~2.4",
"doctrine/doctrine-bundle": "~1.2",
"doctrine/orm": "~2.4,>=2.4.5",
"egulias/email-validator": "~1.2",
"egulias/email-validator": "~1.2,>=1.2.1",
"monolog/monolog": "~1.11",
"ocramius/proxy-manager": "~0.4|~1.0|~2.0",
"phpdocumentor/reflection": "^1.0.7"
"phpdocumentor/reflection": "^1.0.7",
"sensio/framework-extra-bundle": "^3.0.2",
"symfony/phpunit-bridge": "~3.4|~4.0"
},
"type": "library",
"extra": {
......@@ -3816,58 +3275,7 @@
"keywords": [
"framework"
],
"time": "2016-04-29T15:34:08+00:00"
},
{
"name": "treinetic/imageartist",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/Treinetic/ImageArtist.git",
"reference": "483b966dca51eb809aeb048df460e26311c23db1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Treinetic/ImageArtist/zipball/483b966dca51eb809aeb048df460e26311c23db1",
"reference": "483b966dca51eb809aeb048df460e26311c23db1",
"shasum": ""
},
"require": {
"ext-gd": "*",
"php": ">=5.5.0"
},
"require-dev": {
"phpunit/phpunit": "4.*",
"scrutinizer/ocular": "~1.1"
},
"type": "library",
"autoload": {
"psr-4": {
"Treinetic\\ImageArtist\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Imal hasaranga",
"email": "imaa95@gmail.com"
}
],
"description": "ImageArtist is a php gd Wrapper which makes Image manipulation insanely easy, we introduce ImageArtist as Photoshop for php",
"keywords": [
"Easy GD Wrapper",
"GD Made Easy",
"Image Shape crop",
"PHP GD Wrapper",
"image merge",
"image to base64",
"scale image",
"write text on image"
],
"time": "2018-11-21T08:30:30+00:00"
"time": "2019-11-13T08:36:42+00:00"
},
{
"name": "twig/twig",
......@@ -3932,6 +3340,98 @@
"templating"
],
"time": "2020-02-11T05:59:23+00:00"
},
{
"name": "willdurand/jsonp-callback-validator",
"version": "v1.1.0",
"source": {
"type": "git",
"url": "https://github.com/willdurand/JsonpCallbackValidator.git",
"reference": "1a7d388bb521959e612ef50c5c7b1691b097e909"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/willdurand/JsonpCallbackValidator/zipball/1a7d388bb521959e612ef50c5c7b1691b097e909",
"reference": "1a7d388bb521959e612ef50c5c7b1691b097e909",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "~3.7"
},
"type": "library",
"autoload": {
"psr-0": {
"JsonpCallbackValidator": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "William Durand",
"email": "william.durand1@gmail.com",
"homepage": "http://www.willdurand.fr"
}
],
"description": "JSONP callback validator.",
"time": "2014-01-20T22:35:06+00:00"
},
{
"name": "willdurand/negotiation",
"version": "v2.3.1",
"source": {
"type": "git",
"url": "https://github.com/willdurand/Negotiation.git",
"reference": "03436ededa67c6e83b9b12defac15384cb399dc9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/willdurand/Negotiation/zipball/03436ededa67c6e83b9b12defac15384cb399dc9",
"reference": "03436ededa67c6e83b9b12defac15384cb399dc9",
"shasum": ""
},
"require": {
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "~4.5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3-dev"
}
},
"autoload": {
"psr-4": {
"Negotiation\\": "src/Negotiation"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "William Durand",
"email": "will+git@drnd.me"
}
],
"description": "Content Negotiation tools for PHP provided as a standalone library.",
"homepage": "http://williamdurand.fr/Negotiation/",
"keywords": [
"accept",
"content",
"format",
"header",
"negotiation"
],
"time": "2017-05-14T17:21:12+00:00"
}
],
"packages-dev": [
......
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-4": {
"": "src/"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"autoload-dev": {
"files": [ "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php" ]
},
"require": {
"php": ">=5.3.9",
"automattic/woocommerce": "^3.0",
"doctrine/doctrine-bundle": "~1.4",
"doctrine/orm": "^2.4.8",
"dompdf/dompdf": "^0.8.3",
"incenteev/composer-parameter-handler": "~2.0",
"jms/serializer-bundle": "^1.1",
"longman/telegram-bot": "^0.63.1",
"propel/propel-bundle": "^1.5",
"sensio/framework-extra-bundle": "^3.0.2",
"symfony/monolog-bundle": "^3.0.2",
"symfony/swiftmailer-bundle": "~2.3,>=2.3.10",
"symfony/symfony": "2.8.5",
"sensio/distribution-bundle": "~5.0",
"treinetic/imageartist": "^1.0",
"twig/twig": "^1.5"
},
"require-dev": {
"sensio/generator-bundle": "~3.0",
"symfony/phpunit-bridge": "~2.7"
},
"scripts": {
"symfony-scripts": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"post-install-cmd": [
"@symfony-scripts"
],
"post-update-cmd": [
"@symfony-scripts"
]
},
"config": {
"bin-dir": "bin",
"platform": {
"php": "5.6"
},
"sort-packages": true
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.8-dev"
}
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-4": {
"": "src/"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"autoload-dev": {
"files": [ "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php" ]
},
"require": {
"php": ">=5.3.9",
"automattic/woocommerce": "^3.0",
"doctrine/doctrine-bundle": "~1.4",
"doctrine/orm": "^2.4.8",
"dompdf/dompdf": "^0.8.3",
"incenteev/composer-parameter-handler": "~2.0",
"jms/serializer-bundle": "^1.1",
"longman/telegram-bot": "^0.63.1",
"propel/propel-bundle": "^1.5",
"sensio/framework-extra-bundle": "^3.0.2",
"symfony/monolog-bundle": "^3.0.2",
"symfony/swiftmailer-bundle": "~2.3,>=2.3.10",
"symfony/symfony": "2.8.5",
"sensio/distribution-bundle": "~5.0",
"treinetic/imageartist": "^1.0",
"twig/twig": "^1.5"
},
"require-dev": {
"sensio/generator-bundle": "~3.0",
"symfony/phpunit-bridge": "~2.7"
},
"scripts": {
"symfony-scripts": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"post-install-cmd": [
"@symfony-scripts"
],
"post-update-cmd": [
"@symfony-scripts"
]
},
"config": {
"bin-dir": "bin",
"platform": {
"php": "5.6"
},
"sort-packages": true
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.8-dev"
}
}
}
......@@ -28,6 +28,17 @@ class Utiles {
return $log;
}
public static function isMobile($useragent) {
if (!$useragent) {
return -1;
}
return (
preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i', $useragent) ||
preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i', substr($useragent, 0, 4))
);
}
public static function isMsisdn2($msisdn) {
// if(preg_match("/^[0-9]+$/", $msisdn) && strlen($msisdn) == 11)
if (is_numeric($msisdn) && strlen($msisdn) == 9)
......
......@@ -10,4 +10,7 @@ class Disposicion extends BaseDisposicion
const ELIMINADO_FALSE = 0;
const ACTIVO_TRUE = 1;
const ACTIVO_FALSE = 0;
const DISPOSICION_MOVIL = 1;
const DISPOSICION_DESKTOP = 2;
const DISPOSICION_AMBOS = 3;
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseTemplateCssRelacion;
class TemplateCssRelacion extends BaseTemplateCssRelacion
{
const SECCION_HEAD = 1;
const SECCION_BODY = 2;
const SECCION_FOOTER = 3;
const ENTORNO_MOVIL = 1;
const ENTORNO_DESKTOP = 2;
const ENTORNO_AMBOS = 3;
const TIPO_CONTENIDO_TEXTO = 1;
const TIPO_CONTENIDO_IMAGEN = 2;
const TIPO_CONTENIDO_VIDEO = 3;
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseTemplateCssRelacionPeer;
class TemplateCssRelacionPeer extends BaseTemplateCssRelacionPeer
{
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseTemplateCssRelacionQuery;
class TemplateCssRelacionQuery extends BaseTemplateCssRelacionQuery
{
}
......@@ -50,6 +50,7 @@ class CampaniaContenidoTableMap extends TableMap
$this->addForeignKey('fil_id', 'FilId', 'INTEGER', 'fila', 'fil_id', false, null, null);
$this->addColumn('cco_entorno', 'CcoEntorno', 'INTEGER', false, null, null);
$this->addColumn('cco_contenido', 'CcoContenido', 'LONGVARCHAR', false, null, null);
$this->addColumn('cco_fila', 'CcoFila', 'INTEGER', false, null, null);
$this->addColumn('cco_columna', 'CcoColumna', 'INTEGER', false, null, null);
$this->addColumn('cco_orden', 'CcoOrden', 'INTEGER', false, null, null);
$this->addColumn('cco_tipo', 'CcoTipo', 'INTEGER', false, null, null);
......
......@@ -57,6 +57,7 @@ class DisposicionColumnasTableMap extends TableMap
{
$this->addRelation('CampaniaContenido', 'AppBundle\\Model\\CampaniaContenido', RelationMap::ONE_TO_MANY, array('dco_id' => 'dco_id', ), null, null, 'CampaniaContenidos');
$this->addRelation('Fila', 'AppBundle\\Model\\Fila', RelationMap::ONE_TO_MANY, array('dco_id' => 'dco_id', ), null, null, 'Filas');
$this->addRelation('TemplateCssRelacion', 'AppBundle\\Model\\TemplateCssRelacion', RelationMap::ONE_TO_MANY, array('dco_id' => 'dco_id', ), null, null, 'TemplateCssRelacions');
} // buildRelations()
} // DisposicionColumnasTableMap
<?php
namespace AppBundle\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'template_css_relacion' table.
*
*
*
* This map class is used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package propel.generator.src.AppBundle.Model.map
*/
class TemplateCssRelacionTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'src.AppBundle.Model.map.TemplateCssRelacionTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('template_css_relacion');
$this->setPhpName('TemplateCssRelacion');
$this->setClassname('AppBundle\\Model\\TemplateCssRelacion');
$this->setPackage('src.AppBundle.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('tcr_id', 'TcrId', 'INTEGER', true, null, null);
$this->addForeignKey('tem_id', 'TemId', 'INTEGER', 'template', 'tem_id', false, null, null);
$this->addForeignKey('dco_id', 'DcoId', 'INTEGER', 'disposicion_columnas', 'dco_id', false, null, null);
$this->addColumn('tcr_tipo', 'TcrTipo', 'INTEGER', false, null, null);
$this->addColumn('tcr_entorno', 'TcrEntorno', 'INTEGER', false, null, null);
$this->addColumn('tcr_clase_css', 'TcrClaseCss', 'VARCHAR', false, 1000, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('DisposicionColumnas', 'AppBundle\\Model\\DisposicionColumnas', RelationMap::MANY_TO_ONE, array('dco_id' => 'dco_id', ), null, null);
$this->addRelation('Template', 'AppBundle\\Model\\Template', RelationMap::MANY_TO_ONE, array('tem_id' => 'tem_id', ), null, null);
} // buildRelations()
} // TemplateCssRelacionTableMap
......@@ -60,6 +60,7 @@ class TemplateTableMap extends TableMap
public function buildRelations()
{
$this->addRelation('Campania', 'AppBundle\\Model\\Campania', RelationMap::ONE_TO_MANY, array('tem_id' => 'tem_id', ), null, null, 'Campanias');
$this->addRelation('TemplateCssRelacion', 'AppBundle\\Model\\TemplateCssRelacion', RelationMap::ONE_TO_MANY, array('tem_id' => 'tem_id', ), null, null, 'TemplateCssRelacions');
} // buildRelations()
/**
......
......@@ -96,6 +96,12 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
*/
protected $cco_contenido;
/**
* The value for the cco_fila field.
* @var int
*/
protected $cco_fila;
/**
* The value for the cco_columna field.
* @var int
......@@ -271,6 +277,17 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
return $this->cco_contenido;
}
/**
* Get the [cco_fila] column value.
*
* @return int
*/
public function getCcoFila()
{
return $this->cco_fila;
}
/**
* Get the [cco_columna] column value.
*
......@@ -594,6 +611,27 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
return $this;
} // setCcoContenido()
/**
* Set the value of [cco_fila] column.
*
* @param int $v new value
* @return CampaniaContenido The current object (for fluent API support)
*/
public function setCcoFila($v)
{
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
if ($this->cco_fila !== $v) {
$this->cco_fila = $v;
$this->modifiedColumns[] = CampaniaContenidoPeer::CCO_FILA;
}
return $this;
} // setCcoFila()
/**
* Set the value of [cco_columna] column.
*
......@@ -785,13 +823,14 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
$this->fil_id = ($row[$startcol + 5] !== null) ? (int) $row[$startcol + 5] : null;
$this->cco_entorno = ($row[$startcol + 6] !== null) ? (int) $row[$startcol + 6] : null;
$this->cco_contenido = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
$this->cco_columna = ($row[$startcol + 8] !== null) ? (int) $row[$startcol + 8] : null;
$this->cco_orden = ($row[$startcol + 9] !== null) ? (int) $row[$startcol + 9] : null;
$this->cco_tipo = ($row[$startcol + 10] !== null) ? (int) $row[$startcol + 10] : null;
$this->cco_estado = ($row[$startcol + 11] !== null) ? (int) $row[$startcol + 11] : null;
$this->cco_eliminado = ($row[$startcol + 12] !== null) ? (int) $row[$startcol + 12] : null;
$this->created_at = ($row[$startcol + 13] !== null) ? (string) $row[$startcol + 13] : null;
$this->updated_at = ($row[$startcol + 14] !== null) ? (string) $row[$startcol + 14] : null;
$this->cco_fila = ($row[$startcol + 8] !== null) ? (int) $row[$startcol + 8] : null;
$this->cco_columna = ($row[$startcol + 9] !== null) ? (int) $row[$startcol + 9] : null;
$this->cco_orden = ($row[$startcol + 10] !== null) ? (int) $row[$startcol + 10] : null;
$this->cco_tipo = ($row[$startcol + 11] !== null) ? (int) $row[$startcol + 11] : null;
$this->cco_estado = ($row[$startcol + 12] !== null) ? (int) $row[$startcol + 12] : null;
$this->cco_eliminado = ($row[$startcol + 13] !== null) ? (int) $row[$startcol + 13] : null;
$this->created_at = ($row[$startcol + 14] !== null) ? (string) $row[$startcol + 14] : null;
$this->updated_at = ($row[$startcol + 15] !== null) ? (string) $row[$startcol + 15] : null;
$this->resetModified();
$this->setNew(false);
......@@ -801,7 +840,7 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
}
$this->postHydrate($row, $startcol, $rehydrate);
return $startcol + 15; // 15 = CampaniaContenidoPeer::NUM_HYDRATE_COLUMNS.
return $startcol + 16; // 16 = CampaniaContenidoPeer::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
throw new PropelException("Error populating CampaniaContenido object", $e);
......@@ -1108,6 +1147,9 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_CONTENIDO)) {
$modifiedColumns[':p' . $index++] = '`cco_contenido`';
}
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_FILA)) {
$modifiedColumns[':p' . $index++] = '`cco_fila`';
}
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_COLUMNA)) {
$modifiedColumns[':p' . $index++] = '`cco_columna`';
}
......@@ -1164,6 +1206,9 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
case '`cco_contenido`':
$stmt->bindValue($identifier, $this->cco_contenido, PDO::PARAM_STR);
break;
case '`cco_fila`':
$stmt->bindValue($identifier, $this->cco_fila, PDO::PARAM_INT);
break;
case '`cco_columna`':
$stmt->bindValue($identifier, $this->cco_columna, PDO::PARAM_INT);
break;
......@@ -1380,24 +1425,27 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
return $this->getCcoContenido();
break;
case 8:
return $this->getCcoColumna();
return $this->getCcoFila();
break;
case 9:
return $this->getCcoOrden();
return $this->getCcoColumna();
break;
case 10:
return $this->getCcoTipo();
return $this->getCcoOrden();
break;
case 11:
return $this->getCcoEstado();
return $this->getCcoTipo();
break;
case 12:
return $this->getCcoEliminado();
return $this->getCcoEstado();
break;
case 13:
return $this->getCreatedAt();
return $this->getCcoEliminado();
break;
case 14:
return $this->getCreatedAt();
break;
case 15:
return $this->getUpdatedAt();
break;
default:
......@@ -1437,13 +1485,14 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
$keys[5] => $this->getFilId(),
$keys[6] => $this->getCcoEntorno(),
$keys[7] => $this->getCcoContenido(),
$keys[8] => $this->getCcoColumna(),
$keys[9] => $this->getCcoOrden(),
$keys[10] => $this->getCcoTipo(),
$keys[11] => $this->getCcoEstado(),
$keys[12] => $this->getCcoEliminado(),
$keys[13] => $this->getCreatedAt(),
$keys[14] => $this->getUpdatedAt(),
$keys[8] => $this->getCcoFila(),
$keys[9] => $this->getCcoColumna(),
$keys[10] => $this->getCcoOrden(),
$keys[11] => $this->getCcoTipo(),
$keys[12] => $this->getCcoEstado(),
$keys[13] => $this->getCcoEliminado(),
$keys[14] => $this->getCreatedAt(),
$keys[15] => $this->getUpdatedAt(),
);
$virtualColumns = $this->virtualColumns;
foreach ($virtualColumns as $key => $virtualColumn) {
......@@ -1525,24 +1574,27 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
$this->setCcoContenido($value);
break;
case 8:
$this->setCcoColumna($value);
$this->setCcoFila($value);
break;
case 9:
$this->setCcoOrden($value);
$this->setCcoColumna($value);
break;
case 10:
$this->setCcoTipo($value);
$this->setCcoOrden($value);
break;
case 11:
$this->setCcoEstado($value);
$this->setCcoTipo($value);
break;
case 12:
$this->setCcoEliminado($value);
$this->setCcoEstado($value);
break;
case 13:
$this->setCreatedAt($value);
$this->setCcoEliminado($value);
break;
case 14:
$this->setCreatedAt($value);
break;
case 15:
$this->setUpdatedAt($value);
break;
} // switch()
......@@ -1577,13 +1629,14 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
if (array_key_exists($keys[5], $arr)) $this->setFilId($arr[$keys[5]]);
if (array_key_exists($keys[6], $arr)) $this->setCcoEntorno($arr[$keys[6]]);
if (array_key_exists($keys[7], $arr)) $this->setCcoContenido($arr[$keys[7]]);
if (array_key_exists($keys[8], $arr)) $this->setCcoColumna($arr[$keys[8]]);
if (array_key_exists($keys[9], $arr)) $this->setCcoOrden($arr[$keys[9]]);
if (array_key_exists($keys[10], $arr)) $this->setCcoTipo($arr[$keys[10]]);
if (array_key_exists($keys[11], $arr)) $this->setCcoEstado($arr[$keys[11]]);
if (array_key_exists($keys[12], $arr)) $this->setCcoEliminado($arr[$keys[12]]);
if (array_key_exists($keys[13], $arr)) $this->setCreatedAt($arr[$keys[13]]);
if (array_key_exists($keys[14], $arr)) $this->setUpdatedAt($arr[$keys[14]]);
if (array_key_exists($keys[8], $arr)) $this->setCcoFila($arr[$keys[8]]);
if (array_key_exists($keys[9], $arr)) $this->setCcoColumna($arr[$keys[9]]);
if (array_key_exists($keys[10], $arr)) $this->setCcoOrden($arr[$keys[10]]);
if (array_key_exists($keys[11], $arr)) $this->setCcoTipo($arr[$keys[11]]);
if (array_key_exists($keys[12], $arr)) $this->setCcoEstado($arr[$keys[12]]);
if (array_key_exists($keys[13], $arr)) $this->setCcoEliminado($arr[$keys[13]]);
if (array_key_exists($keys[14], $arr)) $this->setCreatedAt($arr[$keys[14]]);
if (array_key_exists($keys[15], $arr)) $this->setUpdatedAt($arr[$keys[15]]);
}
/**
......@@ -1603,6 +1656,7 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
if ($this->isColumnModified(CampaniaContenidoPeer::FIL_ID)) $criteria->add(CampaniaContenidoPeer::FIL_ID, $this->fil_id);
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_ENTORNO)) $criteria->add(CampaniaContenidoPeer::CCO_ENTORNO, $this->cco_entorno);
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_CONTENIDO)) $criteria->add(CampaniaContenidoPeer::CCO_CONTENIDO, $this->cco_contenido);
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_FILA)) $criteria->add(CampaniaContenidoPeer::CCO_FILA, $this->cco_fila);
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_COLUMNA)) $criteria->add(CampaniaContenidoPeer::CCO_COLUMNA, $this->cco_columna);
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_ORDEN)) $criteria->add(CampaniaContenidoPeer::CCO_ORDEN, $this->cco_orden);
if ($this->isColumnModified(CampaniaContenidoPeer::CCO_TIPO)) $criteria->add(CampaniaContenidoPeer::CCO_TIPO, $this->cco_tipo);
......@@ -1680,6 +1734,7 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
$copyObj->setFilId($this->getFilId());
$copyObj->setCcoEntorno($this->getCcoEntorno());
$copyObj->setCcoContenido($this->getCcoContenido());
$copyObj->setCcoFila($this->getCcoFila());
$copyObj->setCcoColumna($this->getCcoColumna());
$copyObj->setCcoOrden($this->getCcoOrden());
$copyObj->setCcoTipo($this->getCcoTipo());
......@@ -2018,6 +2073,7 @@ abstract class BaseCampaniaContenido extends BaseObject implements Persistent
$this->fil_id = null;
$this->cco_entorno = null;
$this->cco_contenido = null;
$this->cco_fila = null;
$this->cco_columna = null;
$this->cco_orden = null;
$this->cco_tipo = null;
......
......@@ -34,13 +34,13 @@ abstract class BaseCampaniaContenidoPeer
const TM_CLASS = 'AppBundle\\Model\\map\\CampaniaContenidoTableMap';
/** The total number of columns. */
const NUM_COLUMNS = 15;
const NUM_COLUMNS = 16;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */
const NUM_HYDRATE_COLUMNS = 15;
const NUM_HYDRATE_COLUMNS = 16;
/** the column name for the cco_id field */
const CCO_ID = 'campania_contenido.cco_id';
......@@ -66,6 +66,9 @@ abstract class BaseCampaniaContenidoPeer
/** the column name for the cco_contenido field */
const CCO_CONTENIDO = 'campania_contenido.cco_contenido';
/** the column name for the cco_fila field */
const CCO_FILA = 'campania_contenido.cco_fila';
/** the column name for the cco_columna field */
const CCO_COLUMNA = 'campania_contenido.cco_columna';
......@@ -106,12 +109,12 @@ abstract class BaseCampaniaContenidoPeer
* e.g. CampaniaContenidoPeer::$fieldNames[CampaniaContenidoPeer::TYPE_PHPNAME][0] = 'Id'
*/
protected static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('CcoId', 'CamId', 'DisId', 'DcoId', 'SecId', 'FilId', 'CcoEntorno', 'CcoContenido', 'CcoColumna', 'CcoOrden', 'CcoTipo', 'CcoEstado', 'CcoEliminado', 'CreatedAt', 'UpdatedAt', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('ccoId', 'camId', 'disId', 'dcoId', 'secId', 'filId', 'ccoEntorno', 'ccoContenido', 'ccoColumna', 'ccoOrden', 'ccoTipo', 'ccoEstado', 'ccoEliminado', 'createdAt', 'updatedAt', ),
BasePeer::TYPE_COLNAME => array (CampaniaContenidoPeer::CCO_ID, CampaniaContenidoPeer::CAM_ID, CampaniaContenidoPeer::DIS_ID, CampaniaContenidoPeer::DCO_ID, CampaniaContenidoPeer::SEC_ID, CampaniaContenidoPeer::FIL_ID, CampaniaContenidoPeer::CCO_ENTORNO, CampaniaContenidoPeer::CCO_CONTENIDO, CampaniaContenidoPeer::CCO_COLUMNA, CampaniaContenidoPeer::CCO_ORDEN, CampaniaContenidoPeer::CCO_TIPO, CampaniaContenidoPeer::CCO_ESTADO, CampaniaContenidoPeer::CCO_ELIMINADO, CampaniaContenidoPeer::CREATED_AT, CampaniaContenidoPeer::UPDATED_AT, ),
BasePeer::TYPE_RAW_COLNAME => array ('CCO_ID', 'CAM_ID', 'DIS_ID', 'DCO_ID', 'SEC_ID', 'FIL_ID', 'CCO_ENTORNO', 'CCO_CONTENIDO', 'CCO_COLUMNA', 'CCO_ORDEN', 'CCO_TIPO', 'CCO_ESTADO', 'CCO_ELIMINADO', 'CREATED_AT', 'UPDATED_AT', ),
BasePeer::TYPE_FIELDNAME => array ('cco_id', 'cam_id', 'dis_id', 'dco_id', 'sec_id', 'fil_id', 'cco_entorno', 'cco_contenido', 'cco_columna', 'cco_orden', 'cco_tipo', 'cco_estado', 'cco_eliminado', 'created_at', 'updated_at', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
BasePeer::TYPE_PHPNAME => array ('CcoId', 'CamId', 'DisId', 'DcoId', 'SecId', 'FilId', 'CcoEntorno', 'CcoContenido', 'CcoFila', 'CcoColumna', 'CcoOrden', 'CcoTipo', 'CcoEstado', 'CcoEliminado', 'CreatedAt', 'UpdatedAt', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('ccoId', 'camId', 'disId', 'dcoId', 'secId', 'filId', 'ccoEntorno', 'ccoContenido', 'ccoFila', 'ccoColumna', 'ccoOrden', 'ccoTipo', 'ccoEstado', 'ccoEliminado', 'createdAt', 'updatedAt', ),
BasePeer::TYPE_COLNAME => array (CampaniaContenidoPeer::CCO_ID, CampaniaContenidoPeer::CAM_ID, CampaniaContenidoPeer::DIS_ID, CampaniaContenidoPeer::DCO_ID, CampaniaContenidoPeer::SEC_ID, CampaniaContenidoPeer::FIL_ID, CampaniaContenidoPeer::CCO_ENTORNO, CampaniaContenidoPeer::CCO_CONTENIDO, CampaniaContenidoPeer::CCO_FILA, CampaniaContenidoPeer::CCO_COLUMNA, CampaniaContenidoPeer::CCO_ORDEN, CampaniaContenidoPeer::CCO_TIPO, CampaniaContenidoPeer::CCO_ESTADO, CampaniaContenidoPeer::CCO_ELIMINADO, CampaniaContenidoPeer::CREATED_AT, CampaniaContenidoPeer::UPDATED_AT, ),
BasePeer::TYPE_RAW_COLNAME => array ('CCO_ID', 'CAM_ID', 'DIS_ID', 'DCO_ID', 'SEC_ID', 'FIL_ID', 'CCO_ENTORNO', 'CCO_CONTENIDO', 'CCO_FILA', 'CCO_COLUMNA', 'CCO_ORDEN', 'CCO_TIPO', 'CCO_ESTADO', 'CCO_ELIMINADO', 'CREATED_AT', 'UPDATED_AT', ),
BasePeer::TYPE_FIELDNAME => array ('cco_id', 'cam_id', 'dis_id', 'dco_id', 'sec_id', 'fil_id', 'cco_entorno', 'cco_contenido', 'cco_fila', 'cco_columna', 'cco_orden', 'cco_tipo', 'cco_estado', 'cco_eliminado', 'created_at', 'updated_at', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, )
);
/**
......@@ -121,12 +124,12 @@ abstract class BaseCampaniaContenidoPeer
* e.g. CampaniaContenidoPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
protected static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('CcoId' => 0, 'CamId' => 1, 'DisId' => 2, 'DcoId' => 3, 'SecId' => 4, 'FilId' => 5, 'CcoEntorno' => 6, 'CcoContenido' => 7, 'CcoColumna' => 8, 'CcoOrden' => 9, 'CcoTipo' => 10, 'CcoEstado' => 11, 'CcoEliminado' => 12, 'CreatedAt' => 13, 'UpdatedAt' => 14, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('ccoId' => 0, 'camId' => 1, 'disId' => 2, 'dcoId' => 3, 'secId' => 4, 'filId' => 5, 'ccoEntorno' => 6, 'ccoContenido' => 7, 'ccoColumna' => 8, 'ccoOrden' => 9, 'ccoTipo' => 10, 'ccoEstado' => 11, 'ccoEliminado' => 12, 'createdAt' => 13, 'updatedAt' => 14, ),
BasePeer::TYPE_COLNAME => array (CampaniaContenidoPeer::CCO_ID => 0, CampaniaContenidoPeer::CAM_ID => 1, CampaniaContenidoPeer::DIS_ID => 2, CampaniaContenidoPeer::DCO_ID => 3, CampaniaContenidoPeer::SEC_ID => 4, CampaniaContenidoPeer::FIL_ID => 5, CampaniaContenidoPeer::CCO_ENTORNO => 6, CampaniaContenidoPeer::CCO_CONTENIDO => 7, CampaniaContenidoPeer::CCO_COLUMNA => 8, CampaniaContenidoPeer::CCO_ORDEN => 9, CampaniaContenidoPeer::CCO_TIPO => 10, CampaniaContenidoPeer::CCO_ESTADO => 11, CampaniaContenidoPeer::CCO_ELIMINADO => 12, CampaniaContenidoPeer::CREATED_AT => 13, CampaniaContenidoPeer::UPDATED_AT => 14, ),
BasePeer::TYPE_RAW_COLNAME => array ('CCO_ID' => 0, 'CAM_ID' => 1, 'DIS_ID' => 2, 'DCO_ID' => 3, 'SEC_ID' => 4, 'FIL_ID' => 5, 'CCO_ENTORNO' => 6, 'CCO_CONTENIDO' => 7, 'CCO_COLUMNA' => 8, 'CCO_ORDEN' => 9, 'CCO_TIPO' => 10, 'CCO_ESTADO' => 11, 'CCO_ELIMINADO' => 12, 'CREATED_AT' => 13, 'UPDATED_AT' => 14, ),
BasePeer::TYPE_FIELDNAME => array ('cco_id' => 0, 'cam_id' => 1, 'dis_id' => 2, 'dco_id' => 3, 'sec_id' => 4, 'fil_id' => 5, 'cco_entorno' => 6, 'cco_contenido' => 7, 'cco_columna' => 8, 'cco_orden' => 9, 'cco_tipo' => 10, 'cco_estado' => 11, 'cco_eliminado' => 12, 'created_at' => 13, 'updated_at' => 14, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
BasePeer::TYPE_PHPNAME => array ('CcoId' => 0, 'CamId' => 1, 'DisId' => 2, 'DcoId' => 3, 'SecId' => 4, 'FilId' => 5, 'CcoEntorno' => 6, 'CcoContenido' => 7, 'CcoFila' => 8, 'CcoColumna' => 9, 'CcoOrden' => 10, 'CcoTipo' => 11, 'CcoEstado' => 12, 'CcoEliminado' => 13, 'CreatedAt' => 14, 'UpdatedAt' => 15, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('ccoId' => 0, 'camId' => 1, 'disId' => 2, 'dcoId' => 3, 'secId' => 4, 'filId' => 5, 'ccoEntorno' => 6, 'ccoContenido' => 7, 'ccoFila' => 8, 'ccoColumna' => 9, 'ccoOrden' => 10, 'ccoTipo' => 11, 'ccoEstado' => 12, 'ccoEliminado' => 13, 'createdAt' => 14, 'updatedAt' => 15, ),
BasePeer::TYPE_COLNAME => array (CampaniaContenidoPeer::CCO_ID => 0, CampaniaContenidoPeer::CAM_ID => 1, CampaniaContenidoPeer::DIS_ID => 2, CampaniaContenidoPeer::DCO_ID => 3, CampaniaContenidoPeer::SEC_ID => 4, CampaniaContenidoPeer::FIL_ID => 5, CampaniaContenidoPeer::CCO_ENTORNO => 6, CampaniaContenidoPeer::CCO_CONTENIDO => 7, CampaniaContenidoPeer::CCO_FILA => 8, CampaniaContenidoPeer::CCO_COLUMNA => 9, CampaniaContenidoPeer::CCO_ORDEN => 10, CampaniaContenidoPeer::CCO_TIPO => 11, CampaniaContenidoPeer::CCO_ESTADO => 12, CampaniaContenidoPeer::CCO_ELIMINADO => 13, CampaniaContenidoPeer::CREATED_AT => 14, CampaniaContenidoPeer::UPDATED_AT => 15, ),
BasePeer::TYPE_RAW_COLNAME => array ('CCO_ID' => 0, 'CAM_ID' => 1, 'DIS_ID' => 2, 'DCO_ID' => 3, 'SEC_ID' => 4, 'FIL_ID' => 5, 'CCO_ENTORNO' => 6, 'CCO_CONTENIDO' => 7, 'CCO_FILA' => 8, 'CCO_COLUMNA' => 9, 'CCO_ORDEN' => 10, 'CCO_TIPO' => 11, 'CCO_ESTADO' => 12, 'CCO_ELIMINADO' => 13, 'CREATED_AT' => 14, 'UPDATED_AT' => 15, ),
BasePeer::TYPE_FIELDNAME => array ('cco_id' => 0, 'cam_id' => 1, 'dis_id' => 2, 'dco_id' => 3, 'sec_id' => 4, 'fil_id' => 5, 'cco_entorno' => 6, 'cco_contenido' => 7, 'cco_fila' => 8, 'cco_columna' => 9, 'cco_orden' => 10, 'cco_tipo' => 11, 'cco_estado' => 12, 'cco_eliminado' => 13, 'created_at' => 14, 'updated_at' => 15, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, )
);
/**
......@@ -208,6 +211,7 @@ abstract class BaseCampaniaContenidoPeer
$criteria->addSelectColumn(CampaniaContenidoPeer::FIL_ID);
$criteria->addSelectColumn(CampaniaContenidoPeer::CCO_ENTORNO);
$criteria->addSelectColumn(CampaniaContenidoPeer::CCO_CONTENIDO);
$criteria->addSelectColumn(CampaniaContenidoPeer::CCO_FILA);
$criteria->addSelectColumn(CampaniaContenidoPeer::CCO_COLUMNA);
$criteria->addSelectColumn(CampaniaContenidoPeer::CCO_ORDEN);
$criteria->addSelectColumn(CampaniaContenidoPeer::CCO_TIPO);
......@@ -224,6 +228,7 @@ abstract class BaseCampaniaContenidoPeer
$criteria->addSelectColumn($alias . '.fil_id');
$criteria->addSelectColumn($alias . '.cco_entorno');
$criteria->addSelectColumn($alias . '.cco_contenido');
$criteria->addSelectColumn($alias . '.cco_fila');
$criteria->addSelectColumn($alias . '.cco_columna');
$criteria->addSelectColumn($alias . '.cco_orden');
$criteria->addSelectColumn($alias . '.cco_tipo');
......
......@@ -30,6 +30,7 @@ use AppBundle\Model\Seccion;
* @method CampaniaContenidoQuery orderByFilId($order = Criteria::ASC) Order by the fil_id column
* @method CampaniaContenidoQuery orderByCcoEntorno($order = Criteria::ASC) Order by the cco_entorno column
* @method CampaniaContenidoQuery orderByCcoContenido($order = Criteria::ASC) Order by the cco_contenido column
* @method CampaniaContenidoQuery orderByCcoFila($order = Criteria::ASC) Order by the cco_fila column
* @method CampaniaContenidoQuery orderByCcoColumna($order = Criteria::ASC) Order by the cco_columna column
* @method CampaniaContenidoQuery orderByCcoOrden($order = Criteria::ASC) Order by the cco_orden column
* @method CampaniaContenidoQuery orderByCcoTipo($order = Criteria::ASC) Order by the cco_tipo column
......@@ -46,6 +47,7 @@ use AppBundle\Model\Seccion;
* @method CampaniaContenidoQuery groupByFilId() Group by the fil_id column
* @method CampaniaContenidoQuery groupByCcoEntorno() Group by the cco_entorno column
* @method CampaniaContenidoQuery groupByCcoContenido() Group by the cco_contenido column
* @method CampaniaContenidoQuery groupByCcoFila() Group by the cco_fila column
* @method CampaniaContenidoQuery groupByCcoColumna() Group by the cco_columna column
* @method CampaniaContenidoQuery groupByCcoOrden() Group by the cco_orden column
* @method CampaniaContenidoQuery groupByCcoTipo() Group by the cco_tipo column
......@@ -88,6 +90,7 @@ use AppBundle\Model\Seccion;
* @method CampaniaContenido findOneByFilId(int $fil_id) Return the first CampaniaContenido filtered by the fil_id column
* @method CampaniaContenido findOneByCcoEntorno(int $cco_entorno) Return the first CampaniaContenido filtered by the cco_entorno column
* @method CampaniaContenido findOneByCcoContenido(string $cco_contenido) Return the first CampaniaContenido filtered by the cco_contenido column
* @method CampaniaContenido findOneByCcoFila(int $cco_fila) Return the first CampaniaContenido filtered by the cco_fila column
* @method CampaniaContenido findOneByCcoColumna(int $cco_columna) Return the first CampaniaContenido filtered by the cco_columna column
* @method CampaniaContenido findOneByCcoOrden(int $cco_orden) Return the first CampaniaContenido filtered by the cco_orden column
* @method CampaniaContenido findOneByCcoTipo(int $cco_tipo) Return the first CampaniaContenido filtered by the cco_tipo column
......@@ -104,6 +107,7 @@ use AppBundle\Model\Seccion;
* @method array findByFilId(int $fil_id) Return CampaniaContenido objects filtered by the fil_id column
* @method array findByCcoEntorno(int $cco_entorno) Return CampaniaContenido objects filtered by the cco_entorno column
* @method array findByCcoContenido(string $cco_contenido) Return CampaniaContenido objects filtered by the cco_contenido column
* @method array findByCcoFila(int $cco_fila) Return CampaniaContenido objects filtered by the cco_fila column
* @method array findByCcoColumna(int $cco_columna) Return CampaniaContenido objects filtered by the cco_columna column
* @method array findByCcoOrden(int $cco_orden) Return CampaniaContenido objects filtered by the cco_orden column
* @method array findByCcoTipo(int $cco_tipo) Return CampaniaContenido objects filtered by the cco_tipo column
......@@ -216,7 +220,7 @@ abstract class BaseCampaniaContenidoQuery extends ModelCriteria
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `cco_id`, `cam_id`, `dis_id`, `dco_id`, `sec_id`, `fil_id`, `cco_entorno`, `cco_contenido`, `cco_columna`, `cco_orden`, `cco_tipo`, `cco_estado`, `cco_eliminado`, `created_at`, `updated_at` FROM `campania_contenido` WHERE `cco_id` = :p0';
$sql = 'SELECT `cco_id`, `cam_id`, `dis_id`, `dco_id`, `sec_id`, `fil_id`, `cco_entorno`, `cco_contenido`, `cco_fila`, `cco_columna`, `cco_orden`, `cco_tipo`, `cco_estado`, `cco_eliminado`, `created_at`, `updated_at` FROM `campania_contenido` WHERE `cco_id` = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
......@@ -638,6 +642,48 @@ abstract class BaseCampaniaContenidoQuery extends ModelCriteria
return $this->addUsingAlias(CampaniaContenidoPeer::CCO_CONTENIDO, $ccoContenido, $comparison);
}
/**
* Filter the query on the cco_fila column
*
* Example usage:
* <code>
* $query->filterByCcoFila(1234); // WHERE cco_fila = 1234
* $query->filterByCcoFila(array(12, 34)); // WHERE cco_fila IN (12, 34)
* $query->filterByCcoFila(array('min' => 12)); // WHERE cco_fila >= 12
* $query->filterByCcoFila(array('max' => 12)); // WHERE cco_fila <= 12
* </code>
*
* @param mixed $ccoFila The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CampaniaContenidoQuery The current query, for fluid interface
*/
public function filterByCcoFila($ccoFila = null, $comparison = null)
{
if (is_array($ccoFila)) {
$useMinMax = false;
if (isset($ccoFila['min'])) {
$this->addUsingAlias(CampaniaContenidoPeer::CCO_FILA, $ccoFila['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($ccoFila['max'])) {
$this->addUsingAlias(CampaniaContenidoPeer::CCO_FILA, $ccoFila['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CampaniaContenidoPeer::CCO_FILA, $ccoFila, $comparison);
}
/**
* Filter the query on the cco_columna column
*
......
......@@ -20,6 +20,8 @@ use AppBundle\Model\DisposicionColumnasPeer;
use AppBundle\Model\DisposicionColumnasQuery;
use AppBundle\Model\Fila;
use AppBundle\Model\FilaQuery;
use AppBundle\Model\TemplateCssRelacion;
use AppBundle\Model\TemplateCssRelacionQuery;
abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
{
......@@ -84,6 +86,12 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
protected $collFilas;
protected $collFilasPartial;
/**
* @var PropelObjectCollection|TemplateCssRelacion[] Collection to store aggregation of TemplateCssRelacion objects.
*/
protected $collTemplateCssRelacions;
protected $collTemplateCssRelacionsPartial;
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
......@@ -116,6 +124,12 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
*/
protected $filasScheduledForDeletion = null;
/**
* An array of objects scheduled for deletion.
* @var PropelObjectCollection
*/
protected $templateCssRelacionsScheduledForDeletion = null;
/**
* Get the [dco_id] column value.
*
......@@ -388,6 +402,8 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
$this->collFilas = null;
$this->collTemplateCssRelacions = null;
} // if (deep)
}
......@@ -548,6 +564,24 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
}
}
if ($this->templateCssRelacionsScheduledForDeletion !== null) {
if (!$this->templateCssRelacionsScheduledForDeletion->isEmpty()) {
foreach ($this->templateCssRelacionsScheduledForDeletion as $templateCssRelacion) {
// need to save related object because we set the relation to null
$templateCssRelacion->save($con);
}
$this->templateCssRelacionsScheduledForDeletion = null;
}
}
if ($this->collTemplateCssRelacions !== null) {
foreach ($this->collTemplateCssRelacions as $referrerFK) {
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
$affectedRows += $referrerFK->save($con);
}
}
}
$this->alreadyInSave = false;
}
......@@ -730,6 +764,14 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
}
}
if ($this->collTemplateCssRelacions !== null) {
foreach ($this->collTemplateCssRelacions as $referrerFK) {
if (!$referrerFK->validate($columns)) {
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
}
}
}
$this->alreadyInValidation = false;
}
......@@ -827,6 +869,9 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
if (null !== $this->collFilas) {
$result['Filas'] = $this->collFilas->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
}
if (null !== $this->collTemplateCssRelacions) {
$result['TemplateCssRelacions'] = $this->collTemplateCssRelacions->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
}
}
return $result;
......@@ -1008,6 +1053,12 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
}
}
foreach ($this->getTemplateCssRelacions() as $relObj) {
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
$copyObj->addTemplateCssRelacion($relObj->copy($deepCopy));
}
}
//unflag object copy
$this->startCopy = false;
} // if ($deepCopy)
......@@ -1075,6 +1126,9 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
if ('Fila' == $relationName) {
$this->initFilas();
}
if ('TemplateCssRelacion' == $relationName) {
$this->initTemplateCssRelacions();
}
}
/**
......@@ -1677,6 +1731,256 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
return $this->getFilas($query, $con);
}
/**
* Clears out the collTemplateCssRelacions collection
*
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
* @return DisposicionColumnas The current object (for fluent API support)
* @see addTemplateCssRelacions()
*/
public function clearTemplateCssRelacions()
{
$this->collTemplateCssRelacions = null; // important to set this to null since that means it is uninitialized
$this->collTemplateCssRelacionsPartial = null;
return $this;
}
/**
* reset is the collTemplateCssRelacions collection loaded partially
*
* @return void
*/
public function resetPartialTemplateCssRelacions($v = true)
{
$this->collTemplateCssRelacionsPartial = $v;
}
/**
* Initializes the collTemplateCssRelacions collection.
*
* By default this just sets the collTemplateCssRelacions collection to an empty array (like clearcollTemplateCssRelacions());
* however, you may wish to override this method in your stub class to provide setting appropriate
* to your application -- for example, setting the initial array to the values stored in database.
*
* @param boolean $overrideExisting If set to true, the method call initializes
* the collection even if it is not empty
*
* @return void
*/
public function initTemplateCssRelacions($overrideExisting = true)
{
if (null !== $this->collTemplateCssRelacions && !$overrideExisting) {
return;
}
$this->collTemplateCssRelacions = new PropelObjectCollection();
$this->collTemplateCssRelacions->setModel('TemplateCssRelacion');
}
/**
* Gets an array of TemplateCssRelacion objects which contain a foreign key that references this object.
*
* If the $criteria is not null, it is used to always fetch the results from the database.
* Otherwise the results are fetched from the database the first time, then cached.
* Next time the same method is called without $criteria, the cached collection is returned.
* If this DisposicionColumnas is new, it will return
* an empty collection or the current collection; the criteria is ignored on a new object.
*
* @param Criteria $criteria optional Criteria object to narrow the query
* @param PropelPDO $con optional connection object
* @return PropelObjectCollection|TemplateCssRelacion[] List of TemplateCssRelacion objects
* @throws PropelException
*/
public function getTemplateCssRelacions($criteria = null, PropelPDO $con = null)
{
$partial = $this->collTemplateCssRelacionsPartial && !$this->isNew();
if (null === $this->collTemplateCssRelacions || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collTemplateCssRelacions) {
// return empty collection
$this->initTemplateCssRelacions();
} else {
$collTemplateCssRelacions = TemplateCssRelacionQuery::create(null, $criteria)
->filterByDisposicionColumnas($this)
->find($con);
if (null !== $criteria) {
if (false !== $this->collTemplateCssRelacionsPartial && count($collTemplateCssRelacions)) {
$this->initTemplateCssRelacions(false);
foreach ($collTemplateCssRelacions as $obj) {
if (false == $this->collTemplateCssRelacions->contains($obj)) {
$this->collTemplateCssRelacions->append($obj);
}
}
$this->collTemplateCssRelacionsPartial = true;
}
$collTemplateCssRelacions->getInternalIterator()->rewind();
return $collTemplateCssRelacions;
}
if ($partial && $this->collTemplateCssRelacions) {
foreach ($this->collTemplateCssRelacions as $obj) {
if ($obj->isNew()) {
$collTemplateCssRelacions[] = $obj;
}
}
}
$this->collTemplateCssRelacions = $collTemplateCssRelacions;
$this->collTemplateCssRelacionsPartial = false;
}
}
return $this->collTemplateCssRelacions;
}
/**
* Sets a collection of TemplateCssRelacion objects related by a one-to-many relationship
* to the current object.
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
* and new objects from the given Propel collection.
*
* @param PropelCollection $templateCssRelacions A Propel collection.
* @param PropelPDO $con Optional connection object
* @return DisposicionColumnas The current object (for fluent API support)
*/
public function setTemplateCssRelacions(PropelCollection $templateCssRelacions, PropelPDO $con = null)
{
$templateCssRelacionsToDelete = $this->getTemplateCssRelacions(new Criteria(), $con)->diff($templateCssRelacions);
$this->templateCssRelacionsScheduledForDeletion = $templateCssRelacionsToDelete;
foreach ($templateCssRelacionsToDelete as $templateCssRelacionRemoved) {
$templateCssRelacionRemoved->setDisposicionColumnas(null);
}
$this->collTemplateCssRelacions = null;
foreach ($templateCssRelacions as $templateCssRelacion) {
$this->addTemplateCssRelacion($templateCssRelacion);
}
$this->collTemplateCssRelacions = $templateCssRelacions;
$this->collTemplateCssRelacionsPartial = false;
return $this;
}
/**
* Returns the number of related TemplateCssRelacion objects.
*
* @param Criteria $criteria
* @param boolean $distinct
* @param PropelPDO $con
* @return int Count of related TemplateCssRelacion objects.
* @throws PropelException
*/
public function countTemplateCssRelacions(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{
$partial = $this->collTemplateCssRelacionsPartial && !$this->isNew();
if (null === $this->collTemplateCssRelacions || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collTemplateCssRelacions) {
return 0;
}
if ($partial && !$criteria) {
return count($this->getTemplateCssRelacions());
}
$query = TemplateCssRelacionQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByDisposicionColumnas($this)
->count($con);
}
return count($this->collTemplateCssRelacions);
}
/**
* Method called to associate a TemplateCssRelacion object to this object
* through the TemplateCssRelacion foreign key attribute.
*
* @param TemplateCssRelacion $l TemplateCssRelacion
* @return DisposicionColumnas The current object (for fluent API support)
*/
public function addTemplateCssRelacion(TemplateCssRelacion $l)
{
if ($this->collTemplateCssRelacions === null) {
$this->initTemplateCssRelacions();
$this->collTemplateCssRelacionsPartial = true;
}
if (!in_array($l, $this->collTemplateCssRelacions->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
$this->doAddTemplateCssRelacion($l);
if ($this->templateCssRelacionsScheduledForDeletion and $this->templateCssRelacionsScheduledForDeletion->contains($l)) {
$this->templateCssRelacionsScheduledForDeletion->remove($this->templateCssRelacionsScheduledForDeletion->search($l));
}
}
return $this;
}
/**
* @param TemplateCssRelacion $templateCssRelacion The templateCssRelacion object to add.
*/
protected function doAddTemplateCssRelacion($templateCssRelacion)
{
$this->collTemplateCssRelacions[]= $templateCssRelacion;
$templateCssRelacion->setDisposicionColumnas($this);
}
/**
* @param TemplateCssRelacion $templateCssRelacion The templateCssRelacion object to remove.
* @return DisposicionColumnas The current object (for fluent API support)
*/
public function removeTemplateCssRelacion($templateCssRelacion)
{
if ($this->getTemplateCssRelacions()->contains($templateCssRelacion)) {
$this->collTemplateCssRelacions->remove($this->collTemplateCssRelacions->search($templateCssRelacion));
if (null === $this->templateCssRelacionsScheduledForDeletion) {
$this->templateCssRelacionsScheduledForDeletion = clone $this->collTemplateCssRelacions;
$this->templateCssRelacionsScheduledForDeletion->clear();
}
$this->templateCssRelacionsScheduledForDeletion[]= $templateCssRelacion;
$templateCssRelacion->setDisposicionColumnas(null);
}
return $this;
}
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
* Otherwise if this DisposicionColumnas is new, it will return
* an empty collection; or if this DisposicionColumnas has previously
* been saved, it will retrieve related TemplateCssRelacions from storage.
*
* This method is protected by default in order to keep the public
* api reasonable. You can provide public methods for those you
* actually need in DisposicionColumnas.
*
* @param Criteria $criteria optional Criteria object to narrow the query
* @param PropelPDO $con optional connection object
* @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return PropelObjectCollection|TemplateCssRelacion[] List of TemplateCssRelacion objects
*/
public function getTemplateCssRelacionsJoinTemplate($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$query = TemplateCssRelacionQuery::create(null, $criteria);
$query->joinWith('Template', $join_behavior);
return $this->getTemplateCssRelacions($query, $con);
}
/**
* Clears the current object and sets all attributes to their default values
*/
......@@ -1719,6 +2023,11 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
$o->clearAllReferences($deep);
}
}
if ($this->collTemplateCssRelacions) {
foreach ($this->collTemplateCssRelacions as $o) {
$o->clearAllReferences($deep);
}
}
$this->alreadyInClearAllReferencesDeep = false;
} // if ($deep)
......@@ -1731,6 +2040,10 @@ abstract class BaseDisposicionColumnas extends BaseObject implements Persistent
$this->collFilas->clearIterator();
}
$this->collFilas = null;
if ($this->collTemplateCssRelacions instanceof PropelCollection) {
$this->collTemplateCssRelacions->clearIterator();
}
$this->collTemplateCssRelacions = null;
}
/**
......
......@@ -17,6 +17,7 @@ use AppBundle\Model\DisposicionColumnas;
use AppBundle\Model\DisposicionColumnasPeer;
use AppBundle\Model\DisposicionColumnasQuery;
use AppBundle\Model\Fila;
use AppBundle\Model\TemplateCssRelacion;
/**
* @method DisposicionColumnasQuery orderByDcoId($order = Criteria::ASC) Order by the dco_id column
......@@ -43,6 +44,10 @@ use AppBundle\Model\Fila;
* @method DisposicionColumnasQuery rightJoinFila($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Fila relation
* @method DisposicionColumnasQuery innerJoinFila($relationAlias = null) Adds a INNER JOIN clause to the query using the Fila relation
*
* @method DisposicionColumnasQuery leftJoinTemplateCssRelacion($relationAlias = null) Adds a LEFT JOIN clause to the query using the TemplateCssRelacion relation
* @method DisposicionColumnasQuery rightJoinTemplateCssRelacion($relationAlias = null) Adds a RIGHT JOIN clause to the query using the TemplateCssRelacion relation
* @method DisposicionColumnasQuery innerJoinTemplateCssRelacion($relationAlias = null) Adds a INNER JOIN clause to the query using the TemplateCssRelacion relation
*
* @method DisposicionColumnas findOne(PropelPDO $con = null) Return the first DisposicionColumnas matching the query
* @method DisposicionColumnas findOneOrCreate(PropelPDO $con = null) Return the first DisposicionColumnas matching the query, or a new DisposicionColumnas object populated from the query conditions when no match is found
*
......@@ -595,6 +600,80 @@ abstract class BaseDisposicionColumnasQuery extends ModelCriteria
->useQuery($relationAlias ? $relationAlias : 'Fila', '\AppBundle\Model\FilaQuery');
}
/**
* Filter the query by a related TemplateCssRelacion object
*
* @param TemplateCssRelacion|PropelObjectCollection $templateCssRelacion the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return DisposicionColumnasQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByTemplateCssRelacion($templateCssRelacion, $comparison = null)
{
if ($templateCssRelacion instanceof TemplateCssRelacion) {
return $this
->addUsingAlias(DisposicionColumnasPeer::DCO_ID, $templateCssRelacion->getDcoId(), $comparison);
} elseif ($templateCssRelacion instanceof PropelObjectCollection) {
return $this
->useTemplateCssRelacionQuery()
->filterByPrimaryKeys($templateCssRelacion->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterByTemplateCssRelacion() only accepts arguments of type TemplateCssRelacion or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the TemplateCssRelacion relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return DisposicionColumnasQuery The current query, for fluid interface
*/
public function joinTemplateCssRelacion($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('TemplateCssRelacion');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'TemplateCssRelacion');
}
return $this;
}
/**
* Use the TemplateCssRelacion relation TemplateCssRelacion object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \AppBundle\Model\TemplateCssRelacionQuery A secondary query class using the current class as primary query
*/
public function useTemplateCssRelacionQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinTemplateCssRelacion($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'TemplateCssRelacion', '\AppBundle\Model\TemplateCssRelacionQuery');
}
/**
* Exclude object from result
*
......
......@@ -18,6 +18,8 @@ use \PropelPDO;
use AppBundle\Model\Campania;
use AppBundle\Model\CampaniaQuery;
use AppBundle\Model\Template;
use AppBundle\Model\TemplateCssRelacion;
use AppBundle\Model\TemplateCssRelacionQuery;
use AppBundle\Model\TemplatePeer;
use AppBundle\Model\TemplateQuery;
......@@ -102,6 +104,12 @@ abstract class BaseTemplate extends BaseObject implements Persistent
protected $collCampanias;
protected $collCampaniasPartial;
/**
* @var PropelObjectCollection|TemplateCssRelacion[] Collection to store aggregation of TemplateCssRelacion objects.
*/
protected $collTemplateCssRelacions;
protected $collTemplateCssRelacionsPartial;
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
......@@ -128,6 +136,12 @@ abstract class BaseTemplate extends BaseObject implements Persistent
*/
protected $campaniasScheduledForDeletion = null;
/**
* An array of objects scheduled for deletion.
* @var PropelObjectCollection
*/
protected $templateCssRelacionsScheduledForDeletion = null;
/**
* Get the [tem_id] column value.
*
......@@ -592,6 +606,8 @@ abstract class BaseTemplate extends BaseObject implements Persistent
$this->collCampanias = null;
$this->collTemplateCssRelacions = null;
} // if (deep)
}
......@@ -745,6 +761,24 @@ abstract class BaseTemplate extends BaseObject implements Persistent
}
}
if ($this->templateCssRelacionsScheduledForDeletion !== null) {
if (!$this->templateCssRelacionsScheduledForDeletion->isEmpty()) {
foreach ($this->templateCssRelacionsScheduledForDeletion as $templateCssRelacion) {
// need to save related object because we set the relation to null
$templateCssRelacion->save($con);
}
$this->templateCssRelacionsScheduledForDeletion = null;
}
}
if ($this->collTemplateCssRelacions !== null) {
foreach ($this->collTemplateCssRelacions as $referrerFK) {
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
$affectedRows += $referrerFK->save($con);
}
}
}
$this->alreadyInSave = false;
}
......@@ -932,6 +966,14 @@ abstract class BaseTemplate extends BaseObject implements Persistent
}
}
if ($this->collTemplateCssRelacions !== null) {
foreach ($this->collTemplateCssRelacions as $referrerFK) {
if (!$referrerFK->validate($columns)) {
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
}
}
}
$this->alreadyInValidation = false;
}
......@@ -1042,6 +1084,9 @@ abstract class BaseTemplate extends BaseObject implements Persistent
if (null !== $this->collCampanias) {
$result['Campanias'] = $this->collCampanias->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
}
if (null !== $this->collTemplateCssRelacions) {
$result['TemplateCssRelacions'] = $this->collTemplateCssRelacions->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
}
}
return $result;
......@@ -1241,6 +1286,12 @@ abstract class BaseTemplate extends BaseObject implements Persistent
}
}
foreach ($this->getTemplateCssRelacions() as $relObj) {
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
$copyObj->addTemplateCssRelacion($relObj->copy($deepCopy));
}
}
//unflag object copy
$this->startCopy = false;
} // if ($deepCopy)
......@@ -1305,6 +1356,9 @@ abstract class BaseTemplate extends BaseObject implements Persistent
if ('Campania' == $relationName) {
$this->initCampanias();
}
if ('TemplateCssRelacion' == $relationName) {
$this->initTemplateCssRelacions();
}
}
/**
......@@ -1532,6 +1586,256 @@ abstract class BaseTemplate extends BaseObject implements Persistent
return $this;
}
/**
* Clears out the collTemplateCssRelacions collection
*
* This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method.
*
* @return Template The current object (for fluent API support)
* @see addTemplateCssRelacions()
*/
public function clearTemplateCssRelacions()
{
$this->collTemplateCssRelacions = null; // important to set this to null since that means it is uninitialized
$this->collTemplateCssRelacionsPartial = null;
return $this;
}
/**
* reset is the collTemplateCssRelacions collection loaded partially
*
* @return void
*/
public function resetPartialTemplateCssRelacions($v = true)
{
$this->collTemplateCssRelacionsPartial = $v;
}
/**
* Initializes the collTemplateCssRelacions collection.
*
* By default this just sets the collTemplateCssRelacions collection to an empty array (like clearcollTemplateCssRelacions());
* however, you may wish to override this method in your stub class to provide setting appropriate
* to your application -- for example, setting the initial array to the values stored in database.
*
* @param boolean $overrideExisting If set to true, the method call initializes
* the collection even if it is not empty
*
* @return void
*/
public function initTemplateCssRelacions($overrideExisting = true)
{
if (null !== $this->collTemplateCssRelacions && !$overrideExisting) {
return;
}
$this->collTemplateCssRelacions = new PropelObjectCollection();
$this->collTemplateCssRelacions->setModel('TemplateCssRelacion');
}
/**
* Gets an array of TemplateCssRelacion objects which contain a foreign key that references this object.
*
* If the $criteria is not null, it is used to always fetch the results from the database.
* Otherwise the results are fetched from the database the first time, then cached.
* Next time the same method is called without $criteria, the cached collection is returned.
* If this Template is new, it will return
* an empty collection or the current collection; the criteria is ignored on a new object.
*
* @param Criteria $criteria optional Criteria object to narrow the query
* @param PropelPDO $con optional connection object
* @return PropelObjectCollection|TemplateCssRelacion[] List of TemplateCssRelacion objects
* @throws PropelException
*/
public function getTemplateCssRelacions($criteria = null, PropelPDO $con = null)
{
$partial = $this->collTemplateCssRelacionsPartial && !$this->isNew();
if (null === $this->collTemplateCssRelacions || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collTemplateCssRelacions) {
// return empty collection
$this->initTemplateCssRelacions();
} else {
$collTemplateCssRelacions = TemplateCssRelacionQuery::create(null, $criteria)
->filterByTemplate($this)
->find($con);
if (null !== $criteria) {
if (false !== $this->collTemplateCssRelacionsPartial && count($collTemplateCssRelacions)) {
$this->initTemplateCssRelacions(false);
foreach ($collTemplateCssRelacions as $obj) {
if (false == $this->collTemplateCssRelacions->contains($obj)) {
$this->collTemplateCssRelacions->append($obj);
}
}
$this->collTemplateCssRelacionsPartial = true;
}
$collTemplateCssRelacions->getInternalIterator()->rewind();
return $collTemplateCssRelacions;
}
if ($partial && $this->collTemplateCssRelacions) {
foreach ($this->collTemplateCssRelacions as $obj) {
if ($obj->isNew()) {
$collTemplateCssRelacions[] = $obj;
}
}
}
$this->collTemplateCssRelacions = $collTemplateCssRelacions;
$this->collTemplateCssRelacionsPartial = false;
}
}
return $this->collTemplateCssRelacions;
}
/**
* Sets a collection of TemplateCssRelacion objects related by a one-to-many relationship
* to the current object.
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
* and new objects from the given Propel collection.
*
* @param PropelCollection $templateCssRelacions A Propel collection.
* @param PropelPDO $con Optional connection object
* @return Template The current object (for fluent API support)
*/
public function setTemplateCssRelacions(PropelCollection $templateCssRelacions, PropelPDO $con = null)
{
$templateCssRelacionsToDelete = $this->getTemplateCssRelacions(new Criteria(), $con)->diff($templateCssRelacions);
$this->templateCssRelacionsScheduledForDeletion = $templateCssRelacionsToDelete;
foreach ($templateCssRelacionsToDelete as $templateCssRelacionRemoved) {
$templateCssRelacionRemoved->setTemplate(null);
}
$this->collTemplateCssRelacions = null;
foreach ($templateCssRelacions as $templateCssRelacion) {
$this->addTemplateCssRelacion($templateCssRelacion);
}
$this->collTemplateCssRelacions = $templateCssRelacions;
$this->collTemplateCssRelacionsPartial = false;
return $this;
}
/**
* Returns the number of related TemplateCssRelacion objects.
*
* @param Criteria $criteria
* @param boolean $distinct
* @param PropelPDO $con
* @return int Count of related TemplateCssRelacion objects.
* @throws PropelException
*/
public function countTemplateCssRelacions(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{
$partial = $this->collTemplateCssRelacionsPartial && !$this->isNew();
if (null === $this->collTemplateCssRelacions || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collTemplateCssRelacions) {
return 0;
}
if ($partial && !$criteria) {
return count($this->getTemplateCssRelacions());
}
$query = TemplateCssRelacionQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByTemplate($this)
->count($con);
}
return count($this->collTemplateCssRelacions);
}
/**
* Method called to associate a TemplateCssRelacion object to this object
* through the TemplateCssRelacion foreign key attribute.
*
* @param TemplateCssRelacion $l TemplateCssRelacion
* @return Template The current object (for fluent API support)
*/
public function addTemplateCssRelacion(TemplateCssRelacion $l)
{
if ($this->collTemplateCssRelacions === null) {
$this->initTemplateCssRelacions();
$this->collTemplateCssRelacionsPartial = true;
}
if (!in_array($l, $this->collTemplateCssRelacions->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
$this->doAddTemplateCssRelacion($l);
if ($this->templateCssRelacionsScheduledForDeletion and $this->templateCssRelacionsScheduledForDeletion->contains($l)) {
$this->templateCssRelacionsScheduledForDeletion->remove($this->templateCssRelacionsScheduledForDeletion->search($l));
}
}
return $this;
}
/**
* @param TemplateCssRelacion $templateCssRelacion The templateCssRelacion object to add.
*/
protected function doAddTemplateCssRelacion($templateCssRelacion)
{
$this->collTemplateCssRelacions[]= $templateCssRelacion;
$templateCssRelacion->setTemplate($this);
}
/**
* @param TemplateCssRelacion $templateCssRelacion The templateCssRelacion object to remove.
* @return Template The current object (for fluent API support)
*/
public function removeTemplateCssRelacion($templateCssRelacion)
{
if ($this->getTemplateCssRelacions()->contains($templateCssRelacion)) {
$this->collTemplateCssRelacions->remove($this->collTemplateCssRelacions->search($templateCssRelacion));
if (null === $this->templateCssRelacionsScheduledForDeletion) {
$this->templateCssRelacionsScheduledForDeletion = clone $this->collTemplateCssRelacions;
$this->templateCssRelacionsScheduledForDeletion->clear();
}
$this->templateCssRelacionsScheduledForDeletion[]= $templateCssRelacion;
$templateCssRelacion->setTemplate(null);
}
return $this;
}
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
* Otherwise if this Template is new, it will return
* an empty collection; or if this Template has previously
* been saved, it will retrieve related TemplateCssRelacions from storage.
*
* This method is protected by default in order to keep the public
* api reasonable. You can provide public methods for those you
* actually need in Template.
*
* @param Criteria $criteria optional Criteria object to narrow the query
* @param PropelPDO $con optional connection object
* @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return PropelObjectCollection|TemplateCssRelacion[] List of TemplateCssRelacion objects
*/
public function getTemplateCssRelacionsJoinDisposicionColumnas($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$query = TemplateCssRelacionQuery::create(null, $criteria);
$query->joinWith('DisposicionColumnas', $join_behavior);
return $this->getTemplateCssRelacions($query, $con);
}
/**
* Clears the current object and sets all attributes to their default values
*/
......@@ -1573,6 +1877,11 @@ abstract class BaseTemplate extends BaseObject implements Persistent
$o->clearAllReferences($deep);
}
}
if ($this->collTemplateCssRelacions) {
foreach ($this->collTemplateCssRelacions as $o) {
$o->clearAllReferences($deep);
}
}
$this->alreadyInClearAllReferencesDeep = false;
} // if ($deep)
......@@ -1581,6 +1890,10 @@ abstract class BaseTemplate extends BaseObject implements Persistent
$this->collCampanias->clearIterator();
}
$this->collCampanias = null;
if ($this->collTemplateCssRelacions instanceof PropelCollection) {
$this->collTemplateCssRelacions->clearIterator();
}
$this->collTemplateCssRelacions = null;
}
/**
......
<?php
namespace AppBundle\Model\om;
use \BaseObject;
use \BasePeer;
use \Criteria;
use \Exception;
use \PDO;
use \Persistent;
use \Propel;
use \PropelException;
use \PropelPDO;
use AppBundle\Model\DisposicionColumnas;
use AppBundle\Model\DisposicionColumnasQuery;
use AppBundle\Model\Template;
use AppBundle\Model\TemplateCssRelacion;
use AppBundle\Model\TemplateCssRelacionPeer;
use AppBundle\Model\TemplateCssRelacionQuery;
use AppBundle\Model\TemplateQuery;
abstract class BaseTemplateCssRelacion extends BaseObject implements Persistent
{
/**
* Peer class name
*/
const PEER = 'AppBundle\\Model\\TemplateCssRelacionPeer';
/**
* The Peer class.
* Instance provides a convenient way of calling static methods on a class
* that calling code may not be able to identify.
* @var TemplateCssRelacionPeer
*/
protected static $peer;
/**
* The flag var to prevent infinite loop in deep copy
* @var boolean
*/
protected $startCopy = false;
/**
* The value for the tcr_id field.
* @var int
*/
protected $tcr_id;
/**
* The value for the tem_id field.
* @var int
*/
protected $tem_id;
/**
* The value for the dco_id field.
* @var int
*/
protected $dco_id;
/**
* The value for the tcr_tipo field.
* @var int
*/
protected $tcr_tipo;
/**
* The value for the tcr_entorno field.
* @var int
*/
protected $tcr_entorno;
/**
* The value for the tcr_clase_css field.
* @var string
*/
protected $tcr_clase_css;
/**
* @var DisposicionColumnas
*/
protected $aDisposicionColumnas;
/**
* @var Template
*/
protected $aTemplate;
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInSave = false;
/**
* Flag to prevent endless validation loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInValidation = false;
/**
* Flag to prevent endless clearAllReferences($deep=true) loop, if this object is referenced
* @var boolean
*/
protected $alreadyInClearAllReferencesDeep = false;
/**
* Get the [tcr_id] column value.
*
* @return int
*/
public function getTcrId()
{
return $this->tcr_id;
}
/**
* Get the [tem_id] column value.
*
* @return int
*/
public function getTemId()
{
return $this->tem_id;
}
/**
* Get the [dco_id] column value.
*
* @return int
*/
public function getDcoId()
{
return $this->dco_id;
}
/**
* Get the [tcr_tipo] column value.
*
* @return int
*/
public function getTcrTipo()
{
return $this->tcr_tipo;
}
/**
* Get the [tcr_entorno] column value.
*
* @return int
*/
public function getTcrEntorno()
{
return $this->tcr_entorno;
}
/**
* Get the [tcr_clase_css] column value.
*
* @return string
*/
public function getTcrClaseCss()
{
return $this->tcr_clase_css;
}
/**
* Set the value of [tcr_id] column.
*
* @param int $v new value
* @return TemplateCssRelacion The current object (for fluent API support)
*/
public function setTcrId($v)
{
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
if ($this->tcr_id !== $v) {
$this->tcr_id = $v;
$this->modifiedColumns[] = TemplateCssRelacionPeer::TCR_ID;
}
return $this;
} // setTcrId()
/**
* Set the value of [tem_id] column.
*
* @param int $v new value
* @return TemplateCssRelacion The current object (for fluent API support)
*/
public function setTemId($v)
{
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
if ($this->tem_id !== $v) {
$this->tem_id = $v;
$this->modifiedColumns[] = TemplateCssRelacionPeer::TEM_ID;
}
if ($this->aTemplate !== null && $this->aTemplate->getTemId() !== $v) {
$this->aTemplate = null;
}
return $this;
} // setTemId()
/**
* Set the value of [dco_id] column.
*
* @param int $v new value
* @return TemplateCssRelacion The current object (for fluent API support)
*/
public function setDcoId($v)
{
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
if ($this->dco_id !== $v) {
$this->dco_id = $v;
$this->modifiedColumns[] = TemplateCssRelacionPeer::DCO_ID;
}
if ($this->aDisposicionColumnas !== null && $this->aDisposicionColumnas->getDcoId() !== $v) {
$this->aDisposicionColumnas = null;
}
return $this;
} // setDcoId()
/**
* Set the value of [tcr_tipo] column.
*
* @param int $v new value
* @return TemplateCssRelacion The current object (for fluent API support)
*/
public function setTcrTipo($v)
{
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
if ($this->tcr_tipo !== $v) {
$this->tcr_tipo = $v;
$this->modifiedColumns[] = TemplateCssRelacionPeer::TCR_TIPO;
}
return $this;
} // setTcrTipo()
/**
* Set the value of [tcr_entorno] column.
*
* @param int $v new value
* @return TemplateCssRelacion The current object (for fluent API support)
*/
public function setTcrEntorno($v)
{
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
if ($this->tcr_entorno !== $v) {
$this->tcr_entorno = $v;
$this->modifiedColumns[] = TemplateCssRelacionPeer::TCR_ENTORNO;
}
return $this;
} // setTcrEntorno()
/**
* Set the value of [tcr_clase_css] column.
*
* @param string $v new value
* @return TemplateCssRelacion The current object (for fluent API support)
*/
public function setTcrClaseCss($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->tcr_clase_css !== $v) {
$this->tcr_clase_css = $v;
$this->modifiedColumns[] = TemplateCssRelacionPeer::TCR_CLASE_CSS;
}
return $this;
} // setTcrClaseCss()
/**
* Indicates whether the columns in this object are only set to default values.
*
* This method can be used in conjunction with isModified() to indicate whether an object is both
* modified _and_ has some values set which are non-default.
*
* @return boolean Whether the columns in this object are only been set with default values.
*/
public function hasOnlyDefaultValues()
{
// otherwise, everything was equal, so return true
return true;
} // hasOnlyDefaultValues()
/**
* Hydrates (populates) the object variables with values from the database resultset.
*
* An offset (0-based "start column") is specified so that objects can be hydrated
* with a subset of the columns in the resultset rows. This is needed, for example,
* for results of JOIN queries where the resultset row includes columns from two or
* more tables.
*
* @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM)
* @param int $startcol 0-based offset column which indicates which resultset column to start with.
* @param boolean $rehydrate Whether this object is being re-hydrated from the database.
* @return int next starting column
* @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
*/
public function hydrate($row, $startcol = 0, $rehydrate = false)
{
try {
$this->tcr_id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
$this->tem_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null;
$this->dco_id = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null;
$this->tcr_tipo = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null;
$this->tcr_entorno = ($row[$startcol + 4] !== null) ? (int) $row[$startcol + 4] : null;
$this->tcr_clase_css = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
$this->resetModified();
$this->setNew(false);
if ($rehydrate) {
$this->ensureConsistency();
}
$this->postHydrate($row, $startcol, $rehydrate);
return $startcol + 6; // 6 = TemplateCssRelacionPeer::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
throw new PropelException("Error populating TemplateCssRelacion object", $e);
}
}
/**
* Checks and repairs the internal consistency of the object.
*
* This method is executed after an already-instantiated object is re-hydrated
* from the database. It exists to check any foreign keys to make sure that
* the objects related to the current object are correct based on foreign key.
*
* You can override this method in the stub class, but you should always invoke
* the base method from the overridden method (i.e. parent::ensureConsistency()),
* in case your model changes.
*
* @throws PropelException
*/
public function ensureConsistency()
{
if ($this->aTemplate !== null && $this->tem_id !== $this->aTemplate->getTemId()) {
$this->aTemplate = null;
}
if ($this->aDisposicionColumnas !== null && $this->dco_id !== $this->aDisposicionColumnas->getDcoId()) {
$this->aDisposicionColumnas = null;
}
} // ensureConsistency
/**
* Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
*
* This will only work if the object has been saved and has a valid primary key set.
*
* @param boolean $deep (optional) Whether to also de-associated any related objects.
* @param PropelPDO $con (optional) The PropelPDO connection to use.
* @return void
* @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
*/
public function reload($deep = false, PropelPDO $con = null)
{
if ($this->isDeleted()) {
throw new PropelException("Cannot reload a deleted object.");
}
if ($this->isNew()) {
throw new PropelException("Cannot reload an unsaved object.");
}
if ($con === null) {
$con = Propel::getConnection(TemplateCssRelacionPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
// We don't need to alter the object instance pool; we're just modifying this instance
// already in the pool.
$stmt = TemplateCssRelacionPeer::doSelectStmt($this->buildPkeyCriteria(), $con);
$row = $stmt->fetch(PDO::FETCH_NUM);
$stmt->closeCursor();
if (!$row) {
throw new PropelException('Cannot find matching row in the database to reload object values.');
}
$this->hydrate($row, 0, true); // rehydrate
if ($deep) { // also de-associate any related objects?
$this->aDisposicionColumnas = null;
$this->aTemplate = null;
} // if (deep)
}
/**
* Removes this object from datastore and sets delete attribute.
*
* @param PropelPDO $con
* @return void
* @throws PropelException
* @throws Exception
* @see BaseObject::setDeleted()
* @see BaseObject::isDeleted()
*/
public function delete(PropelPDO $con = null)
{
if ($this->isDeleted()) {
throw new PropelException("This object has already been deleted.");
}
if ($con === null) {
$con = Propel::getConnection(TemplateCssRelacionPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$con->beginTransaction();
try {
$deleteQuery = TemplateCssRelacionQuery::create()
->filterByPrimaryKey($this->getPrimaryKey());
$ret = $this->preDelete($con);
if ($ret) {
$deleteQuery->delete($con);
$this->postDelete($con);
$con->commit();
$this->setDeleted(true);
} else {
$con->commit();
}
} catch (Exception $e) {
$con->rollBack();
throw $e;
}
}
/**
* Persists this object to the database.
*
* If the object is new, it inserts it; otherwise an update is performed.
* All modified related objects will also be persisted in the doSave()
* method. This method wraps all precipitate database operations in a
* single transaction.
*
* @param PropelPDO $con
* @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
* @throws PropelException
* @throws Exception
* @see doSave()
*/
public function save(PropelPDO $con = null)
{
if ($this->isDeleted()) {
throw new PropelException("You cannot save an object that has been deleted.");
}
if ($con === null) {
$con = Propel::getConnection(TemplateCssRelacionPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$con->beginTransaction();
$isInsert = $this->isNew();
try {
$ret = $this->preSave($con);
if ($isInsert) {
$ret = $ret && $this->preInsert($con);
} else {
$ret = $ret && $this->preUpdate($con);
}
if ($ret) {
$affectedRows = $this->doSave($con);
if ($isInsert) {
$this->postInsert($con);
} else {
$this->postUpdate($con);
}
$this->postSave($con);
TemplateCssRelacionPeer::addInstanceToPool($this);
} else {
$affectedRows = 0;
}
$con->commit();
return $affectedRows;
} catch (Exception $e) {
$con->rollBack();
throw $e;
}
}
/**
* Performs the work of inserting or updating the row in the database.
*
* If the object is new, it inserts it; otherwise an update is performed.
* All related objects are also updated in this method.
*
* @param PropelPDO $con
* @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
* @throws PropelException
* @see save()
*/
protected function doSave(PropelPDO $con)
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
$this->alreadyInSave = true;
// We call the save method on the following object(s) if they
// were passed to this object by their corresponding set
// method. This object relates to these object(s) by a
// foreign key reference.
if ($this->aDisposicionColumnas !== null) {
if ($this->aDisposicionColumnas->isModified() || $this->aDisposicionColumnas->isNew()) {
$affectedRows += $this->aDisposicionColumnas->save($con);
}
$this->setDisposicionColumnas($this->aDisposicionColumnas);
}
if ($this->aTemplate !== null) {
if ($this->aTemplate->isModified() || $this->aTemplate->isNew()) {
$affectedRows += $this->aTemplate->save($con);
}
$this->setTemplate($this->aTemplate);
}
if ($this->isNew() || $this->isModified()) {
// persist changes
if ($this->isNew()) {
$this->doInsert($con);
} else {
$this->doUpdate($con);
}
$affectedRows += 1;
$this->resetModified();
}
$this->alreadyInSave = false;
}
return $affectedRows;
} // doSave()
/**
* Insert the row in the database.
*
* @param PropelPDO $con
*
* @throws PropelException
* @see doSave()
*/
protected function doInsert(PropelPDO $con)
{
$modifiedColumns = array();
$index = 0;
$this->modifiedColumns[] = TemplateCssRelacionPeer::TCR_ID;
if (null !== $this->tcr_id) {
throw new PropelException('Cannot insert a value for auto-increment primary key (' . TemplateCssRelacionPeer::TCR_ID . ')');
}
// check the columns in natural order for more readable SQL queries
if ($this->isColumnModified(TemplateCssRelacionPeer::TCR_ID)) {
$modifiedColumns[':p' . $index++] = '`tcr_id`';
}
if ($this->isColumnModified(TemplateCssRelacionPeer::TEM_ID)) {
$modifiedColumns[':p' . $index++] = '`tem_id`';
}
if ($this->isColumnModified(TemplateCssRelacionPeer::DCO_ID)) {
$modifiedColumns[':p' . $index++] = '`dco_id`';
}
if ($this->isColumnModified(TemplateCssRelacionPeer::TCR_TIPO)) {
$modifiedColumns[':p' . $index++] = '`tcr_tipo`';
}
if ($this->isColumnModified(TemplateCssRelacionPeer::TCR_ENTORNO)) {
$modifiedColumns[':p' . $index++] = '`tcr_entorno`';
}
if ($this->isColumnModified(TemplateCssRelacionPeer::TCR_CLASE_CSS)) {
$modifiedColumns[':p' . $index++] = '`tcr_clase_css`';
}
$sql = sprintf(
'INSERT INTO `template_css_relacion` (%s) VALUES (%s)',
implode(', ', $modifiedColumns),
implode(', ', array_keys($modifiedColumns))
);
try {
$stmt = $con->prepare($sql);
foreach ($modifiedColumns as $identifier => $columnName) {
switch ($columnName) {
case '`tcr_id`':
$stmt->bindValue($identifier, $this->tcr_id, PDO::PARAM_INT);
break;
case '`tem_id`':
$stmt->bindValue($identifier, $this->tem_id, PDO::PARAM_INT);
break;
case '`dco_id`':
$stmt->bindValue($identifier, $this->dco_id, PDO::PARAM_INT);
break;
case '`tcr_tipo`':
$stmt->bindValue($identifier, $this->tcr_tipo, PDO::PARAM_INT);
break;
case '`tcr_entorno`':
$stmt->bindValue($identifier, $this->tcr_entorno, PDO::PARAM_INT);
break;
case '`tcr_clase_css`':
$stmt->bindValue($identifier, $this->tcr_clase_css, PDO::PARAM_STR);
break;
}
}
$stmt->execute();
} catch (Exception $e) {
Propel::log($e->getMessage(), Propel::LOG_ERR);
throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), $e);
}
try {
$pk = $con->lastInsertId();
} catch (Exception $e) {
throw new PropelException('Unable to get autoincrement id.', $e);
}
$this->setTcrId($pk);
$this->setNew(false);
}
/**
* Update the row in the database.
*
* @param PropelPDO $con
*
* @see doSave()
*/
protected function doUpdate(PropelPDO $con)
{
$selectCriteria = $this->buildPkeyCriteria();
$valuesCriteria = $this->buildCriteria();
BasePeer::doUpdate($selectCriteria, $valuesCriteria, $con);
}
/**
* Array of ValidationFailed objects.
* @var array ValidationFailed[]
*/
protected $validationFailures = array();
/**
* Gets any ValidationFailed objects that resulted from last call to validate().
*
*
* @return array ValidationFailed[]
* @see validate()
*/
public function getValidationFailures()
{
return $this->validationFailures;
}
/**
* Validates the objects modified field values and all objects related to this table.
*
* If $columns is either a column name or an array of column names
* only those columns are validated.
*
* @param mixed $columns Column name or an array of column names.
* @return boolean Whether all columns pass validation.
* @see doValidate()
* @see getValidationFailures()
*/
public function validate($columns = null)
{
$res = $this->doValidate($columns);
if ($res === true) {
$this->validationFailures = array();
return true;
}
$this->validationFailures = $res;
return false;
}
/**
* This function performs the validation work for complex object models.
*
* In addition to checking the current object, all related objects will
* also be validated. If all pass then <code>true</code> is returned; otherwise
* an aggregated array of ValidationFailed objects will be returned.
*
* @param array $columns Array of column names to validate.
* @return mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objects otherwise.
*/
protected function doValidate($columns = null)
{
if (!$this->alreadyInValidation) {
$this->alreadyInValidation = true;
$retval = null;
$failureMap = array();
// We call the validate method on the following object(s) if they
// were passed to this object by their corresponding set
// method. This object relates to these object(s) by a
// foreign key reference.
if ($this->aDisposicionColumnas !== null) {
if (!$this->aDisposicionColumnas->validate($columns)) {
$failureMap = array_merge($failureMap, $this->aDisposicionColumnas->getValidationFailures());
}
}
if ($this->aTemplate !== null) {
if (!$this->aTemplate->validate($columns)) {
$failureMap = array_merge($failureMap, $this->aTemplate->getValidationFailures());
}
}
if (($retval = TemplateCssRelacionPeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval);
}
$this->alreadyInValidation = false;
}
return (!empty($failureMap) ? $failureMap : true);
}
/**
* Retrieves a field from the object by name passed in as a string.
*
* @param string $name name
* @param string $type The type of fieldname the $name is of:
* one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
* BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
* Defaults to BasePeer::TYPE_PHPNAME
* @return mixed Value of field.
*/
public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
{
$pos = TemplateCssRelacionPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
$field = $this->getByPosition($pos);
return $field;
}
/**
* Retrieves a field from the object by Position as specified in the xml schema.
* Zero-based.
*
* @param int $pos position in xml schema
* @return mixed Value of field at $pos
*/
public function getByPosition($pos)
{
switch ($pos) {
case 0:
return $this->getTcrId();
break;
case 1:
return $this->getTemId();
break;
case 2:
return $this->getDcoId();
break;
case 3:
return $this->getTcrTipo();
break;
case 4:
return $this->getTcrEntorno();
break;
case 5:
return $this->getTcrClaseCss();
break;
default:
return null;
break;
} // switch()
}
/**
* Exports the object as an array.
*
* You can specify the key type of the array by passing one of the class
* type constants.
*
* @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
* BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
* Defaults to BasePeer::TYPE_PHPNAME.
* @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to true.
* @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
* @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
*
* @return array an associative array containing the field names (as keys) and field values
*/
public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
{
if (isset($alreadyDumpedObjects['TemplateCssRelacion'][$this->getPrimaryKey()])) {
return '*RECURSION*';
}
$alreadyDumpedObjects['TemplateCssRelacion'][$this->getPrimaryKey()] = true;
$keys = TemplateCssRelacionPeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getTcrId(),
$keys[1] => $this->getTemId(),
$keys[2] => $this->getDcoId(),
$keys[3] => $this->getTcrTipo(),
$keys[4] => $this->getTcrEntorno(),
$keys[5] => $this->getTcrClaseCss(),
);
$virtualColumns = $this->virtualColumns;
foreach ($virtualColumns as $key => $virtualColumn) {
$result[$key] = $virtualColumn;
}
if ($includeForeignObjects) {
if (null !== $this->aDisposicionColumnas) {
$result['DisposicionColumnas'] = $this->aDisposicionColumnas->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
if (null !== $this->aTemplate) {
$result['Template'] = $this->aTemplate->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
}
return $result;
}
/**
* Sets a field from the object by name passed in as a string.
*
* @param string $name peer name
* @param mixed $value field value
* @param string $type The type of fieldname the $name is of:
* one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
* BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
* Defaults to BasePeer::TYPE_PHPNAME
* @return void
*/
public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
{
$pos = TemplateCssRelacionPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
$this->setByPosition($pos, $value);
}
/**
* Sets a field from the object by Position as specified in the xml schema.
* Zero-based.
*
* @param int $pos position in xml schema
* @param mixed $value field value
* @return void
*/
public function setByPosition($pos, $value)
{
switch ($pos) {
case 0:
$this->setTcrId($value);
break;
case 1:
$this->setTemId($value);
break;
case 2:
$this->setDcoId($value);
break;
case 3:
$this->setTcrTipo($value);
break;
case 4:
$this->setTcrEntorno($value);
break;
case 5:
$this->setTcrClaseCss($value);
break;
} // switch()
}
/**
* Populates the object using an array.
*
* This is particularly useful when populating an object from one of the
* request arrays (e.g. $_POST). This method goes through the column
* names, checking to see whether a matching key exists in populated
* array. If so the setByName() method is called for that column.
*
* You can specify the key type of the array by additionally passing one
* of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
* BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
* The default key type is the column's BasePeer::TYPE_PHPNAME
*
* @param array $arr An array to populate the object from.
* @param string $keyType The type of keys the array uses.
* @return void
*/
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{
$keys = TemplateCssRelacionPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) $this->setTcrId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setTemId($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setDcoId($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setTcrTipo($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setTcrEntorno($arr[$keys[4]]);
if (array_key_exists($keys[5], $arr)) $this->setTcrClaseCss($arr[$keys[5]]);
}
/**
* Build a Criteria object containing the values of all modified columns in this object.
*
* @return Criteria The Criteria object containing all modified values.
*/
public function buildCriteria()
{
$criteria = new Criteria(TemplateCssRelacionPeer::DATABASE_NAME);
if ($this->isColumnModified(TemplateCssRelacionPeer::TCR_ID)) $criteria->add(TemplateCssRelacionPeer::TCR_ID, $this->tcr_id);
if ($this->isColumnModified(TemplateCssRelacionPeer::TEM_ID)) $criteria->add(TemplateCssRelacionPeer::TEM_ID, $this->tem_id);
if ($this->isColumnModified(TemplateCssRelacionPeer::DCO_ID)) $criteria->add(TemplateCssRelacionPeer::DCO_ID, $this->dco_id);
if ($this->isColumnModified(TemplateCssRelacionPeer::TCR_TIPO)) $criteria->add(TemplateCssRelacionPeer::TCR_TIPO, $this->tcr_tipo);
if ($this->isColumnModified(TemplateCssRelacionPeer::TCR_ENTORNO)) $criteria->add(TemplateCssRelacionPeer::TCR_ENTORNO, $this->tcr_entorno);
if ($this->isColumnModified(TemplateCssRelacionPeer::TCR_CLASE_CSS)) $criteria->add(TemplateCssRelacionPeer::TCR_CLASE_CSS, $this->tcr_clase_css);
return $criteria;
}
/**
* Builds a Criteria object containing the primary key for this object.
*
* Unlike buildCriteria() this method includes the primary key values regardless
* of whether or not they have been modified.
*
* @return Criteria The Criteria object containing value(s) for primary key(s).
*/
public function buildPkeyCriteria()
{
$criteria = new Criteria(TemplateCssRelacionPeer::DATABASE_NAME);
$criteria->add(TemplateCssRelacionPeer::TCR_ID, $this->tcr_id);
return $criteria;
}
/**
* Returns the primary key for this object (row).
* @return int
*/
public function getPrimaryKey()
{
return $this->getTcrId();
}
/**
* Generic method to set the primary key (tcr_id column).
*
* @param int $key Primary key.
* @return void
*/
public function setPrimaryKey($key)
{
$this->setTcrId($key);
}
/**
* Returns true if the primary key for this object is null.
* @return boolean
*/
public function isPrimaryKeyNull()
{
return null === $this->getTcrId();
}
/**
* Sets contents of passed object to values from current object.
*
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
* @param object $copyObj An object of TemplateCssRelacion (or compatible) type.
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
* @throws PropelException
*/
public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
{
$copyObj->setTemId($this->getTemId());
$copyObj->setDcoId($this->getDcoId());
$copyObj->setTcrTipo($this->getTcrTipo());
$copyObj->setTcrEntorno($this->getTcrEntorno());
$copyObj->setTcrClaseCss($this->getTcrClaseCss());
if ($deepCopy && !$this->startCopy) {
// important: temporarily setNew(false) because this affects the behavior of
// the getter/setter methods for fkey referrer objects.
$copyObj->setNew(false);
// store object hash to prevent cycle
$this->startCopy = true;
//unflag object copy
$this->startCopy = false;
} // if ($deepCopy)
if ($makeNew) {
$copyObj->setNew(true);
$copyObj->setTcrId(NULL); // this is a auto-increment column, so set to default value
}
}
/**
* Makes a copy of this object that will be inserted as a new row in table when saved.
* It creates a new object filling in the simple attributes, but skipping any primary
* keys that are defined for the table.
*
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @return TemplateCssRelacion Clone of current object.
* @throws PropelException
*/
public function copy($deepCopy = false)
{
// we use get_class(), because this might be a subclass
$clazz = get_class($this);
$copyObj = new $clazz();
$this->copyInto($copyObj, $deepCopy);
return $copyObj;
}
/**
* Returns a peer instance associated with this om.
*
* Since Peer classes are not to have any instance attributes, this method returns the
* same instance for all member of this class. The method could therefore
* be static, but this would prevent one from overriding the behavior.
*
* @return TemplateCssRelacionPeer
*/
public function getPeer()
{
if (self::$peer === null) {
self::$peer = new TemplateCssRelacionPeer();
}
return self::$peer;
}
/**
* Declares an association between this object and a DisposicionColumnas object.
*
* @param DisposicionColumnas $v
* @return TemplateCssRelacion The current object (for fluent API support)
* @throws PropelException
*/
public function setDisposicionColumnas(DisposicionColumnas $v = null)
{
if ($v === null) {
$this->setDcoId(NULL);
} else {
$this->setDcoId($v->getDcoId());
}
$this->aDisposicionColumnas = $v;
// Add binding for other direction of this n:n relationship.
// If this object has already been added to the DisposicionColumnas object, it will not be re-added.
if ($v !== null) {
$v->addTemplateCssRelacion($this);
}
return $this;
}
/**
* Get the associated DisposicionColumnas object
*
* @param PropelPDO $con Optional Connection object.
* @param $doQuery Executes a query to get the object if required
* @return DisposicionColumnas The associated DisposicionColumnas object.
* @throws PropelException
*/
public function getDisposicionColumnas(PropelPDO $con = null, $doQuery = true)
{
if ($this->aDisposicionColumnas === null && ($this->dco_id !== null) && $doQuery) {
$this->aDisposicionColumnas = DisposicionColumnasQuery::create()->findPk($this->dco_id, $con);
/* The following can be used additionally to
guarantee the related object contains a reference
to this object. This level of coupling may, however, be
undesirable since it could result in an only partially populated collection
in the referenced object.
$this->aDisposicionColumnas->addTemplateCssRelacions($this);
*/
}
return $this->aDisposicionColumnas;
}
/**
* Declares an association between this object and a Template object.
*
* @param Template $v
* @return TemplateCssRelacion The current object (for fluent API support)
* @throws PropelException
*/
public function setTemplate(Template $v = null)
{
if ($v === null) {
$this->setTemId(NULL);
} else {
$this->setTemId($v->getTemId());
}
$this->aTemplate = $v;
// Add binding for other direction of this n:n relationship.
// If this object has already been added to the Template object, it will not be re-added.
if ($v !== null) {
$v->addTemplateCssRelacion($this);
}
return $this;
}
/**
* Get the associated Template object
*
* @param PropelPDO $con Optional Connection object.
* @param $doQuery Executes a query to get the object if required
* @return Template The associated Template object.
* @throws PropelException
*/
public function getTemplate(PropelPDO $con = null, $doQuery = true)
{
if ($this->aTemplate === null && ($this->tem_id !== null) && $doQuery) {
$this->aTemplate = TemplateQuery::create()->findPk($this->tem_id, $con);
/* The following can be used additionally to
guarantee the related object contains a reference
to this object. This level of coupling may, however, be
undesirable since it could result in an only partially populated collection
in the referenced object.
$this->aTemplate->addTemplateCssRelacions($this);
*/
}
return $this->aTemplate;
}
/**
* Clears the current object and sets all attributes to their default values
*/
public function clear()
{
$this->tcr_id = null;
$this->tem_id = null;
$this->dco_id = null;
$this->tcr_tipo = null;
$this->tcr_entorno = null;
$this->tcr_clase_css = null;
$this->alreadyInSave = false;
$this->alreadyInValidation = false;
$this->alreadyInClearAllReferencesDeep = false;
$this->clearAllReferences();
$this->resetModified();
$this->setNew(true);
$this->setDeleted(false);
}
/**
* Resets all references to other model objects or collections of model objects.
*
* This method is a user-space workaround for PHP's inability to garbage collect
* objects with circular references (even in PHP 5.3). This is currently necessary
* when using Propel in certain daemon or large-volume/high-memory operations.
*
* @param boolean $deep Whether to also clear the references on all referrer objects.
*/
public function clearAllReferences($deep = false)
{
if ($deep && !$this->alreadyInClearAllReferencesDeep) {
$this->alreadyInClearAllReferencesDeep = true;
if ($this->aDisposicionColumnas instanceof Persistent) {
$this->aDisposicionColumnas->clearAllReferences($deep);
}
if ($this->aTemplate instanceof Persistent) {
$this->aTemplate->clearAllReferences($deep);
}
$this->alreadyInClearAllReferencesDeep = false;
} // if ($deep)
$this->aDisposicionColumnas = null;
$this->aTemplate = null;
}
/**
* return the string representation of this object
*
* @return string
*/
public function __toString()
{
return (string) $this->exportTo(TemplateCssRelacionPeer::DEFAULT_STRING_FORMAT);
}
/**
* return true is the object is in saving state
*
* @return boolean
*/
public function isAlreadyInSave()
{
return $this->alreadyInSave;
}
}
<?php
namespace AppBundle\Model\om;
use \BasePeer;
use \Criteria;
use \PDO;
use \PDOStatement;
use \Propel;
use \PropelException;
use \PropelPDO;
use AppBundle\Model\DisposicionColumnasPeer;
use AppBundle\Model\TemplateCssRelacion;
use AppBundle\Model\TemplateCssRelacionPeer;
use AppBundle\Model\TemplatePeer;
use AppBundle\Model\map\TemplateCssRelacionTableMap;
abstract class BaseTemplateCssRelacionPeer
{
/** the default database name for this class */
const DATABASE_NAME = 'conn1';
/** the table name for this class */
const TABLE_NAME = 'template_css_relacion';
/** the related Propel class for this table */
const OM_CLASS = 'AppBundle\\Model\\TemplateCssRelacion';
/** the related TableMap class for this table */
const TM_CLASS = 'AppBundle\\Model\\map\\TemplateCssRelacionTableMap';
/** The total number of columns. */
const NUM_COLUMNS = 6;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */
const NUM_HYDRATE_COLUMNS = 6;
/** the column name for the tcr_id field */
const TCR_ID = 'template_css_relacion.tcr_id';
/** the column name for the tem_id field */
const TEM_ID = 'template_css_relacion.tem_id';
/** the column name for the dco_id field */
const DCO_ID = 'template_css_relacion.dco_id';
/** the column name for the tcr_tipo field */
const TCR_TIPO = 'template_css_relacion.tcr_tipo';
/** the column name for the tcr_entorno field */
const TCR_ENTORNO = 'template_css_relacion.tcr_entorno';
/** the column name for the tcr_clase_css field */
const TCR_CLASE_CSS = 'template_css_relacion.tcr_clase_css';
/** The default string format for model objects of the related table **/
const DEFAULT_STRING_FORMAT = 'YAML';
/**
* An identity map to hold any loaded instances of TemplateCssRelacion objects.
* This must be public so that other peer classes can access this when hydrating from JOIN
* queries.
* @var array TemplateCssRelacion[]
*/
public static $instances = array();
/**
* holds an array of fieldnames
*
* first dimension keys are the type constants
* e.g. TemplateCssRelacionPeer::$fieldNames[TemplateCssRelacionPeer::TYPE_PHPNAME][0] = 'Id'
*/
protected static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('TcrId', 'TemId', 'DcoId', 'TcrTipo', 'TcrEntorno', 'TcrClaseCss', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('tcrId', 'temId', 'dcoId', 'tcrTipo', 'tcrEntorno', 'tcrClaseCss', ),
BasePeer::TYPE_COLNAME => array (TemplateCssRelacionPeer::TCR_ID, TemplateCssRelacionPeer::TEM_ID, TemplateCssRelacionPeer::DCO_ID, TemplateCssRelacionPeer::TCR_TIPO, TemplateCssRelacionPeer::TCR_ENTORNO, TemplateCssRelacionPeer::TCR_CLASE_CSS, ),
BasePeer::TYPE_RAW_COLNAME => array ('TCR_ID', 'TEM_ID', 'DCO_ID', 'TCR_TIPO', 'TCR_ENTORNO', 'TCR_CLASE_CSS', ),
BasePeer::TYPE_FIELDNAME => array ('tcr_id', 'tem_id', 'dco_id', 'tcr_tipo', 'tcr_entorno', 'tcr_clase_css', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
);
/**
* holds an array of keys for quick access to the fieldnames array
*
* first dimension keys are the type constants
* e.g. TemplateCssRelacionPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
protected static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('TcrId' => 0, 'TemId' => 1, 'DcoId' => 2, 'TcrTipo' => 3, 'TcrEntorno' => 4, 'TcrClaseCss' => 5, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('tcrId' => 0, 'temId' => 1, 'dcoId' => 2, 'tcrTipo' => 3, 'tcrEntorno' => 4, 'tcrClaseCss' => 5, ),
BasePeer::TYPE_COLNAME => array (TemplateCssRelacionPeer::TCR_ID => 0, TemplateCssRelacionPeer::TEM_ID => 1, TemplateCssRelacionPeer::DCO_ID => 2, TemplateCssRelacionPeer::TCR_TIPO => 3, TemplateCssRelacionPeer::TCR_ENTORNO => 4, TemplateCssRelacionPeer::TCR_CLASE_CSS => 5, ),
BasePeer::TYPE_RAW_COLNAME => array ('TCR_ID' => 0, 'TEM_ID' => 1, 'DCO_ID' => 2, 'TCR_TIPO' => 3, 'TCR_ENTORNO' => 4, 'TCR_CLASE_CSS' => 5, ),
BasePeer::TYPE_FIELDNAME => array ('tcr_id' => 0, 'tem_id' => 1, 'dco_id' => 2, 'tcr_tipo' => 3, 'tcr_entorno' => 4, 'tcr_clase_css' => 5, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
);
/**
* Translates a fieldname to another type
*
* @param string $name field name
* @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
* BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
* @param string $toType One of the class type constants
* @return string translated name of the field.
* @throws PropelException - if the specified name could not be found in the fieldname mappings.
*/
public static function translateFieldName($name, $fromType, $toType)
{
$toNames = TemplateCssRelacionPeer::getFieldNames($toType);
$key = isset(TemplateCssRelacionPeer::$fieldKeys[$fromType][$name]) ? TemplateCssRelacionPeer::$fieldKeys[$fromType][$name] : null;
if ($key === null) {
throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(TemplateCssRelacionPeer::$fieldKeys[$fromType], true));
}
return $toNames[$key];
}
/**
* Returns an array of field names.
*
* @param string $type The type of fieldnames to return:
* One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
* BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
* @return array A list of field names
* @throws PropelException - if the type is not valid.
*/
public static function getFieldNames($type = BasePeer::TYPE_PHPNAME)
{
if (!array_key_exists($type, TemplateCssRelacionPeer::$fieldNames)) {
throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.');
}
return TemplateCssRelacionPeer::$fieldNames[$type];
}
/**
* Convenience method which changes table.column to alias.column.
*
* Using this method you can maintain SQL abstraction while using column aliases.
* <code>
* $c->addAlias("alias1", TablePeer::TABLE_NAME);
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
* </code>
* @param string $alias The alias for the current table.
* @param string $column The column name for current table. (i.e. TemplateCssRelacionPeer::COLUMN_NAME).
* @return string
*/
public static function alias($alias, $column)
{
return str_replace(TemplateCssRelacionPeer::TABLE_NAME.'.', $alias.'.', $column);
}
/**
* Add all the columns needed to create a new object.
*
* Note: any columns that were marked with lazyLoad="true" in the
* XML schema will not be added to the select list and only loaded
* on demand.
*
* @param Criteria $criteria object containing the columns to add.
* @param string $alias optional table alias
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function addSelectColumns(Criteria $criteria, $alias = null)
{
if (null === $alias) {
$criteria->addSelectColumn(TemplateCssRelacionPeer::TCR_ID);
$criteria->addSelectColumn(TemplateCssRelacionPeer::TEM_ID);
$criteria->addSelectColumn(TemplateCssRelacionPeer::DCO_ID);
$criteria->addSelectColumn(TemplateCssRelacionPeer::TCR_TIPO);
$criteria->addSelectColumn(TemplateCssRelacionPeer::TCR_ENTORNO);
$criteria->addSelectColumn(TemplateCssRelacionPeer::TCR_CLASE_CSS);
} else {
$criteria->addSelectColumn($alias . '.tcr_id');
$criteria->addSelectColumn($alias . '.tem_id');
$criteria->addSelectColumn($alias . '.dco_id');
$criteria->addSelectColumn($alias . '.tcr_tipo');
$criteria->addSelectColumn($alias . '.tcr_entorno');
$criteria->addSelectColumn($alias . '.tcr_clase_css');
}
}
/**
* Returns the number of rows matching criteria.
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
* @param PropelPDO $con
* @return int Number of matching rows.
*/
public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null)
{
// we may modify criteria, so copy it first
$criteria = clone $criteria;
// We need to set the primary table name, since in the case that there are no WHERE columns
// it will be impossible for the BasePeer::createSelectSql() method to determine which
// tables go into the FROM clause.
$criteria->setPrimaryTableName(TemplateCssRelacionPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
TemplateCssRelacionPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
$criteria->setDbName(TemplateCssRelacionPeer::DATABASE_NAME); // Set the correct dbName
if ($con === null) {
$con = Propel::getConnection(TemplateCssRelacionPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
// BasePeer returns a PDOStatement
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$count = (int) $row[0];
} else {
$count = 0; // no rows returned; we infer that means 0 matches.
}
$stmt->closeCursor();
return $count;
}
/**
* Selects one object from the DB.
*
* @param Criteria $criteria object used to create the SELECT statement.
* @param PropelPDO $con
* @return TemplateCssRelacion
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectOne(Criteria $criteria, PropelPDO $con = null)
{
$critcopy = clone $criteria;
$critcopy->setLimit(1);
$objects = TemplateCssRelacionPeer::doSelect($critcopy, $con);
if ($objects) {
return $objects[0];
}
return null;
}
/**
* Selects several row from the DB.
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param PropelPDO $con
* @return array Array of selected Objects
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelect(Criteria $criteria, PropelPDO $con = null)
{
return TemplateCssRelacionPeer::populateObjects(TemplateCssRelacionPeer::doSelectStmt($criteria, $con));
}
/**
* Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.
*
* Use this method directly if you want to work with an executed statement directly (for example
* to perform your own object hydration).
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param PropelPDO $con The connection to use
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
* @return PDOStatement The executed PDOStatement object.
* @see BasePeer::doSelect()
*/
public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(TemplateCssRelacionPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
if (!$criteria->hasSelectClause()) {
$criteria = clone $criteria;
TemplateCssRelacionPeer::addSelectColumns($criteria);
}
// Set the correct dbName
$criteria->setDbName(TemplateCssRelacionPeer::DATABASE_NAME);
// BasePeer returns a PDOStatement
return BasePeer::doSelect($criteria, $con);
}
/**
* Adds an object to the instance pool.
*
* Propel keeps cached copies of objects in an instance pool when they are retrieved
* from the database. In some cases -- especially when you override doSelect*()
* methods in your stub classes -- you may need to explicitly add objects
* to the cache in order to ensure that the same objects are always returned by doSelect*()
* and retrieveByPK*() calls.
*
* @param TemplateCssRelacion $obj A TemplateCssRelacion object.
* @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
*/
public static function addInstanceToPool($obj, $key = null)
{
if (Propel::isInstancePoolingEnabled()) {
if ($key === null) {
$key = (string) $obj->getTcrId();
} // if key === null
TemplateCssRelacionPeer::$instances[$key] = $obj;
}
}
/**
* Removes an object from the instance pool.
*
* Propel keeps cached copies of objects in an instance pool when they are retrieved
* from the database. In some cases -- especially when you override doDelete
* methods in your stub classes -- you may need to explicitly remove objects
* from the cache in order to prevent returning objects that no longer exist.
*
* @param mixed $value A TemplateCssRelacion object or a primary key value.
*
* @return void
* @throws PropelException - if the value is invalid.
*/
public static function removeInstanceFromPool($value)
{
if (Propel::isInstancePoolingEnabled() && $value !== null) {
if (is_object($value) && $value instanceof TemplateCssRelacion) {
$key = (string) $value->getTcrId();
} elseif (is_scalar($value)) {
// assume we've been passed a primary key
$key = (string) $value;
} else {
$e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or TemplateCssRelacion object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true)));
throw $e;
}
unset(TemplateCssRelacionPeer::$instances[$key]);
}
} // removeInstanceFromPool()
/**
* Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
*
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
* a multi-column primary key, a serialize()d version of the primary key will be returned.
*
* @param string $key The key (@see getPrimaryKeyHash()) for this instance.
* @return TemplateCssRelacion Found object or null if 1) no instance exists for specified key or 2) instance pooling has been disabled.
* @see getPrimaryKeyHash()
*/
public static function getInstanceFromPool($key)
{
if (Propel::isInstancePoolingEnabled()) {
if (isset(TemplateCssRelacionPeer::$instances[$key])) {
return TemplateCssRelacionPeer::$instances[$key];
}
}
return null; // just to be explicit
}
/**
* Clear the instance pool.
*
* @return void
*/
public static function clearInstancePool($and_clear_all_references = false)
{
if ($and_clear_all_references) {
foreach (TemplateCssRelacionPeer::$instances as $instance) {
$instance->clearAllReferences(true);
}
}
TemplateCssRelacionPeer::$instances = array();
}
/**
* Method to invalidate the instance pool of all tables related to template_css_relacion
* by a foreign key with ON DELETE CASCADE
*/
public static function clearRelatedInstancePool()
{
}
/**
* Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
*
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
* a multi-column primary key, a serialize()d version of the primary key will be returned.
*
* @param array $row PropelPDO resultset row.
* @param int $startcol The 0-based offset for reading from the resultset row.
* @return string A string version of PK or null if the components of primary key in result array are all null.
*/
public static function getPrimaryKeyHashFromRow($row, $startcol = 0)
{
// If the PK cannot be derived from the row, return null.
if ($row[$startcol] === null) {
return null;
}
return (string) $row[$startcol];
}
/**
* Retrieves the primary key from the DB resultset row
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
* a multi-column primary key, an array of the primary key columns will be returned.
*
* @param array $row PropelPDO resultset row.
* @param int $startcol The 0-based offset for reading from the resultset row.
* @return mixed The primary key of the row
*/
public static function getPrimaryKeyFromRow($row, $startcol = 0)
{
return (int) $row[$startcol];
}
/**
* The returned array will contain objects of the default type or
* objects that inherit from the default.
*
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function populateObjects(PDOStatement $stmt)
{
$results = array();
// set the class once to avoid overhead in the loop
$cls = TemplateCssRelacionPeer::getOMClass();
// populate the object(s)
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$key = TemplateCssRelacionPeer::getPrimaryKeyHashFromRow($row, 0);
if (null !== ($obj = TemplateCssRelacionPeer::getInstanceFromPool($key))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj->hydrate($row, 0, true); // rehydrate
$results[] = $obj;
} else {
$obj = new $cls();
$obj->hydrate($row);
$results[] = $obj;
TemplateCssRelacionPeer::addInstanceToPool($obj, $key);
} // if key exists
}
$stmt->closeCursor();
return $results;
}
/**
* Populates an object of the default type or an object that inherit from the default.
*
* @param array $row PropelPDO resultset row.
* @param int $startcol The 0-based offset for reading from the resultset row.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
* @return array (TemplateCssRelacion object, last column rank)
*/
public static function populateObject($row, $startcol = 0)
{
$key = TemplateCssRelacionPeer::getPrimaryKeyHashFromRow($row, $startcol);
if (null !== ($obj = TemplateCssRelacionPeer::getInstanceFromPool($key))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj->hydrate($row, $startcol, true); // rehydrate
$col = $startcol + TemplateCssRelacionPeer::NUM_HYDRATE_COLUMNS;
} else {
$cls = TemplateCssRelacionPeer::OM_CLASS;
$obj = new $cls();
$col = $obj->hydrate($row, $startcol);
TemplateCssRelacionPeer::addInstanceToPool($obj, $key);
}
return array($obj, $col);
}
/**
* Returns the number of rows matching criteria, joining the related DisposicionColumnas table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
public static function doCountJoinDisposicionColumnas(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// We need to set the primary table name, since in the case that there are no WHERE columns
// it will be impossible for the BasePeer::createSelectSql() method to determine which
// tables go into the FROM clause.
$criteria->setPrimaryTableName(TemplateCssRelacionPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
TemplateCssRelacionPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
// Set the correct dbName
$criteria->setDbName(TemplateCssRelacionPeer::DATABASE_NAME);
if ($con === null) {
$con = Propel::getConnection(TemplateCssRelacionPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$criteria->addJoin(TemplateCssRelacionPeer::DCO_ID, DisposicionColumnasPeer::DCO_ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$count = (int) $row[0];
} else {
$count = 0; // no rows returned; we infer that means 0 matches.
}
$stmt->closeCursor();
return $count;
}
/**
* Returns the number of rows matching criteria, joining the related Template table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
public static function doCountJoinTemplate(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// We need to set the primary table name, since in the case that there are no WHERE columns
// it will be impossible for the BasePeer::createSelectSql() method to determine which
// tables go into the FROM clause.
$criteria->setPrimaryTableName(TemplateCssRelacionPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
TemplateCssRelacionPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
// Set the correct dbName
$criteria->setDbName(TemplateCssRelacionPeer::DATABASE_NAME);
if ($con === null) {
$con = Propel::getConnection(TemplateCssRelacionPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$criteria->addJoin(TemplateCssRelacionPeer::TEM_ID, TemplatePeer::TEM_ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$count = (int) $row[0];
} else {
$count = 0; // no rows returned; we infer that means 0 matches.
}
$stmt->closeCursor();
return $count;
}
/**
* Selects a collection of TemplateCssRelacion objects pre-filled with their DisposicionColumnas objects.
* @param Criteria $criteria
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return array Array of TemplateCssRelacion objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectJoinDisposicionColumnas(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
// Set the correct dbName if it has not been overridden
if ($criteria->getDbName() == Propel::getDefaultDB()) {
$criteria->setDbName(TemplateCssRelacionPeer::DATABASE_NAME);
}
TemplateCssRelacionPeer::addSelectColumns($criteria);
$startcol = TemplateCssRelacionPeer::NUM_HYDRATE_COLUMNS;
DisposicionColumnasPeer::addSelectColumns($criteria);
$criteria->addJoin(TemplateCssRelacionPeer::DCO_ID, DisposicionColumnasPeer::DCO_ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$key1 = TemplateCssRelacionPeer::getPrimaryKeyHashFromRow($row, 0);
if (null !== ($obj1 = TemplateCssRelacionPeer::getInstanceFromPool($key1))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj1->hydrate($row, 0, true); // rehydrate
} else {
$cls = TemplateCssRelacionPeer::getOMClass();
$obj1 = new $cls();
$obj1->hydrate($row);
TemplateCssRelacionPeer::addInstanceToPool($obj1, $key1);
} // if $obj1 already loaded
$key2 = DisposicionColumnasPeer::getPrimaryKeyHashFromRow($row, $startcol);
if ($key2 !== null) {
$obj2 = DisposicionColumnasPeer::getInstanceFromPool($key2);
if (!$obj2) {
$cls = DisposicionColumnasPeer::getOMClass();
$obj2 = new $cls();
$obj2->hydrate($row, $startcol);
DisposicionColumnasPeer::addInstanceToPool($obj2, $key2);
} // if obj2 already loaded
// Add the $obj1 (TemplateCssRelacion) to $obj2 (DisposicionColumnas)
$obj2->addTemplateCssRelacion($obj1);
} // if joined row was not null
$results[] = $obj1;
}
$stmt->closeCursor();
return $results;
}
/**
* Selects a collection of TemplateCssRelacion objects pre-filled with their Template objects.
* @param Criteria $criteria
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return array Array of TemplateCssRelacion objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectJoinTemplate(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
// Set the correct dbName if it has not been overridden
if ($criteria->getDbName() == Propel::getDefaultDB()) {
$criteria->setDbName(TemplateCssRelacionPeer::DATABASE_NAME);
}
TemplateCssRelacionPeer::addSelectColumns($criteria);
$startcol = TemplateCssRelacionPeer::NUM_HYDRATE_COLUMNS;
TemplatePeer::addSelectColumns($criteria);
$criteria->addJoin(TemplateCssRelacionPeer::TEM_ID, TemplatePeer::TEM_ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$key1 = TemplateCssRelacionPeer::getPrimaryKeyHashFromRow($row, 0);
if (null !== ($obj1 = TemplateCssRelacionPeer::getInstanceFromPool($key1))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj1->hydrate($row, 0, true); // rehydrate
} else {
$cls = TemplateCssRelacionPeer::getOMClass();
$obj1 = new $cls();
$obj1->hydrate($row);
TemplateCssRelacionPeer::addInstanceToPool($obj1, $key1);
} // if $obj1 already loaded
$key2 = TemplatePeer::getPrimaryKeyHashFromRow($row, $startcol);
if ($key2 !== null) {
$obj2 = TemplatePeer::getInstanceFromPool($key2);
if (!$obj2) {
$cls = TemplatePeer::getOMClass();
$obj2 = new $cls();
$obj2->hydrate($row, $startcol);
TemplatePeer::addInstanceToPool($obj2, $key2);
} // if obj2 already loaded
// Add the $obj1 (TemplateCssRelacion) to $obj2 (Template)
$obj2->addTemplateCssRelacion($obj1);
} // if joined row was not null
$results[] = $obj1;
}
$stmt->closeCursor();
return $results;
}
/**
* Returns the number of rows matching criteria, joining all related tables
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
public static function doCountJoinAll(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// We need to set the primary table name, since in the case that there are no WHERE columns
// it will be impossible for the BasePeer::createSelectSql() method to determine which
// tables go into the FROM clause.
$criteria->setPrimaryTableName(TemplateCssRelacionPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
TemplateCssRelacionPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
// Set the correct dbName
$criteria->setDbName(TemplateCssRelacionPeer::DATABASE_NAME);
if ($con === null) {
$con = Propel::getConnection(TemplateCssRelacionPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$criteria->addJoin(TemplateCssRelacionPeer::DCO_ID, DisposicionColumnasPeer::DCO_ID, $join_behavior);
$criteria->addJoin(TemplateCssRelacionPeer::TEM_ID, TemplatePeer::TEM_ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$count = (int) $row[0];
} else {
$count = 0; // no rows returned; we infer that means 0 matches.
}
$stmt->closeCursor();
return $count;
}
/**
* Selects a collection of TemplateCssRelacion objects pre-filled with all related objects.
*
* @param Criteria $criteria
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return array Array of TemplateCssRelacion objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectJoinAll(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
// Set the correct dbName if it has not been overridden
if ($criteria->getDbName() == Propel::getDefaultDB()) {
$criteria->setDbName(TemplateCssRelacionPeer::DATABASE_NAME);
}
TemplateCssRelacionPeer::addSelectColumns($criteria);
$startcol2 = TemplateCssRelacionPeer::NUM_HYDRATE_COLUMNS;
DisposicionColumnasPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + DisposicionColumnasPeer::NUM_HYDRATE_COLUMNS;
TemplatePeer::addSelectColumns($criteria);
$startcol4 = $startcol3 + TemplatePeer::NUM_HYDRATE_COLUMNS;
$criteria->addJoin(TemplateCssRelacionPeer::DCO_ID, DisposicionColumnasPeer::DCO_ID, $join_behavior);
$criteria->addJoin(TemplateCssRelacionPeer::TEM_ID, TemplatePeer::TEM_ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$key1 = TemplateCssRelacionPeer::getPrimaryKeyHashFromRow($row, 0);
if (null !== ($obj1 = TemplateCssRelacionPeer::getInstanceFromPool($key1))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj1->hydrate($row, 0, true); // rehydrate
} else {
$cls = TemplateCssRelacionPeer::getOMClass();
$obj1 = new $cls();
$obj1->hydrate($row);
TemplateCssRelacionPeer::addInstanceToPool($obj1, $key1);
} // if obj1 already loaded
// Add objects for joined DisposicionColumnas rows
$key2 = DisposicionColumnasPeer::getPrimaryKeyHashFromRow($row, $startcol2);
if ($key2 !== null) {
$obj2 = DisposicionColumnasPeer::getInstanceFromPool($key2);
if (!$obj2) {
$cls = DisposicionColumnasPeer::getOMClass();
$obj2 = new $cls();
$obj2->hydrate($row, $startcol2);
DisposicionColumnasPeer::addInstanceToPool($obj2, $key2);
} // if obj2 loaded
// Add the $obj1 (TemplateCssRelacion) to the collection in $obj2 (DisposicionColumnas)
$obj2->addTemplateCssRelacion($obj1);
} // if joined row not null
// Add objects for joined Template rows
$key3 = TemplatePeer::getPrimaryKeyHashFromRow($row, $startcol3);
if ($key3 !== null) {
$obj3 = TemplatePeer::getInstanceFromPool($key3);
if (!$obj3) {
$cls = TemplatePeer::getOMClass();
$obj3 = new $cls();
$obj3->hydrate($row, $startcol3);
TemplatePeer::addInstanceToPool($obj3, $key3);
} // if obj3 loaded
// Add the $obj1 (TemplateCssRelacion) to the collection in $obj3 (Template)
$obj3->addTemplateCssRelacion($obj1);
} // if joined row not null
$results[] = $obj1;
}
$stmt->closeCursor();
return $results;
}
/**
* Returns the number of rows matching criteria, joining the related DisposicionColumnas table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
public static function doCountJoinAllExceptDisposicionColumnas(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// We need to set the primary table name, since in the case that there are no WHERE columns
// it will be impossible for the BasePeer::createSelectSql() method to determine which
// tables go into the FROM clause.
$criteria->setPrimaryTableName(TemplateCssRelacionPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
TemplateCssRelacionPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY should not affect count
// Set the correct dbName
$criteria->setDbName(TemplateCssRelacionPeer::DATABASE_NAME);
if ($con === null) {
$con = Propel::getConnection(TemplateCssRelacionPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$criteria->addJoin(TemplateCssRelacionPeer::TEM_ID, TemplatePeer::TEM_ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$count = (int) $row[0];
} else {
$count = 0; // no rows returned; we infer that means 0 matches.
}
$stmt->closeCursor();
return $count;
}
/**
* Returns the number of rows matching criteria, joining the related Template table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
public static function doCountJoinAllExceptTemplate(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// We need to set the primary table name, since in the case that there are no WHERE columns
// it will be impossible for the BasePeer::createSelectSql() method to determine which
// tables go into the FROM clause.
$criteria->setPrimaryTableName(TemplateCssRelacionPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
TemplateCssRelacionPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY should not affect count
// Set the correct dbName
$criteria->setDbName(TemplateCssRelacionPeer::DATABASE_NAME);
if ($con === null) {
$con = Propel::getConnection(TemplateCssRelacionPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$criteria->addJoin(TemplateCssRelacionPeer::DCO_ID, DisposicionColumnasPeer::DCO_ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$count = (int) $row[0];
} else {
$count = 0; // no rows returned; we infer that means 0 matches.
}
$stmt->closeCursor();
return $count;
}
/**
* Selects a collection of TemplateCssRelacion objects pre-filled with all related objects except DisposicionColumnas.
*
* @param Criteria $criteria
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return array Array of TemplateCssRelacion objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectJoinAllExceptDisposicionColumnas(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
// Set the correct dbName if it has not been overridden
// $criteria->getDbName() will return the same object if not set to another value
// so == check is okay and faster
if ($criteria->getDbName() == Propel::getDefaultDB()) {
$criteria->setDbName(TemplateCssRelacionPeer::DATABASE_NAME);
}
TemplateCssRelacionPeer::addSelectColumns($criteria);
$startcol2 = TemplateCssRelacionPeer::NUM_HYDRATE_COLUMNS;
TemplatePeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + TemplatePeer::NUM_HYDRATE_COLUMNS;
$criteria->addJoin(TemplateCssRelacionPeer::TEM_ID, TemplatePeer::TEM_ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$key1 = TemplateCssRelacionPeer::getPrimaryKeyHashFromRow($row, 0);
if (null !== ($obj1 = TemplateCssRelacionPeer::getInstanceFromPool($key1))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj1->hydrate($row, 0, true); // rehydrate
} else {
$cls = TemplateCssRelacionPeer::getOMClass();
$obj1 = new $cls();
$obj1->hydrate($row);
TemplateCssRelacionPeer::addInstanceToPool($obj1, $key1);
} // if obj1 already loaded
// Add objects for joined Template rows
$key2 = TemplatePeer::getPrimaryKeyHashFromRow($row, $startcol2);
if ($key2 !== null) {
$obj2 = TemplatePeer::getInstanceFromPool($key2);
if (!$obj2) {
$cls = TemplatePeer::getOMClass();
$obj2 = new $cls();
$obj2->hydrate($row, $startcol2);
TemplatePeer::addInstanceToPool($obj2, $key2);
} // if $obj2 already loaded
// Add the $obj1 (TemplateCssRelacion) to the collection in $obj2 (Template)
$obj2->addTemplateCssRelacion($obj1);
} // if joined row is not null
$results[] = $obj1;
}
$stmt->closeCursor();
return $results;
}
/**
* Selects a collection of TemplateCssRelacion objects pre-filled with all related objects except Template.
*
* @param Criteria $criteria
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return array Array of TemplateCssRelacion objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectJoinAllExceptTemplate(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
// Set the correct dbName if it has not been overridden
// $criteria->getDbName() will return the same object if not set to another value
// so == check is okay and faster
if ($criteria->getDbName() == Propel::getDefaultDB()) {
$criteria->setDbName(TemplateCssRelacionPeer::DATABASE_NAME);
}
TemplateCssRelacionPeer::addSelectColumns($criteria);
$startcol2 = TemplateCssRelacionPeer::NUM_HYDRATE_COLUMNS;
DisposicionColumnasPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + DisposicionColumnasPeer::NUM_HYDRATE_COLUMNS;
$criteria->addJoin(TemplateCssRelacionPeer::DCO_ID, DisposicionColumnasPeer::DCO_ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$key1 = TemplateCssRelacionPeer::getPrimaryKeyHashFromRow($row, 0);
if (null !== ($obj1 = TemplateCssRelacionPeer::getInstanceFromPool($key1))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj1->hydrate($row, 0, true); // rehydrate
} else {
$cls = TemplateCssRelacionPeer::getOMClass();
$obj1 = new $cls();
$obj1->hydrate($row);
TemplateCssRelacionPeer::addInstanceToPool($obj1, $key1);
} // if obj1 already loaded
// Add objects for joined DisposicionColumnas rows
$key2 = DisposicionColumnasPeer::getPrimaryKeyHashFromRow($row, $startcol2);
if ($key2 !== null) {
$obj2 = DisposicionColumnasPeer::getInstanceFromPool($key2);
if (!$obj2) {
$cls = DisposicionColumnasPeer::getOMClass();
$obj2 = new $cls();
$obj2->hydrate($row, $startcol2);
DisposicionColumnasPeer::addInstanceToPool($obj2, $key2);
} // if $obj2 already loaded
// Add the $obj1 (TemplateCssRelacion) to the collection in $obj2 (DisposicionColumnas)
$obj2->addTemplateCssRelacion($obj1);
} // if joined row is not null
$results[] = $obj1;
}
$stmt->closeCursor();
return $results;
}
/**
* Returns the TableMap related to this peer.
* This method is not needed for general use but a specific application could have a need.
* @return TableMap
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function getTableMap()
{
return Propel::getDatabaseMap(TemplateCssRelacionPeer::DATABASE_NAME)->getTable(TemplateCssRelacionPeer::TABLE_NAME);
}
/**
* Add a TableMap instance to the database for this peer class.
*/
public static function buildTableMap()
{
$dbMap = Propel::getDatabaseMap(BaseTemplateCssRelacionPeer::DATABASE_NAME);
if (!$dbMap->hasTable(BaseTemplateCssRelacionPeer::TABLE_NAME)) {
$dbMap->addTableObject(new \AppBundle\Model\map\TemplateCssRelacionTableMap());
}
}
/**
* The class that the Peer will make instances of.
*
*
* @return string ClassName
*/
public static function getOMClass($row = 0, $colnum = 0)
{
return TemplateCssRelacionPeer::OM_CLASS;
}
/**
* Performs an INSERT on the database, given a TemplateCssRelacion or Criteria object.
*
* @param mixed $values Criteria or TemplateCssRelacion object containing data that is used to create the INSERT statement.
* @param PropelPDO $con the PropelPDO connection to use
* @return mixed The new primary key.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doInsert($values, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(TemplateCssRelacionPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} else {
$criteria = $values->buildCriteria(); // build Criteria from TemplateCssRelacion object
}
if ($criteria->containsKey(TemplateCssRelacionPeer::TCR_ID) && $criteria->keyContainsValue(TemplateCssRelacionPeer::TCR_ID) ) {
throw new PropelException('Cannot insert a value for auto-increment primary key ('.TemplateCssRelacionPeer::TCR_ID.')');
}
// Set the correct dbName
$criteria->setDbName(TemplateCssRelacionPeer::DATABASE_NAME);
try {
// use transaction because $criteria could contain info
// for more than one table (I guess, conceivably)
$con->beginTransaction();
$pk = BasePeer::doInsert($criteria, $con);
$con->commit();
} catch (Exception $e) {
$con->rollBack();
throw $e;
}
return $pk;
}
/**
* Performs an UPDATE on the database, given a TemplateCssRelacion or Criteria object.
*
* @param mixed $values Criteria or TemplateCssRelacion object containing data that is used to create the UPDATE statement.
* @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions).
* @return int The number of affected rows (if supported by underlying database driver).
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doUpdate($values, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(TemplateCssRelacionPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$selectCriteria = new Criteria(TemplateCssRelacionPeer::DATABASE_NAME);
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
$comparison = $criteria->getComparison(TemplateCssRelacionPeer::TCR_ID);
$value = $criteria->remove(TemplateCssRelacionPeer::TCR_ID);
if ($value) {
$selectCriteria->add(TemplateCssRelacionPeer::TCR_ID, $value, $comparison);
} else {
$selectCriteria->setPrimaryTableName(TemplateCssRelacionPeer::TABLE_NAME);
}
} else { // $values is TemplateCssRelacion object
$criteria = $values->buildCriteria(); // gets full criteria
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
}
// set the correct dbName
$criteria->setDbName(TemplateCssRelacionPeer::DATABASE_NAME);
return BasePeer::doUpdate($selectCriteria, $criteria, $con);
}
/**
* Deletes all rows from the template_css_relacion table.
*
* @param PropelPDO $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver).
* @throws PropelException
*/
public static function doDeleteAll(PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(TemplateCssRelacionPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
$affectedRows += BasePeer::doDeleteAll(TemplateCssRelacionPeer::TABLE_NAME, $con, TemplateCssRelacionPeer::DATABASE_NAME);
// Because this db requires some delete cascade/set null emulation, we have to
// clear the cached instance *after* the emulation has happened (since
// instances get re-added by the select statement contained therein).
TemplateCssRelacionPeer::clearInstancePool();
TemplateCssRelacionPeer::clearRelatedInstancePool();
$con->commit();
return $affectedRows;
} catch (Exception $e) {
$con->rollBack();
throw $e;
}
}
/**
* Performs a DELETE on the database, given a TemplateCssRelacion or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or TemplateCssRelacion object or primary key or array of primary keys
* which is used to create the DELETE statement
* @param PropelPDO $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doDelete($values, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(TemplateCssRelacionPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
// invalidate the cache for all objects of this type, since we have no
// way of knowing (without running a query) what objects should be invalidated
// from the cache based on this Criteria.
TemplateCssRelacionPeer::clearInstancePool();
// rename for clarity
$criteria = clone $values;
} elseif ($values instanceof TemplateCssRelacion) { // it's a model object
// invalidate the cache for this single object
TemplateCssRelacionPeer::removeInstanceFromPool($values);
// create criteria based on pk values
$criteria = $values->buildPkeyCriteria();
} else { // it's a primary key, or an array of pks
$criteria = new Criteria(TemplateCssRelacionPeer::DATABASE_NAME);
$criteria->add(TemplateCssRelacionPeer::TCR_ID, (array) $values, Criteria::IN);
// invalidate the cache for this object(s)
foreach ((array) $values as $singleval) {
TemplateCssRelacionPeer::removeInstanceFromPool($singleval);
}
}
// Set the correct dbName
$criteria->setDbName(TemplateCssRelacionPeer::DATABASE_NAME);
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
$affectedRows += BasePeer::doDelete($criteria, $con);
TemplateCssRelacionPeer::clearRelatedInstancePool();
$con->commit();
return $affectedRows;
} catch (Exception $e) {
$con->rollBack();
throw $e;
}
}
/**
* Validates all modified columns of given TemplateCssRelacion object.
* If parameter $columns is either a single column name or an array of column names
* than only those columns are validated.
*
* NOTICE: This does not apply to primary or foreign keys for now.
*
* @param TemplateCssRelacion $obj The object to validate.
* @param mixed $cols Column name or array of column names.
*
* @return mixed TRUE if all columns are valid or the error message of the first invalid column.
*/
public static function doValidate($obj, $cols = null)
{
$columns = array();
if ($cols) {
$dbMap = Propel::getDatabaseMap(TemplateCssRelacionPeer::DATABASE_NAME);
$tableMap = $dbMap->getTable(TemplateCssRelacionPeer::TABLE_NAME);
if (! is_array($cols)) {
$cols = array($cols);
}
foreach ($cols as $colName) {
if ($tableMap->hasColumn($colName)) {
$get = 'get' . $tableMap->getColumn($colName)->getPhpName();
$columns[$colName] = $obj->$get();
}
}
} else {
}
return BasePeer::doValidate(TemplateCssRelacionPeer::DATABASE_NAME, TemplateCssRelacionPeer::TABLE_NAME, $columns);
}
/**
* Retrieve a single object by pkey.
*
* @param int $pk the primary key.
* @param PropelPDO $con the connection to use
* @return TemplateCssRelacion
*/
public static function retrieveByPK($pk, PropelPDO $con = null)
{
if (null !== ($obj = TemplateCssRelacionPeer::getInstanceFromPool((string) $pk))) {
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(TemplateCssRelacionPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$criteria = new Criteria(TemplateCssRelacionPeer::DATABASE_NAME);
$criteria->add(TemplateCssRelacionPeer::TCR_ID, $pk);
$v = TemplateCssRelacionPeer::doSelect($criteria, $con);
return !empty($v) > 0 ? $v[0] : null;
}
/**
* Retrieve multiple objects by pkey.
*
* @param array $pks List of primary keys
* @param PropelPDO $con the connection to use
* @return TemplateCssRelacion[]
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function retrieveByPKs($pks, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(TemplateCssRelacionPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$objs = null;
if (empty($pks)) {
$objs = array();
} else {
$criteria = new Criteria(TemplateCssRelacionPeer::DATABASE_NAME);
$criteria->add(TemplateCssRelacionPeer::TCR_ID, $pks, Criteria::IN);
$objs = TemplateCssRelacionPeer::doSelect($criteria, $con);
}
return $objs;
}
} // BaseTemplateCssRelacionPeer
// This is the static code needed to register the TableMap for this table with the main Propel class.
//
BaseTemplateCssRelacionPeer::buildTableMap();
<?php
namespace AppBundle\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use AppBundle\Model\DisposicionColumnas;
use AppBundle\Model\Template;
use AppBundle\Model\TemplateCssRelacion;
use AppBundle\Model\TemplateCssRelacionPeer;
use AppBundle\Model\TemplateCssRelacionQuery;
/**
* @method TemplateCssRelacionQuery orderByTcrId($order = Criteria::ASC) Order by the tcr_id column
* @method TemplateCssRelacionQuery orderByTemId($order = Criteria::ASC) Order by the tem_id column
* @method TemplateCssRelacionQuery orderByDcoId($order = Criteria::ASC) Order by the dco_id column
* @method TemplateCssRelacionQuery orderByTcrTipo($order = Criteria::ASC) Order by the tcr_tipo column
* @method TemplateCssRelacionQuery orderByTcrEntorno($order = Criteria::ASC) Order by the tcr_entorno column
* @method TemplateCssRelacionQuery orderByTcrClaseCss($order = Criteria::ASC) Order by the tcr_clase_css column
*
* @method TemplateCssRelacionQuery groupByTcrId() Group by the tcr_id column
* @method TemplateCssRelacionQuery groupByTemId() Group by the tem_id column
* @method TemplateCssRelacionQuery groupByDcoId() Group by the dco_id column
* @method TemplateCssRelacionQuery groupByTcrTipo() Group by the tcr_tipo column
* @method TemplateCssRelacionQuery groupByTcrEntorno() Group by the tcr_entorno column
* @method TemplateCssRelacionQuery groupByTcrClaseCss() Group by the tcr_clase_css column
*
* @method TemplateCssRelacionQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method TemplateCssRelacionQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method TemplateCssRelacionQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method TemplateCssRelacionQuery leftJoinDisposicionColumnas($relationAlias = null) Adds a LEFT JOIN clause to the query using the DisposicionColumnas relation
* @method TemplateCssRelacionQuery rightJoinDisposicionColumnas($relationAlias = null) Adds a RIGHT JOIN clause to the query using the DisposicionColumnas relation
* @method TemplateCssRelacionQuery innerJoinDisposicionColumnas($relationAlias = null) Adds a INNER JOIN clause to the query using the DisposicionColumnas relation
*
* @method TemplateCssRelacionQuery leftJoinTemplate($relationAlias = null) Adds a LEFT JOIN clause to the query using the Template relation
* @method TemplateCssRelacionQuery rightJoinTemplate($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Template relation
* @method TemplateCssRelacionQuery innerJoinTemplate($relationAlias = null) Adds a INNER JOIN clause to the query using the Template relation
*
* @method TemplateCssRelacion findOne(PropelPDO $con = null) Return the first TemplateCssRelacion matching the query
* @method TemplateCssRelacion findOneOrCreate(PropelPDO $con = null) Return the first TemplateCssRelacion matching the query, or a new TemplateCssRelacion object populated from the query conditions when no match is found
*
* @method TemplateCssRelacion findOneByTemId(int $tem_id) Return the first TemplateCssRelacion filtered by the tem_id column
* @method TemplateCssRelacion findOneByDcoId(int $dco_id) Return the first TemplateCssRelacion filtered by the dco_id column
* @method TemplateCssRelacion findOneByTcrTipo(int $tcr_tipo) Return the first TemplateCssRelacion filtered by the tcr_tipo column
* @method TemplateCssRelacion findOneByTcrEntorno(int $tcr_entorno) Return the first TemplateCssRelacion filtered by the tcr_entorno column
* @method TemplateCssRelacion findOneByTcrClaseCss(string $tcr_clase_css) Return the first TemplateCssRelacion filtered by the tcr_clase_css column
*
* @method array findByTcrId(int $tcr_id) Return TemplateCssRelacion objects filtered by the tcr_id column
* @method array findByTemId(int $tem_id) Return TemplateCssRelacion objects filtered by the tem_id column
* @method array findByDcoId(int $dco_id) Return TemplateCssRelacion objects filtered by the dco_id column
* @method array findByTcrTipo(int $tcr_tipo) Return TemplateCssRelacion objects filtered by the tcr_tipo column
* @method array findByTcrEntorno(int $tcr_entorno) Return TemplateCssRelacion objects filtered by the tcr_entorno column
* @method array findByTcrClaseCss(string $tcr_clase_css) Return TemplateCssRelacion objects filtered by the tcr_clase_css column
*/
abstract class BaseTemplateCssRelacionQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseTemplateCssRelacionQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = null, $modelName = null, $modelAlias = null)
{
if (null === $dbName) {
$dbName = 'conn1';
}
if (null === $modelName) {
$modelName = 'AppBundle\\Model\\TemplateCssRelacion';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new TemplateCssRelacionQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param TemplateCssRelacionQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return TemplateCssRelacionQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof TemplateCssRelacionQuery) {
return $criteria;
}
$query = new TemplateCssRelacionQuery(null, null, $modelAlias);
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
return $query;
}
/**
* Find object by primary key.
* Propel uses the instance pool to skip the database if the object exists.
* Go fast if the query is untouched.
*
* <code>
* $obj = $c->findPk(12, $con);
* </code>
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return TemplateCssRelacion|TemplateCssRelacion[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = TemplateCssRelacionPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(TemplateCssRelacionPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|| $this->map || $this->having || $this->joins) {
return $this->findPkComplex($key, $con);
} else {
return $this->findPkSimple($key, $con);
}
}
/**
* Alias of findPk to use instance pooling
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return TemplateCssRelacion A model object, or null if the key is not found
* @throws PropelException
*/
public function findOneByTcrId($key, $con = null)
{
return $this->findPk($key, $con);
}
/**
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return TemplateCssRelacion A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `tcr_id`, `tem_id`, `dco_id`, `tcr_tipo`, `tcr_entorno`, `tcr_clase_css` FROM `template_css_relacion` WHERE `tcr_id` = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
$stmt->execute();
} catch (Exception $e) {
Propel::log($e->getMessage(), Propel::LOG_ERR);
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new TemplateCssRelacion();
$obj->hydrate($row);
TemplateCssRelacionPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return TemplateCssRelacion|TemplateCssRelacion[]|mixed the result, formatted by the current formatter
*/
protected function findPkComplex($key, $con)
{
// As the query uses a PK condition, no limit(1) is necessary.
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* Find objects by primary key
* <code>
* $objs = $c->findPks(array(12, 56, 832), $con);
* </code>
* @param array $keys Primary keys to use for the query
* @param PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|TemplateCssRelacion[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return TemplateCssRelacionQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(TemplateCssRelacionPeer::TCR_ID, $key, Criteria::EQUAL);
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return TemplateCssRelacionQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(TemplateCssRelacionPeer::TCR_ID, $keys, Criteria::IN);
}
/**
* Filter the query on the tcr_id column
*
* Example usage:
* <code>
* $query->filterByTcrId(1234); // WHERE tcr_id = 1234
* $query->filterByTcrId(array(12, 34)); // WHERE tcr_id IN (12, 34)
* $query->filterByTcrId(array('min' => 12)); // WHERE tcr_id >= 12
* $query->filterByTcrId(array('max' => 12)); // WHERE tcr_id <= 12
* </code>
*
* @param mixed $tcrId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return TemplateCssRelacionQuery The current query, for fluid interface
*/
public function filterByTcrId($tcrId = null, $comparison = null)
{
if (is_array($tcrId)) {
$useMinMax = false;
if (isset($tcrId['min'])) {
$this->addUsingAlias(TemplateCssRelacionPeer::TCR_ID, $tcrId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($tcrId['max'])) {
$this->addUsingAlias(TemplateCssRelacionPeer::TCR_ID, $tcrId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(TemplateCssRelacionPeer::TCR_ID, $tcrId, $comparison);
}
/**
* Filter the query on the tem_id column
*
* Example usage:
* <code>
* $query->filterByTemId(1234); // WHERE tem_id = 1234
* $query->filterByTemId(array(12, 34)); // WHERE tem_id IN (12, 34)
* $query->filterByTemId(array('min' => 12)); // WHERE tem_id >= 12
* $query->filterByTemId(array('max' => 12)); // WHERE tem_id <= 12
* </code>
*
* @see filterByTemplate()
*
* @param mixed $temId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return TemplateCssRelacionQuery The current query, for fluid interface
*/
public function filterByTemId($temId = null, $comparison = null)
{
if (is_array($temId)) {
$useMinMax = false;
if (isset($temId['min'])) {
$this->addUsingAlias(TemplateCssRelacionPeer::TEM_ID, $temId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($temId['max'])) {
$this->addUsingAlias(TemplateCssRelacionPeer::TEM_ID, $temId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(TemplateCssRelacionPeer::TEM_ID, $temId, $comparison);
}
/**
* Filter the query on the dco_id column
*
* Example usage:
* <code>
* $query->filterByDcoId(1234); // WHERE dco_id = 1234
* $query->filterByDcoId(array(12, 34)); // WHERE dco_id IN (12, 34)
* $query->filterByDcoId(array('min' => 12)); // WHERE dco_id >= 12
* $query->filterByDcoId(array('max' => 12)); // WHERE dco_id <= 12
* </code>
*
* @see filterByDisposicionColumnas()
*
* @param mixed $dcoId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return TemplateCssRelacionQuery The current query, for fluid interface
*/
public function filterByDcoId($dcoId = null, $comparison = null)
{
if (is_array($dcoId)) {
$useMinMax = false;
if (isset($dcoId['min'])) {
$this->addUsingAlias(TemplateCssRelacionPeer::DCO_ID, $dcoId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dcoId['max'])) {
$this->addUsingAlias(TemplateCssRelacionPeer::DCO_ID, $dcoId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(TemplateCssRelacionPeer::DCO_ID, $dcoId, $comparison);
}
/**
* Filter the query on the tcr_tipo column
*
* Example usage:
* <code>
* $query->filterByTcrTipo(1234); // WHERE tcr_tipo = 1234
* $query->filterByTcrTipo(array(12, 34)); // WHERE tcr_tipo IN (12, 34)
* $query->filterByTcrTipo(array('min' => 12)); // WHERE tcr_tipo >= 12
* $query->filterByTcrTipo(array('max' => 12)); // WHERE tcr_tipo <= 12
* </code>
*
* @param mixed $tcrTipo The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return TemplateCssRelacionQuery The current query, for fluid interface
*/
public function filterByTcrTipo($tcrTipo = null, $comparison = null)
{
if (is_array($tcrTipo)) {
$useMinMax = false;
if (isset($tcrTipo['min'])) {
$this->addUsingAlias(TemplateCssRelacionPeer::TCR_TIPO, $tcrTipo['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($tcrTipo['max'])) {
$this->addUsingAlias(TemplateCssRelacionPeer::TCR_TIPO, $tcrTipo['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(TemplateCssRelacionPeer::TCR_TIPO, $tcrTipo, $comparison);
}
/**
* Filter the query on the tcr_entorno column
*
* Example usage:
* <code>
* $query->filterByTcrEntorno(1234); // WHERE tcr_entorno = 1234
* $query->filterByTcrEntorno(array(12, 34)); // WHERE tcr_entorno IN (12, 34)
* $query->filterByTcrEntorno(array('min' => 12)); // WHERE tcr_entorno >= 12
* $query->filterByTcrEntorno(array('max' => 12)); // WHERE tcr_entorno <= 12
* </code>
*
* @param mixed $tcrEntorno The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return TemplateCssRelacionQuery The current query, for fluid interface
*/
public function filterByTcrEntorno($tcrEntorno = null, $comparison = null)
{
if (is_array($tcrEntorno)) {
$useMinMax = false;
if (isset($tcrEntorno['min'])) {
$this->addUsingAlias(TemplateCssRelacionPeer::TCR_ENTORNO, $tcrEntorno['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($tcrEntorno['max'])) {
$this->addUsingAlias(TemplateCssRelacionPeer::TCR_ENTORNO, $tcrEntorno['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(TemplateCssRelacionPeer::TCR_ENTORNO, $tcrEntorno, $comparison);
}
/**
* Filter the query on the tcr_clase_css column
*
* Example usage:
* <code>
* $query->filterByTcrClaseCss('fooValue'); // WHERE tcr_clase_css = 'fooValue'
* $query->filterByTcrClaseCss('%fooValue%'); // WHERE tcr_clase_css LIKE '%fooValue%'
* </code>
*
* @param string $tcrClaseCss The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return TemplateCssRelacionQuery The current query, for fluid interface
*/
public function filterByTcrClaseCss($tcrClaseCss = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($tcrClaseCss)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $tcrClaseCss)) {
$tcrClaseCss = str_replace('*', '%', $tcrClaseCss);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(TemplateCssRelacionPeer::TCR_CLASE_CSS, $tcrClaseCss, $comparison);
}
/**
* Filter the query by a related DisposicionColumnas object
*
* @param DisposicionColumnas|PropelObjectCollection $disposicionColumnas The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return TemplateCssRelacionQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByDisposicionColumnas($disposicionColumnas, $comparison = null)
{
if ($disposicionColumnas instanceof DisposicionColumnas) {
return $this
->addUsingAlias(TemplateCssRelacionPeer::DCO_ID, $disposicionColumnas->getDcoId(), $comparison);
} elseif ($disposicionColumnas instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(TemplateCssRelacionPeer::DCO_ID, $disposicionColumnas->toKeyValue('PrimaryKey', 'DcoId'), $comparison);
} else {
throw new PropelException('filterByDisposicionColumnas() only accepts arguments of type DisposicionColumnas or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the DisposicionColumnas relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return TemplateCssRelacionQuery The current query, for fluid interface
*/
public function joinDisposicionColumnas($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('DisposicionColumnas');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'DisposicionColumnas');
}
return $this;
}
/**
* Use the DisposicionColumnas relation DisposicionColumnas object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \AppBundle\Model\DisposicionColumnasQuery A secondary query class using the current class as primary query
*/
public function useDisposicionColumnasQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinDisposicionColumnas($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'DisposicionColumnas', '\AppBundle\Model\DisposicionColumnasQuery');
}
/**
* Filter the query by a related Template object
*
* @param Template|PropelObjectCollection $template The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return TemplateCssRelacionQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByTemplate($template, $comparison = null)
{
if ($template instanceof Template) {
return $this
->addUsingAlias(TemplateCssRelacionPeer::TEM_ID, $template->getTemId(), $comparison);
} elseif ($template instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(TemplateCssRelacionPeer::TEM_ID, $template->toKeyValue('PrimaryKey', 'TemId'), $comparison);
} else {
throw new PropelException('filterByTemplate() only accepts arguments of type Template or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the Template relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return TemplateCssRelacionQuery The current query, for fluid interface
*/
public function joinTemplate($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Template');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'Template');
}
return $this;
}
/**
* Use the Template relation Template object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \AppBundle\Model\TemplateQuery A secondary query class using the current class as primary query
*/
public function useTemplateQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinTemplate($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Template', '\AppBundle\Model\TemplateQuery');
}
/**
* Exclude object from result
*
* @param TemplateCssRelacion $templateCssRelacion Object to remove from the list of results
*
* @return TemplateCssRelacionQuery The current query, for fluid interface
*/
public function prune($templateCssRelacion = null)
{
if ($templateCssRelacion) {
$this->addUsingAlias(TemplateCssRelacionPeer::TCR_ID, $templateCssRelacion->getTcrId(), Criteria::NOT_EQUAL);
}
return $this;
}
}
......@@ -14,6 +14,7 @@ use \PropelObjectCollection;
use \PropelPDO;
use AppBundle\Model\Campania;
use AppBundle\Model\Template;
use AppBundle\Model\TemplateCssRelacion;
use AppBundle\Model\TemplatePeer;
use AppBundle\Model\TemplateQuery;
......@@ -46,6 +47,10 @@ use AppBundle\Model\TemplateQuery;
* @method TemplateQuery rightJoinCampania($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Campania relation
* @method TemplateQuery innerJoinCampania($relationAlias = null) Adds a INNER JOIN clause to the query using the Campania relation
*
* @method TemplateQuery leftJoinTemplateCssRelacion($relationAlias = null) Adds a LEFT JOIN clause to the query using the TemplateCssRelacion relation
* @method TemplateQuery rightJoinTemplateCssRelacion($relationAlias = null) Adds a RIGHT JOIN clause to the query using the TemplateCssRelacion relation
* @method TemplateQuery innerJoinTemplateCssRelacion($relationAlias = null) Adds a INNER JOIN clause to the query using the TemplateCssRelacion relation
*
* @method Template findOne(PropelPDO $con = null) Return the first Template matching the query
* @method Template findOneOrCreate(PropelPDO $con = null) Return the first Template matching the query, or a new Template object populated from the query conditions when no match is found
*
......@@ -663,6 +668,80 @@ abstract class BaseTemplateQuery extends ModelCriteria
->useQuery($relationAlias ? $relationAlias : 'Campania', '\AppBundle\Model\CampaniaQuery');
}
/**
* Filter the query by a related TemplateCssRelacion object
*
* @param TemplateCssRelacion|PropelObjectCollection $templateCssRelacion the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return TemplateQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByTemplateCssRelacion($templateCssRelacion, $comparison = null)
{
if ($templateCssRelacion instanceof TemplateCssRelacion) {
return $this
->addUsingAlias(TemplatePeer::TEM_ID, $templateCssRelacion->getTemId(), $comparison);
} elseif ($templateCssRelacion instanceof PropelObjectCollection) {
return $this
->useTemplateCssRelacionQuery()
->filterByPrimaryKeys($templateCssRelacion->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterByTemplateCssRelacion() only accepts arguments of type TemplateCssRelacion or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the TemplateCssRelacion relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return TemplateQuery The current query, for fluid interface
*/
public function joinTemplateCssRelacion($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('TemplateCssRelacion');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'TemplateCssRelacion');
}
return $this;
}
/**
* Use the TemplateCssRelacion relation TemplateCssRelacion object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \AppBundle\Model\TemplateCssRelacionQuery A secondary query class using the current class as primary query
*/
public function useTemplateCssRelacionQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinTemplateCssRelacion($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'TemplateCssRelacion', '\AppBundle\Model\TemplateCssRelacionQuery');
}
/**
* Exclude object from result
*
......
......@@ -82,6 +82,7 @@
<column name="fil_id" phpName="FilId" type="INTEGER" required="false"/>
<column name="cco_entorno" phpName="CcoEntorno" type="INTEGER" required="false"/>
<column name="cco_contenido" phpName="CcoContenido" type="LONGVARCHAR" required="false"/>
<column name="cco_fila" phpName="CcoFila" type="INTEGER" required="false"/>
<column name="cco_columna" phpName="CcoColumna" type="INTEGER" required="false"/>
<column name="cco_orden" phpName="CcoOrden" type="INTEGER" required="false"/>
<column name="cco_tipo" phpName="CcoTipo" type="INTEGER" required="false"/>
......@@ -216,6 +217,29 @@
<parameter name="Engine" value="InnoDB"/>
</vendor>
</table>
<table name="template_css_relacion" phpName="TemplateCssRelacion" idMethod="native">
<column name="tcr_id" phpName="TcrId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="tem_id" phpName="TemId" type="INTEGER" required="false"/>
<column name="dco_id" phpName="DcoId" type="INTEGER" required="false"/>
<column name="tcr_tipo" phpName="TcrTipo" type="INTEGER" required="false"/>
<column name="tcr_entorno" phpName="TcrEntorno" type="INTEGER" required="false"/>
<column name="tcr_clase_css" phpName="TcrClaseCss" type="VARCHAR" size="1000" required="false"/>
<foreign-key foreignTable="disposicion_columnas" name="fk_dco_id_relacion" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference local="dco_id" foreign="dco_id"/>
</foreign-key>
<foreign-key foreignTable="template" name="fk_tem_id_relacion" onDelete="RESTRICT" onUpdate="RESTRICT">
<reference local="tem_id" foreign="tem_id"/>
</foreign-key>
<index name="fk_tem_id_relacion_idx">
<index-column name="tem_id"/>
</index>
<index name="fk_dco_id_relacion_idx">
<index-column name="dco_id"/>
</index>
<vendor type="mysql">
<parameter name="Engine" value="InnoDB"/>
</vendor>
</table>
<table name="tipo" phpName="Tipo" idMethod="native">
<column name="tip_id" phpName="TipId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="tip_nombre" phpName="TipNombre" type="VARCHAR" size="255" required="false"/>
......
......@@ -117,6 +117,46 @@ class CampaniaController extends Controller {
);
}
public function generarNuevaFilaAction(Request $request) {
$log = Utiles::setLog('CampaniaBundle\Controller\CampaniaController:nuevaCampaniaAction', 'mcafee/campania/index');
$secId = $request->get("secId", null);
$campaniaId = $request->get("camId", null);
$jResponse = new JsonResponse();
//Obtener la cantidad de filas actuales para la seccion donde se va a agregar.
$contadorFilasActuales = FilaQuery::create()->filterBySecId($secId)->filterByCamId($campaniaId)->filterByFilEliminado(Fila::ELIMINADO_FALSE)->filterByFilEstado(Fila::ACTIVO_TRUE)->count();
$seccion = SeccionQuery::create()->findPk($secId);
if (($secId == Seccion::SECCION_HEAD && $contadorFilasActuales >= self::MAX_HEAD_ROWS) || ($secId == Seccion::SECCION_FOOTER && $contadorFilasActuales >= self::MAX_FOOTER_ROWS )) {
$log->debug("se alcanzo el numero máximo de filas para la seccion $secId...");
$jResponse->setStatusCode(JsonResponse::HTTP_BAD_REQUEST, '- MAX ROWS REACHED');
$jResponse->setData(array("msg" => "No se pueden crear mas filas para la seccion actual"));
return $jResponse;
}
$log->debug("creando fila para seccion $secId...");
$lastColumnValue = FilaQuery::getNewColumnValue($secId, $campaniaId);
$log->debug("ultimo valor columna $lastColumnValue...");
$newColumnValue = $lastColumnValue + 1;
$log->debug("valor nueva columna $newColumnValue...");
$row = new Fila();
$row->setCamId($campaniaId);
$row->setSecId($secId);
$row->setFilValor($newColumnValue);
$row->setFilNumCol(self::DEFAULT_COLUMN_NUMBER);
$row->setDcoId(DisposicionColumnas::DISPOSICION_1);
$row->setFilEstado(Fila::ACTIVO_TRUE);
$row->setFilEliminado(Fila::ELIMINADO_FALSE);
$row->save();
$log->debug("fila numero $newColumnValue creada correctamente para la seccion $secId de la campania $campaniaId");
$jResponse->setStatusCode(JsonResponse::HTTP_OK, '- NEW ROW');
$jResponse->setData(array("msg" => "Se ha creado una nueva fila para la seccion '" . $seccion->getSecNombre() . "'", "filId" => $row->getFilId()));
return $jResponse;
}
/**
*
* @param Request $request
......@@ -244,6 +284,7 @@ class CampaniaController extends Controller {
$contenidoCampania->setDcoId($disposicionId);
$contenidoCampania->setSecId($seccionId);
$contenidoCampania->setFilId($filaId);
$contenidoCampania->setCcoFila($fila->getFilValor());
$contenidoCampania->setCcoContenido($contenido);
$contenidoCampania->setCcoColumna($columna);
$contenidoCampania->setCcoOrden(1);
......@@ -333,6 +374,7 @@ class CampaniaController extends Controller {
$contenidoCampania->setDcoId($disposicionId);
$contenidoCampania->setSecId($seccionId);
$contenidoCampania->setFilId($filaId);
$contenidoCampania->setCcoFila($fila->getFilValor());
$contenidoCampania->setCcoContenido($contenido);
$contenidoCampania->setCcoColumna($columna);
$contenidoCampania->setCcoOrden(1);
......@@ -441,6 +483,30 @@ class CampaniaController extends Controller {
return $this->render("backend_content/pages/campanias/listadoCampanias.html.twig", array("campanias" => $campanias));
}
public function cargarHtmlFrontAction(){
$data = array('id'=>24);
$data_json = json_encode($data);
$htmlContent = array();
$username = "userApi";
$password = "34lq4od8usda";
try {
$url = "127.0.0.1:8000/api/mcafee/campania/obtener/contenido.json";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_json);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_USERPWD, $username . ":" . $password);
$output = curl_exec($ch);
curl_close($ch);
$htmlContent = json_decode($output, true);
} catch (\Exception $e) {
}
return $this->render('front/campania/prueba.html.twig', array("htmlContent" => $htmlContent));
}
public function loadDataContenidoAction(Request $request){
$log = Utiles::setLog('CampaniaBundle\Controller\CampaniaController:loadDataContenidoAction', 'mcafee/campania/index');
$user = $this->get('security.token_storage')->getToken()->getUser();
......
<?php
namespace WsBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use JMS\Serializer\Exception\RuntimeException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpFoundation\Request;
class ApiController extends Controller
{
protected function deserialize($class, Request $request, $format = 'json')
{
$serializer = $this->get('serializer');
$validator = $this->get('validator');
try {
$entity = $serializer->deserialize($request->getContent(), $class, $format);
} catch (RuntimeException $e) {
throw new HttpException(400, $e->getMessage());
}
if (count($errors = $validator->validate($entity))) {
return $errors;
}
return $entity;
}
}
<?php
namespace WsBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class DefaultController extends Controller
{
public function indexAction()
{
return $this->render('WsBundle:Default:index.html.twig');
}
}
<?php
namespace WsBundle\Controller\v1;
use WsBundle\Controller\ApiController;
use JMS\Serializer\Exception\RuntimeException;
use Nelmio\ApiDocBundle\Annotation\ApiDoc;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\HttpException;
use FOS\RestBundle\Controller\Annotations\View as RestView;
use FOS\RestBundle\View\View;
use WsBundle\Controller\v1\serializer\szerCampania;
use WsBundle\Controller\v1\serializer\szerHeadContenido;
use WsBundle\Controller\v1\serializer\szerBodyContenido;
use WsBundle\Controller\v1\serializer\szerFooterContenido;
use WsBundle\Controller\v1\serializer\szerHtmlContenido;
use AppBundle\Lib\Utiles;
use AppBundle\Model\Disposicion;
use AppBundle\Model\DisposicionQuery;
use AppBundle\Model\Campania;
use AppBundle\Model\CampaniaQuery;
use AppBundle\Model\CampaniaContenido;
use AppBundle\Model\CampaniaContenidoQuery;
use AppBundle\Model\TemplateCssRelacion;
use AppBundle\Model\TemplateCssRelacionQuery;
class CampaniaApiController extends ApiController {
const FIRST_COLUMN = 1;
const FIRST_ROW = 1;
public function obtenerContenidoAction(Request $request) {
$log = Utiles::setLog('CampaniaBundle\Controller\CampaniaController:obtenerContenidoAction', 'mcafee/ws/index');
$tiempo_inicio = microtime(true);
$arrayHeadContenido = array();
$arrayBodyContenido = array();
$arrayFooterContenido = array();
$esMovil = false;
$html = "";
$indice = 0;
$log->debug("analizando serializer de entrada szerCampania...");
$szerValidatorCampania = $this->deserialize('WsBundle\Controller\v1\serializer\szerCampania', $request);
if ($szerValidatorCampania instanceof szerCampania === false) {
$log->err('problemas en deserialize... ' . print_r($szerValidatorCampania, true) . print_r($request->getContent(), true));
$log->debug('Peticion Finalizada. tiempo:' . round(microtime(true) - $tiempo_inicio, 4));
return View::create(array('msg' =>"Ha ocurrido un error con los datos de entrada szerCampania .",'errors' => $szerValidatorCampania), Response::HTTP_BAD_REQUEST);
}
$log->debug("analizando si es dispositivo movil...ua : ".$request->headers->get('User-Agent'));
$isMobile = Utiles::isMobile($request->headers->get('User-Agent'));
if ($isMobile == -1) {
$log->err('no se pudo determinar el entorno... ');
$log->debug('Peticion Finalizada. tiempo:' . round(microtime(true) - $tiempo_inicio, 4));
return View::create(array('errors' => "no se pudo determinar el entorno."), Response::HTTP_BAD_REQUEST);
} else if ($isMobile) {
$log->debug("petición realizada desde un dispositivo movil...");
$esMovil = true;
} else if (!$isMobile) {
$log->debug("petición realizada desde un dispositivo no movil...");
$esMovil = false;
}
$log->debug("buscando campaña con id ".$szerValidatorCampania->getId()."...");
$campania = CampaniaQuery::create()->findPk($szerValidatorCampania->getId());
$log->debug("obteniendo template asociado a la campaña...");
$template = $campania->getTemplate();
$szerHtmlContenido = new szerHtmlContenido();
$log->debug("guardando salida Head en szerHtmlContenido ...");
$szerHtmlContenido->setContenidoHead($this->generateHeadHtmlStructure($log, $esMovil, $szerValidatorCampania, $template));
$log->debug("guardando salida Body en szerHtmlContenido ...");
$szerHtmlContenido->setContenidoBody($this->generateBodyHtmlStructure($log, $esMovil, $szerValidatorCampania, $template));
$log->debug("guardando salida Footer en szerHtmlContenido ...");
$szerHtmlContenido->setContenidoFooter($this->generateFooterHtmlStructure($log, $esMovil, $szerValidatorCampania, $template));
$view = View::create();
$view->setData($szerHtmlContenido);
$view->setStatusCode(200);
$log->debug('Peticion Finalizada. tiempo:' . round(microtime(true) - $tiempo_inicio, 4));
return $view;
}
private function htmlTypeAnalizer($contenido, $template) {
$html = "";
$claseRelacion = TemplateCssRelacionQuery::create()
->filterByTemId($template->getTemId())
->filterByDcoId($contenido->getDcoId())
->filterByTcrTipo($contenido->getCcoTipo())
->filterByTcrEntorno($contenido->getDisId())
->findOne();
switch ($contenido->getCcoTipo()) {
case CampaniaContenido::TIPO_TEXTO :
$html = $this->generateTextHtml($contenido->getFilId(), $contenido->getCcoId(), $contenido->getCcoContenido(), $contenido->getDisposicionColumnas(), $contenido->getCcoColumna(), $claseRelacion->getTcrClaseCss());
break;
case CampaniaContenido::TIPO_IMAGEN :
$html = $this->generateImageHtml($contenido->getFilId(), $contenido->getCcoId(), $contenido->getCcoContenido(), $contenido->getDisposicionColumnas(), $contenido->getCcoColumna(), $claseRelacion->getTcrClaseCss());
break;
case CampaniaContenido::TIPO_VIDEO:
$html = $this->generateVideoHtml($contenido->getFilId(), $contenido->getCcoId(), $contenido->getCcoContenido(), $contenido->getDisposicionColumnas(), $contenido->getCcoColumna(),$claseRelacion->getTcrClaseCss());
break;
default:
$html = $this->generateTextHtml($contenido->getFilId(), $contenido->getCcoId(), $contenido->getCcoContenido(), $contenido->getDisposicionColumnas(), $contenido->getCcoColumna(), $claseRelacion->getTcrClaseCss());
break;
}
return $html;
}
private function generateTextHtml($filaId, $id, $contenido, $disposicion, $columna ,$claseCss) {
$html = "";
$html = $this->getColumnaByDisposicion($disposicion, $columna);
$html = $html.'<div id="texto_fil_' . $filaId . '_con_' . $id . '" class="' . $claseCss . '" >' . $contenido . '</div>';
$html = $html.'</div>';
return $html;
}
private function generateImageHtml($filaId, $id, $contenido, $disposicion, $columna, $claseCss) {
$html = "";
$html = $this->getColumnaByDisposicion($disposicion, $columna);
$html = $html.'<img id="imagen_fil_' . $filaId . '_con_' . $id . '" class="' . $claseCss . '" src="' . $contenido . '" />';
$html = $html.'</div>';
return $html;
}
private function generateVideoHtml($filaId, $id, $contenido, $disposicion, $columna,$claseCss) {
$html = "";
$html = $this->getColumnaByDisposicion($disposicion, $columna);
$html = $html.'<video id="video_fil_' . $filaId . '_con_' . $id . '" class="' . $claseCss . '" width="320" height="240" controls><source src="' . $contenido . '" type="video/*">Tu navegador no soporta videos.Actualiza tu sistema.</video>';
$html = $html.'</div>';
return $html;
}
private function getColumnaByDisposicion($disposicion, $columna){
$html = "";
switch($disposicion->getDcoNombre()):
case "(1)":
$html = '<div class = "col-12">';
break;
case "(1/2;1/2)":
$html = '<div class = "col-6">';
break;
case "(1/3;1/3;1/3)":
$html = '<div class = "col-4">';
break;
case "(2/3;1/3)":
if($columna == self::FIRST_ROW){
$html = '<div class = "col-8">';
}else{
$html = '<div class = "col-4">';
}
break;
case "(1/3;2/3)":
if($columna == self::FIRST_ROW){
$html = '<div class = "col-4">';
}else{
$html = '<div class = "col-8">';
}
break;
case "(1/4;3/4)":
if($columna == self::FIRST_ROW){
$html = '<div class = "col-3">';
}else{
$html = '<div class = "col-9">';
}
break;
case "(3/4;1/4)":
if($columna == self::FIRST_ROW){
$html = '<div class = "col-9">';
}else{
$html = '<div class = "col-3">';
}
break;
case "(1/4;1/4;1/4;1/4)":
$html = '<div class = "col-3">';
break;
endswitch;
return $html;
}
private function generateHeadHtmlStructure($log, $esMovil, $szerValidatorCampania, $template){
//Obteniendo Contenido del head de la campaña
$log->debug("obteniendo contenido del head para campaña " . $szerValidatorCampania->getId());
$indice = 0;
$arrayHeadContenido = array();
$query = CampaniaContenidoQuery::create()
->filterByCcoEliminado(CampaniaContenido::ELIMINADO_FALSE)
->filterByCcoEstado(CampaniaContenido::ESTADO_ACTIVO)
->useSeccionQuery()
->filterBySecId(CampaniaContenido::SECCION_HEAD)
->endUse();
if ($esMovil) {
$query->useDisposicionQuery()
->filterByDisId(array(Disposicion::DISPOSICION_MOVIL, Disposicion::DISPOSICION_AMBOS), \Criteria::IN)
->endUse();
} else {
$query->useDisposicionQuery()
->filterByDisId(array(Disposicion::DISPOSICION_DESKTOP, Disposicion::DISPOSICION_AMBOS), \Criteria::IN)
->endUse();
}
$contenidosHead = $query->orderByCcoFila('asc')->orderByCcoColumna('asc')->find();
$log->debug("generando html relacionado al head de la campaña...");
foreach ($contenidosHead as $contenidoHead):
$szerContenidoHead = new szerHeadContenido();
$szerContenidoHead->setId($contenidoHead->getCcoId());
$szerContenidoHead->setFila($contenidoHead->getCcoFila());
$szerContenidoHead->setColumna($contenidoHead->getCcoColumna());
$szerContenidoHead->setTipo($contenidoHead->getCcoTipo());
$html = $this->htmlTypeAnalizer($contenidoHead, $template);
$szerContenidoHead->setContenido($html);
$arrayHeadContenido[$indice] = $szerContenidoHead;
$indice++;
endforeach;
return $arrayHeadContenido;
}
private function generateBodyHtmlStructure($log, $esMovil, $szerValidatorCampania, $template){
//Obteniendo Contenido del head de la campaña
$log->debug("obteniendo contenido del body para campaña " . $szerValidatorCampania->getId());
$indice = 0;
$arrayBodyContenido = array();
$query = CampaniaContenidoQuery::create()
->filterByCcoEliminado(CampaniaContenido::ELIMINADO_FALSE)
->filterByCcoEstado(CampaniaContenido::ESTADO_ACTIVO)
->useSeccionQuery()
->filterBySecId(CampaniaContenido::SECCION_BODY)
->endUse();
if ($esMovil) {
$query->useDisposicionQuery()
->filterByDisId(array(Disposicion::DISPOSICION_MOVIL, Disposicion::DISPOSICION_AMBOS), \Criteria::IN)
->endUse();
} else {
$query->useDisposicionQuery()
->filterByDisId(array(Disposicion::DISPOSICION_DESKTOP, Disposicion::DISPOSICION_AMBOS), \Criteria::IN)
->endUse();
}
$contenidosBody = $query->orderByCcoFila('asc')->orderByCcoColumna('asc')->find();
$log->debug("generando html relacionado al body de la campaña...");
foreach ($contenidosBody as $contenidoBody):
$szerContenidoBody = new szerBodyContenido();
$szerContenidoBody->setId($contenidoBody->getCcoId());
$szerContenidoBody->setFila($contenidoBody->getCcoFila());
$szerContenidoBody->setColumna($contenidoBody->getCcoColumna());
$szerContenidoBody->setTipo($contenidoBody->getCcoTipo());
$html = $this->htmlTypeAnalizer($contenidoBody, $template);
$szerContenidoBody->setContenido($html);
$arrayBodyContenido[$indice] = $szerContenidoBody;
$indice++;
endforeach;
return $arrayBodyContenido;
}
private function generateFooterHtmlStructure($log, $esMovil, $szerValidatorCampania, $template){
//Obteniendo Contenido del head de la campaña
$log->debug("obteniendo contenido del footer para campaña " . $szerValidatorCampania->getId());
$indice = 0;
$arrayFooterContenido = array();
$query = CampaniaContenidoQuery::create()
->filterByCcoEliminado(CampaniaContenido::ELIMINADO_FALSE)
->filterByCcoEstado(CampaniaContenido::ESTADO_ACTIVO)
->useSeccionQuery()
->filterBySecId(CampaniaContenido::SECCION_FOOTER)
->endUse();
if ($esMovil) {
$query->useDisposicionQuery()
->filterByDisId(array(Disposicion::DISPOSICION_MOVIL, Disposicion::DISPOSICION_AMBOS), \Criteria::IN)
->endUse();
} else {
$query->useDisposicionQuery()
->filterByDisId(array(Disposicion::DISPOSICION_DESKTOP, Disposicion::DISPOSICION_AMBOS), \Criteria::IN)
->endUse();
}
$contenidosFooter = $query->orderByCcoFila('asc')->orderByCcoColumna('asc')->find();
$log->debug("generando html relacionado al footer de la campaña...");
foreach ($contenidosFooter as $contenidoFooter):
$szerContenidoFooter = new szerFooterContenido();
$szerContenidoFooter->setId($contenidoFooter->getCcoId());
$szerContenidoFooter->setFila($contenidoFooter->getCcoFila());
$szerContenidoFooter->setColumna($contenidoFooter->getCcoColumna());
$szerContenidoFooter->setTipo($contenidoFooter->getCcoTipo());
$html = $this->htmlTypeAnalizer($contenidoFooter, $template);
$szerContenidoFooter->setContenido($html);
$arrayFooterContenido[$indice] = $szerContenidoFooter;
$indice++;
endforeach;
return $arrayFooterContenido;
}
}
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace WsBundle\Controller\v1\serializer;
use JMS\Serializer\Annotation\Type;
use Symfony\Component\Validator\Constraints as Assert;
/**
*
* @version 1.0
* @author cdiaz
*/
class szerBodyContenido {
/**
* Id del contenido
* @Type("integer")
* @var integer
*/
private $id;
/**
* id de la fila
* @Type("integer")
* @var integer
*/
private $fila;
/**
* numero de la columna fila
* @Type("integer")
* @var integer
*/
private $columna;
/**
* nombre tipo del contenido
* @Type("string")
* @var integer
*/
private $tipo;
/**
* Contenido a retornar en html
* @Assert\NotNull
* @Type("string")
* @var string
*/
private $contenido;
public function getId() {
return $this->id;
}
public function getFila() {
return $this->fila;
}
public function getColumna() {
return $this->columna;
}
public function getTipo() {
return $this->tipo;
}
public function getContenido() {
return $this->contenido;
}
public function setId($id) {
$this->id = $id;
}
public function setFila($fila) {
$this->fila = $fila;
}
public function setColumna($columna) {
$this->columna = $columna;
}
public function setTipo($tipo) {
$this->tipo = $tipo;
}
public function setContenido($contenido) {
$this->contenido = $contenido;
}
}
<?php
namespace WsBundle\Controller\v1\serializer;
use JMS\Serializer\Annotation\Type;
use Symfony\Component\Validator\Constraints as Assert;
/**
*
* @version 1.0
* @author Cristian Diaz
*/
class szerCampania {
/**
* Id de la campaña
* @Assert\NotBlank
* @Type("integer")
* @var integer
*/
private $id;
public function getId() {
return $this->id;
}
public function setId($id) {
$this->id = $id;
}
}
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace WsBundle\Controller\v1\serializer;
use JMS\Serializer\Annotation\Type;
use Symfony\Component\Validator\Constraints as Assert;
/**
*
* @version 1.0
* @author cdiaz
*/
class szerFooterContenido {
/**
* Id del contenido
* @Type("integer")
* @var integer
*/
private $id;
/**
* id de la fila
* @Type("integer")
* @var integer
*/
private $fila;
/**
* numero de la columna fila
* @Type("integer")
* @var integer
*/
private $columna;
/**
* nombre tipo del contenido
* @Type("string")
* @var integer
*/
private $tipo;
/**
* Contenido a retornar en html
* @Assert\NotNull
* @Type("string")
* @var string
*/
private $contenido;
public function getId() {
return $this->id;
}
public function getFila() {
return $this->fila;
}
public function getColumna() {
return $this->columna;
}
public function getTipo() {
return $this->tipo;
}
public function getContenido() {
return $this->contenido;
}
public function setId($id) {
$this->id = $id;
}
public function setFila($fila) {
$this->fila = $fila;
}
public function setColumna($columna) {
$this->columna = $columna;
}
public function setTipo($tipo) {
$this->tipo = $tipo;
}
public function setContenido($contenido) {
$this->contenido = $contenido;
}
}
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace WsBundle\Controller\v1\serializer;
use JMS\Serializer\Annotation\Type;
use Symfony\Component\Validator\Constraints as Assert;
/**
*
* @version 1.0
* @author cdiaz
*/
class szerHeadContenido {
/**
* Id del contenido
* @Type("integer")
* @var integer
*/
private $id;
/**
* id de la fila
* @Type("integer")
* @var integer
*/
private $fila;
/**
* numero de la columna fila
* @Type("integer")
* @var integer
*/
private $columna;
/**
* tipo del contenido
* @Type("integer")
* @var integer
*/
private $tipo;
/**
* Contenido a retornar en html
* @Assert\NotNull
* @Type("string")
* @var string
*/
private $contenido;
public function getId() {
return $this->id;
}
public function getFila() {
return $this->fila;
}
public function getColumna() {
return $this->columna;
}
public function getTipo() {
return $this->tipo;
}
public function getContenido() {
return $this->contenido;
}
public function setId($id) {
$this->id = $id;
}
public function setFila($fila) {
$this->fila = $fila;
}
public function setColumna($columna) {
$this->columna = $columna;
}
public function setTipo($tipo) {
$this->tipo = $tipo;
}
public function setContenido($contenido) {
$this->contenido = $contenido;
}
}
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace WsBundle\Controller\v1\serializer;
use JMS\Serializer\Annotation\Type;
use Symfony\Component\Validator\Constraints as Assert;
/**
*
* @version 1.0
* @author cdiaz
*/
class szerHtmlContenido {
/**
* Array Contenido del HEAD.
* @Assert\NotNull
* @Type("array<WsBundle\Controller\v1\serializer\szerHeadContenido>")
* @var array<WsBundle\Controller\v1\serializer\szerHeadContenido>
*/
private $contenidoHead;
/**
* Array Contenido del BODY.
* @Assert\NotNull
* @Type("array<WsBundle\Controller\v1\serializer\szerBodyContenido>")
* @var array<WsBundle\Controller\v1\serializer\szerBodyContenido>
*/
private $contenidoBody;
/**
* Array Contenido del Footer.
* @Assert\NotNull
* @Type("array<WsBundle\Controller\v1\serializer\szerFooterContenido>")
* @var array<WsBundle\Controller\v1\serializer\szerFooterContenido>
*/
private $contenidoFooter;
public function getContenidoHead() {
return $this->contenidoHead;
}
public function getContenidoBody() {
return $this->contenidoBody;
}
public function getContenidoFooter() {
return $this->contenidoFooter;
}
public function setContenidoHead($contenidoHead) {
$this->contenidoHead = $contenidoHead;
}
public function setContenidoBody($contenidoBody) {
$this->contenidoBody = $contenidoBody;
}
public function setContenidoFooter($contenidoFooter) {
$this->contenidoFooter = $contenidoFooter;
}
}
ws_chat_configuracion:
path: mcafee/campania/obtener/contenido.{_format}
defaults: { _controller: WsBundle:v1\CampaniaApi:obtenerContenido , _format: json}
methods: POST
services:
# ws.example:
# class: WsBundle\Example
# arguments: ["@service_id", "plain_value", "%parameter%"]
<?php
namespace WsBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class WsBundle extends Bundle
{
}
<?php
namespace WsBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class DefaultControllerTest extends WebTestCase
{
public function testIndex()
{
$client = static::createClient();
$crawler = $client->request('GET', '/');
$this->assertContains('Hello World', $client->getResponse()->getContent());
}
}
<?php
/*
* ************** CAUTION **************
*
* DO NOT EDIT THIS FILE as it will be overridden by Composer as part of
* the installation/update process. The original file resides in the
* SensioDistributionBundle.
*
* ************** CAUTION **************
*/
if (!isset($_SERVER['HTTP_HOST'])) {
exit("This script cannot be run from the CLI. Run it from a browser.\n");
}
......@@ -27,7 +37,7 @@ $hasMinorProblems = (bool) count($minorProblems);
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="robots" content="noindex,nofollow" />
<title>Symfony Configuration</title>
<title>Symfony Configuration Checker</title>
<style>
/* styles copied from symfony framework bundle */
html {
......@@ -237,8 +247,87 @@ $hasMinorProblems = (bool) count($minorProblems);
text-shadow:0 1px 1px #6b9311;
background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAcCAIAAAAvP0KbAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEFJREFUeNpiPnv2LNMdvlymf///M/37B8R/QfQ/MP33L4j+B6Qh7L9//sHpf2h8MA1V+w/KRjYLaDaLCU8vQIABAFO3TxZriO4yAAAAAElFTkSuQmCC) repeat-x top left;
}
/* styles copied from bundles/sensiodistribution/webconfigurator/css/install.css */
body {
font-size: 14px;
font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
}
.sf-reset h1.title {
font-size: 45px;
padding-bottom: 30px;
}
.sf-reset h2 {
font-weight: bold;
color: #FFFFFF;
/* Font is reset to sans-serif (like body) */
font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
margin-bottom: 10px;
background-color: #aacd4e;
padding: 2px 4px;
display: inline-block;
text-transform: uppercase;
}
.sf-reset ul a,
.sf-reset ul a:hover {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAICAYAAAAx8TU7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFdJREFUeNpiYACBjjOhDEiACSggCKTLgXQ5TJARqhIkcReIKxgqTGYxwvV0nDEGkmeAOIwJySiQ4HsgvseIpGo3ELsCtZ9lRDIvDCiwhwHJPEFkJwEEGACq6hdnax8y1AAAAABJRU5ErkJggg==) no-repeat right 7px;
padding-right: 10px;
}
.sf-reset ul, ol {
padding-left: 20px;
}
.sf-reset li {
padding-bottom: 18px;
}
.sf-reset ol li {
list-style-type: decimal;
}
.sf-reset ul li {
list-style-type: none;
}
.sf-reset .symfony-blocks-install {
overflow: hidden;
}
.sf-reset .symfony-install-continue {
font-size: 0.95em;
padding-left: 0;
}
.sf-reset .symfony-install-continue li {
padding-bottom: 10px;
}
.sf-reset .ok {
color: #fff;
font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
background-color: #6d6;
padding: 10px;
margin-bottom: 20px;
}
.sf-reset .ko {
background-color: #d66;
}
.sf-reset p.help {
padding: 12px 16px;
word-break: break-word;
}
.version {
text-align: right;
font-size: 10px;
margin-right: 20px;
}
.sf-reset a,
.sf-reset li a {
color: #08C;
text-decoration: none;
}
.sf-reset a:hover,
.sf-reset li a:hover {
color: #08C;
text-decoration: underline;
}
.sf-reset textarea {
padding: 7px;
}
</style>
<link rel="stylesheet" href="bundles/sensiodistribution/webconfigurator/css/install.css" media="all" />
</head>
<body>
<div id="content">
......@@ -272,11 +361,10 @@ $hasMinorProblems = (bool) count($minorProblems);
<div class="sf-reset">
<div class="block">
<div class="symfony-block-content">
<h1 class="title">Welcome!</h1>
<p>Welcome to your new Symfony project.</p>
<h1 class="title">Configuration Checker</h1>
<p>
This script will guide you through the basic configuration of your project.
You can also do the same by editing the ‘<strong>app/config/parameters.yml</strong>’ file directly.
This script analyzes your system to check whether is
ready to run Symfony applications.
</p>
<?php if ($hasMajorProblems): ?>
......@@ -317,14 +405,10 @@ $hasMinorProblems = (bool) count($minorProblems);
<?php endif; ?>
<?php if (!$hasMajorProblems && !$hasMinorProblems): ?>
<p class="ok">Your configuration looks good to run Symfony.</p>
<p class="ok">All checks passed successfully. Your system is ready to run Symfony applications.</p>
<?php endif; ?>
<ul class="symfony-install-continue">
<?php if (!$hasMajorProblems): ?>
<li><a href="app_dev.php/_configurator/">Configure your Symfony Application online</a></li>
<li><a href="app_dev.php/">Bypass configuration and go to the Welcome page</a></li>
<?php endif; ?>
<?php if ($hasMajorProblems || $hasMinorProblems): ?>
<li><a href="config.php">Re-check configuration</a></li>
<?php endif; ?>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment