Saturday, October 26, 2013
Monday, October 21, 2013
PHP abstract classes
- Abstract classes cannot be instantiated
- A class must be declared as abstract if any of its method is abstract
- Methods defined as abstract must only declare its signature
- When inheriting from abstract class the child must define all the abstract methods with the same visibility or lower
- The type and arguments must match the signature
Labels:
PHP
Installing Zend Framework 2 Skeleton Application in Ubuntu
- Go to
https://github.com/zendframework/ZendSkeletonApplicationand click the “Zip” button - This will download a file with a name like
ZendSkeletonApplication-master.zip - Unzip this file into the directory and rename it to something like 'skeleton'
- Navigate into this folder and run the
composer.pharas described below - This installs ZF2 in the vendor/zendframework/zendframework folder
cd skeleton
php composer.phar self-update
php composer.phar install
Labels:
Zend
Friday, October 11, 2013
Enabling clean url via .htaccess in drupal 7
Sometimes due to server settings the clean url test may fail. To fix this make sure to add the below lines in .htacess file in the drupal root folder.
# Pass all requests not referring directly to files in the filesystem to
# index.php. Clean URLs are handled in drupal_environment_initialize().
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ /client/delacon/devel/index.php [L]
Labels:
Drupal
Thursday, October 3, 2013
Uncaught exception 'Exception' with message 'Serialization of 'SimpleXMLElement' is not allowed'
You have to cast the XML data to a string because internally they are all SimpleXMLElement
$event['mov'][$y]['name'] = (string)$child->name;
$event['mov'][$y]['movie_id'] = (string)$child->venues->venue->attributes()->id;
$event['mov'][$y]['description'] = (string)$child->description;
Labels:
Codeigniter,
PHP
Subscribe to:
Posts (Atom)