Created
November 19, 2013 18:32
-
-
Save AV4TAr/7550098 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Importer | |
{ | |
private $json_array; | |
private $table; | |
private $db_config; | |
public function __construct($db_config) | |
{ | |
//echo "hola"; | |
$this->db_config=$db_config; | |
//$table = New Zend/DB/Table('nombre_tabl'..); | |
} | |
public function procesar() | |
{ | |
//echo " mundo"; | |
//$this->table->fetch(); | |
$this->insertarenTabla($datos); | |
} | |
private function insertarenTabla($datos){ | |
$this->table->insert(); | |
} | |
public function getJsonArray() | |
{ | |
return $this->json_array; | |
} | |
public function setJsonArray($json_array) | |
{ | |
$this->json_array = $json_array; | |
} | |
} | |
$db_config = array(...); | |
$Importer = new Importer($db_config); | |
$Importer->procesar(); | |
$Importer->setJsonArray(array(1,2,3)); | |
print_r($Importer->getJsonArray()); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment