当前位置: 首页>>代码示例>>PHP>>正文


PHP Pagina::getErrors方法代码示例

本文整理汇总了PHP中Pagina::getErrors方法的典型用法代码示例。如果您正苦于以下问题:PHP Pagina::getErrors方法的具体用法?PHP Pagina::getErrors怎么用?PHP Pagina::getErrors使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pagina的用法示例。


在下文中一共展示了Pagina::getErrors方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: test2

 public function test2()
 {
     /**
      * Consultas:
      * 
      * SELECT MAX(id) AS max FROM test_a004_pagina
      * 
      * INSERT INTO test_a004_pagina ( titulo ,contenido ,class ,deleted ,owner_id ,id ) VALUES ('Pagina raiz' ,'This step is usually done transparently as most compilers perform it and then invoke the assembler themselves, so you don\'t really have to worry about it. It can be useful later on if you\'re trying to...' ,'Pagina' ,'0' ,NULL ,'1' );
      * 
      * SELECT MAX(id) AS max FROM test_a004_pagina
      * 
      * INSERT INTO test_a004_pagina ( titulo ,contenido ,class ,deleted ,owner_id ,id ) VALUES ('Subpagina de raiz 1' ,'This step is usually done transparently as most compilers perform it and then invoke the assembler themselves, so you don\'t really have to worry about it. It can be useful later on if you\'re trying to...' ,'Pagina' ,'0' ,'1' ,'2' );
      * 
      * SELECT MAX(id) AS max FROM test_a004_pagina
      * 
      * INSERT INTO test_a004_pagina ( titulo ,contenido ,class ,deleted ,owner_id ,id ) VALUES ('Sub subpagina de raiz 1' ,'This step is usually done transparently as most compilers perform it and then invoke the assembler themselves, so you don\'t really have to worry about it. It can be useful later on if you\'re trying to...' ,'Pagina' ,'0' ,'2' ,'3' );
      *
      * SELECT count(id) as cant FROM test_a004_pagina_subpages_test_a004_pagina WHERE (test_a004_pagina_subpages_test_a004_pagina.owner_id=2 AND test_a004_pagina_subpages_test_a004_pagina.ref_id=3)
      * 
      * SELECT MAX(id) AS max FROM test_a004_pagina_subpages_test_a004_pagina
      * 
      * INSERT INTO test_a004_pagina_subpages_test_a004_pagina ( owner_id ,ref_id ,type ,ord ,class ,deleted ,id ) VALUES ('2' ,'3' ,'2' ,NULL ,'ObjectReference' ,'0' ,'1' );
      * 
      * SELECT MAX(id) AS max FROM test_a004_pagina
      * 
      * INSERT INTO test_a004_pagina ( titulo ,contenido ,class ,deleted ,owner_id ,id ) VALUES ('Sub subpagina de raiz 2' ,'This step is usually done transparently as most compilers perform it and then invoke the assembler themselves, so you don\'t really have to worry about it. It can be useful later on if you\'re trying to...' ,'Pagina' ,'0' ,'2' ,'4' );
      * 
      * SELECT count(id) as cant FROM test_a004_pagina_subpages_test_a004_pagina WHERE (test_a004_pagina_subpages_test_a004_pagina.owner_id=2 AND test_a004_pagina_subpages_test_a004_pagina.ref_id=4)
      * 
      * SELECT MAX(id) AS max FROM test_a004_pagina_subpages_test_a004_pagina
      * 
      * INSERT INTO test_a004_pagina_subpages_test_a004_pagina ( owner_id ,ref_id ,type ,ord ,class ,deleted ,id ) VALUES ('2' ,'4' ,'2' ,NULL ,'ObjectReference' ,'0' ,'2' );
      * 
      * SELECT count(id) as cant FROM test_a004_pagina_subpages_test_a004_pagina WHERE (test_a004_pagina_subpages_test_a004_pagina.owner_id=1 AND test_a004_pagina_subpages_test_a004_pagina.ref_id=2)
      * 
      * SELECT MAX(id) AS max FROM test_a004_pagina_subpages_test_a004_pagina
      * 
      * INSERT INTO test_a004_pagina_subpages_test_a004_pagina ( owner_id ,ref_id ,type ,ord ,class ,deleted ,id ) VALUES ('1' ,'2' ,'2' ,NULL ,'ObjectReference' ,'0' ,'3' );
      * 
      * SELECT id FROM test_a004_pagina WHERE id=2
      * 
      * UPDATE test_a004_pagina SET titulo='Subpagina de raiz 1' ,contenido='This step is usually done transparently as most compilers perform it and then invoke the assembler themselves, so you don\'t really have to worry about it. It can be useful later on if you\'re trying to...' ,class='Pagina' ,deleted='0' ,owner_id='1' WHERE id=2
      * 
      * 
      */
     $p1 = new Pagina(array("titulo" => "Pagina raiz", "contenido" => "This step is usually done transparently as most compilers perform it and then invoke the assembler themselves, so you don't really have to worry about it. It can be useful later on if you're trying to..."));
     $p11 = new Pagina(array("titulo" => "Subpagina de raiz 1", "contenido" => "This step is usually done transparently as most compilers perform it and then invoke the assembler themselves, so you don't really have to worry about it. It can be useful later on if you're trying to...", "owner" => $p1));
     $p111 = new Pagina(array("titulo" => "Sub subpagina de raiz 1", "contenido" => "This step is usually done transparently as most compilers perform it and then invoke the assembler themselves, so you don't really have to worry about it. It can be useful later on if you're trying to...", "owner" => $p11));
     $p112 = new Pagina(array("titulo" => "Sub subpagina de raiz 2", "contenido" => "This step is usually done transparently as most compilers perform it and then invoke the assembler themselves, so you don't really have to worry about it. It can be useful later on if you're trying to...", "owner" => $p11));
     // subpaginas de p11
     $p11->addToSubpages($p111);
     $p11->addToSubpages($p112);
     // subpaginas de p1
     $p1->addToSubpages($p11);
     // Guarda en cascada porque el lado con cardinalidad 1 de la relacion
     // es el responsable del lado con cardinalidad *.
     $this->assert($p1->save(), 'TestCaseA004.test2: Test salvar hasMany en cascada', array('errors' => print_r($p1->getErrors(), true)));
     // TODO: en el test verificar que se guardo todo y que puedo cargar las relaciones ok
 }
开发者ID:fkali,项目名称:yupp,代码行数:59,代码来源:apps.tests.tests.TestCaseA004.class.php


注:本文中的Pagina::getErrors方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。