PHP-final METHODS-override a final method
PMA05:03
However, there are times where you might want to make
sure that a method cannot be re-implemented in its derived
classes. For this purpose, PHP supports the Java-like final
access modifier for methods that declares the method as
the final version, which can’t be overridden.
The following example is not a valid PHP script because it is trying to
override a finalmethod:
class MyBaseClass {
final function idGenerator()
{
return $this->id++;
}
protected $id = 0;
}
class MyConcreteClass extends MyBaseClass {
function idGenerator()
{
return $this->id += 2;
}
}
INHERITANCE OF INTERFACES
Interfaces may inherit from other interfaces. The syntax is
similar to that of classes, but allows multiple inheritance:
interface I1 extends I2, I3, ... {
...
}
Similar to when classes implement interfaces, an interface can only
extend other interfaces if they don’t clash with each other which means that
you receive an error if I2defines methods or constants already defined by I1.
Marketing on Facebook, MySpace, and Twitter
PMA03:32
The largest social media site—Facebook. As you know, this
popular social network is a community with more than 500 million users.
Ignore Facebook at your peril.
There are many ways to market your company and products on Facebook.
We’ll examine the most popular methods here—hosting a Facebook fan
page, creating a Facebook application, and cross-marketing Facebook via
your own website or blog. First up is your Facebook page.
Facebook Pages
Individuals on Facebook are represented by their profile pages; other
users become friends with a person
to receive his or her status updates.
Businesses, however, aren’t individuals
and as such don’t have individual
profile pages or friends.
Instead, your business creates what Facebook simply calls a
pageor what I call a fan page, and you get people to "like" your
page to become fans. Your fans can read all about you on your fan page,
contribute to hosted discussions, and receive all the status updates you make.
Creating a Facebook page is relatively easy. You start by going to
www.facebook.com/pages/ and then clicking the Create Page button.
When the Create a Page screen appears, select the category for your page:
Local Business; Brand, Product, or Organization; or Artist, Band, or
Public Figure.
The first thing you should do is invite people to visit and like your page. You
want to find friends on the Facebook site and then suggest your new page to
your friends. There’s a Suggest to Friends link in the sidebar of your page; use
this to send invitations to these folks.
popular social network is a community with more than 500 million users.
Ignore Facebook at your peril.
There are many ways to market your company and products on Facebook.
We’ll examine the most popular methods here—hosting a Facebook fan
page, creating a Facebook application, and cross-marketing Facebook via
your own website or blog. First up is your Facebook page.
Facebook Pages
Individuals on Facebook are represented by their profile pages; other
users become friends with a person
to receive his or her status updates.
Businesses, however, aren’t individuals
and as such don’t have individual
profile pages or friends.
Instead, your business creates what Facebook simply calls a
pageor what I call a fan page, and you get people to "like" your
page to become fans. Your fans can read all about you on your fan page,
contribute to hosted discussions, and receive all the status updates you make.
Creating a Facebook page is relatively easy. You start by going to
www.facebook.com/pages/ and then clicking the Create Page button.
When the Create a Page screen appears, select the category for your page:
Local Business; Brand, Product, or Organization; or Artist, Band, or
Public Figure.
The first thing you should do is invite people to visit and like your page. You
want to find friends on the Facebook site and then suggest your new page to
your friends. There’s a Suggest to Friends link in the sidebar of your page; use
this to send invitations to these folks.
Ad Networks and Exchanges
PMA00:49
For most advertisers, however, display ad space is purchased
via some sort of ad network or exchange. The big three PPC
ad networks all have space advertising arms; there are also a
number of other large display ad networks that would be glad
to help you get your ads placed.
the big three PPC ad networks, who aren’t necessarily the big
three display ad networks—although they’re all near the top of
the list. The advantage of going through these networks is that
you’re likely to have a prior relationship with them, and it’s
easy to extend from your PPC ads to include display ads to
the mix.
Here are the networks to start with:
1.DoubleClick by Google -www.doubleclick.com
2.Yahoo! Advertising Display Solutions -advertising.yahoo.com
2.Microsoft Advertising -advertising.microsoft.com
Most ad networks sell premium space—the exact space you want
on the sites you specify. But most sites don’t sell out all the
premium space; they still have space available on their sites that
goes unsold.
Thisremnant inventory is the same exact space as a site’s premium
space; it’s simply space that is left over after the primary space
has been claimed. As such, it sells at discount and could be a
good buy for your advertising program.
There are ad networks that specialize in selling remnant inventory.
These networks buy up the unused space from a variety of
websites and then package it to their advertisers for pennies
on the dollar. Now, you don’t always get the choice of websites
for your ad to appear, but you don’t pay as much as you do
with premium space, either.
For the host websites, selling remnant inventory is a lot better
than leaving the available space empty; they get a little bit of
income, and they don’t have to leave white space on their pages.
For advertisers, the benefit is purely monetary; you get your ads
out there for less than you would if you purchased premium space.
To that end, including remnant inventory in your advertising plan might
make sense. Even if you still purchase premium space on the sites you really
want to use, you can supplement these placements with additional remnant
purchases. It’s certainly cost effective.
Display advertising is the best way to establish your brand or
product online.Most display ads are sold on a CPM basis,
which is fine if you’re most interested in generating impressions.
There is, however, a movement toward PPC display ads, if in fact
you have actual conversion in mind.
Display ads can be image-only ads, or they can include all manner of rich
media. State-of-the-art display ads often incorporate Flash animations, video
and audio playback, and even interactive elements for the consumer to click.
via some sort of ad network or exchange. The big three PPC
ad networks all have space advertising arms; there are also a
number of other large display ad networks that would be glad
to help you get your ads placed.
the big three PPC ad networks, who aren’t necessarily the big
three display ad networks—although they’re all near the top of
the list. The advantage of going through these networks is that
you’re likely to have a prior relationship with them, and it’s
easy to extend from your PPC ads to include display ads to
the mix.
Here are the networks to start with:
1.DoubleClick by Google -www.doubleclick.com
2.Yahoo! Advertising Display Solutions -advertising.yahoo.com
2.Microsoft Advertising -advertising.microsoft.com
Most ad networks sell premium space—the exact space you want
on the sites you specify. But most sites don’t sell out all the
premium space; they still have space available on their sites that
goes unsold.
Thisremnant inventory is the same exact space as a site’s premium
space; it’s simply space that is left over after the primary space
has been claimed. As such, it sells at discount and could be a
good buy for your advertising program.
There are ad networks that specialize in selling remnant inventory.
These networks buy up the unused space from a variety of
websites and then package it to their advertisers for pennies
on the dollar. Now, you don’t always get the choice of websites
for your ad to appear, but you don’t pay as much as you do
with premium space, either.
For the host websites, selling remnant inventory is a lot better
than leaving the available space empty; they get a little bit of
income, and they don’t have to leave white space on their pages.
For advertisers, the benefit is purely monetary; you get your ads
out there for less than you would if you purchased premium space.
To that end, including remnant inventory in your advertising plan might
make sense. Even if you still purchase premium space on the sites you really
want to use, you can supplement these placements with additional remnant
purchases. It’s certainly cost effective.
Display advertising is the best way to establish your brand or
product online.Most display ads are sold on a CPM basis,
which is fine if you’re most interested in generating impressions.
There is, however, a movement toward PPC display ads, if in fact
you have actual conversion in mind.
Display ads can be image-only ads, or they can include all manner of rich
media. State-of-the-art display ads often incorporate Flash animations, video
and audio playback, and even interactive elements for the consumer to click.