Skip to content

Commit

Permalink
Updated: Refined debug output comment
Browse files Browse the repository at this point in the history
  • Loading branch information
brookinsconsulting committed Jan 29, 2017
1 parent 9c8f295 commit 533da95
Showing 1 changed file with 24 additions and 17 deletions.
Expand Up @@ -13,11 +13,11 @@
class SQLIGistGitHubATOMImportHandler extends SQLIImportAbstractHandler implements ISQLIImportHandler
{
protected $rowIndex = 0;

protected $rowCount;

protected $currentGUID;

/**
* Constructor
*/
Expand All @@ -27,7 +27,7 @@ public function __construct( SQLIImportHandlerOptions $options = null )
$this->remoteIDPrefix = $this->getHandlerIdentifier().'-';
$this->currentRemoteIDPrefix = $this->remoteIDPrefix;
}

/**
* (non-PHPdoc)
* @see extension/sqliimport/classes/sourcehandlers/ISQLIImportHandler::initialize()
Expand All @@ -42,7 +42,7 @@ public function initialize()
$xmlParser = new SQLIXMLParser( $xmlOptions );
$this->dataSource = $xmlParser->parse();
}

/**
* (non-PHPdoc)
* @see extension/sqliimport/classes/sourcehandlers/ISQLIImportHandler::getProcessLength()
Expand All @@ -55,7 +55,7 @@ public function getProcessLength()
}
return $this->rowCount;
}

/**
* (non-PHPdoc)
* @see extension/sqliimport/classes/sourcehandlers/ISQLIImportHandler::getNextRow()
Expand All @@ -71,10 +71,10 @@ public function getNextRow()
{
$row = false; // We must return false if we already processed all rows
}

return $row;
}

/**
* (non-PHPdoc)
* @see extension/sqliimport/classes/sourcehandlers/ISQLIImportHandler::process()
Expand Down Expand Up @@ -127,24 +127,31 @@ public function process( $row )
$content->fields->blog_post_description_text_block = (string)$row->content; // Proxy method to SQLIContentUtils::getRichContent()

/*
if( preg_match( '/1624060/', $row->id[0] ) )
echo "\n\n\n";
print_r( $row->id[0] );
echo "\n\n\n";
if( preg_match( '/1618124/', $row->id[0] ) )
{
echo "\n\n\n";
echo "\n\n\n";
print_r( $row->id[0] );
//print_r( (string)$row->title );
echo "\n\n\n";
// print_r( (string)$row->content );
//print_r( (string)$row->content );
print_r( $content->fields );
print_r( SQLILocation::fromNodeID( $this->handlerConfArray['DefaultParentNodeID'] ) );
//print_r( SQLILocation::fromNodeID( $this->handlerConfArray['DefaultParentNodeID'] ) );
echo "\n\n\n";
}
*/


// Now publish content
$content->addLocation( SQLILocation::fromNodeID( $this->handlerConfArray['DefaultParentNodeID'] ) );

$publisher = SQLIContentPublisher::getInstance();
$publisher->publish( $content );

// Clear cache
$defaultParentNodeID = $this->handlerConfArray['DefaultParentNodeID'];
$parentNode = eZContentObjectTreeNode::fetch( $defaultParentNodeID, 'eng-US' );
Expand All @@ -159,7 +166,7 @@ public function process( $row )
// @see SQLIContent::__destruct()
unset( $content );
}

/**
* (non-PHPdoc)
* @see extension/sqliimport/classes/sourcehandlers/ISQLIImportHandler::cleanup()
Expand All @@ -169,7 +176,7 @@ public function cleanup()
// Nothing to clean up
return;
}

/**
* (non-PHPdoc)
* @see extension/sqliimport/classes/sourcehandlers/ISQLIImportHandler::getHandlerName()
Expand All @@ -178,7 +185,7 @@ public function getHandlerName()
{
return 'GitHub Gist ATOM Import Handler';
}

/**
* (non-PHPdoc)
* @see extension/sqliimport/classes/sourcehandlers/ISQLIImportHandler::getHandlerIdentifier()
Expand All @@ -187,7 +194,7 @@ public function getHandlerIdentifier()
{
return 'gistgithubatomimporthandler';
}

/**
* (non-PHPdoc)
* @see extension/sqliimport/classes/sourcehandlers/ISQLIImportHandler::getProgressionNotes()
Expand Down

0 comments on commit 533da95

Please sign in to comment.