Skip to content

Instantly share code, notes, and snippets.

@AV4TAr
Created November 19, 2013 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AV4TAr/7550098 to your computer and use it in GitHub Desktop.
Save AV4TAr/7550098 to your computer and use it in GitHub Desktop.
<?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